@cuvp1225/antd 0.2.58 → 0.2.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/designer.js +1956 -150
- package/dist/index.js +2058 -269
- package/lib/cjs/components/button.js +26 -0
- package/lib/cjs/components/cascader.d.ts +34 -0
- package/lib/cjs/components/cascader.js +23 -0
- package/lib/cjs/components/checkbox.d.ts +6 -0
- package/lib/cjs/components/checkbox.js +22 -0
- package/lib/cjs/components/date-picker.d.ts +8 -0
- package/lib/cjs/components/date-picker.js +24 -0
- package/lib/cjs/components/drawer.d.ts +3 -0
- package/lib/cjs/components/drawer.js +21 -0
- package/lib/cjs/components/icon.d.ts +2 -0
- package/lib/cjs/components/icon.js +48 -0
- package/lib/cjs/components/index.d.ts +8 -2
- package/lib/cjs/components/index.js +22 -5
- package/lib/cjs/components/popconfirm.d.ts +3 -0
- package/lib/cjs/components/popconfirm.js +26 -0
- package/lib/cjs/components/radio.d.ts +6 -0
- package/lib/cjs/components/radio.js +27 -0
- package/lib/cjs/components/select.js +30 -4
- package/lib/cjs/components/typography.d.ts +2 -1
- package/lib/cjs/components/typography.js +5 -2
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/prototypes/alert.js +6 -1
- package/lib/cjs/prototypes/auto-complete.js +69 -18
- package/lib/cjs/prototypes/button.js +8 -6
- package/lib/cjs/prototypes/cascader.js +1 -1
- package/lib/cjs/prototypes/common.js +6 -5
- package/lib/cjs/prototypes/drawer.js +25 -15
- package/lib/cjs/prototypes/form.js +1 -1
- package/lib/cjs/prototypes/icon.d.ts +2 -0
- package/lib/cjs/prototypes/icon.js +46 -0
- package/lib/cjs/prototypes/popconfirm.js +3 -1
- package/lib/cjs/prototypes/progress.js +1 -0
- package/lib/cjs/prototypes/radio.js +20 -4
- package/lib/cjs/prototypes/select.js +8 -0
- package/lib/cjs/prototypes/steps.js +30 -4
- package/lib/cjs/prototypes/table.js +5 -5
- package/lib/cjs/prototypes/tabs.js +53 -4
- package/lib/cjs/prototypes/tree-select.js +31 -1
- package/lib/cjs/prototypes/tree.js +1 -1
- package/lib/cjs/utils/utils.d.ts +2 -0
- package/lib/cjs/utils/utils.js +12 -0
- package/lib/esm/components/button.js +26 -0
- package/lib/esm/components/cascader.d.ts +34 -0
- package/lib/esm/components/cascader.js +20 -0
- package/lib/esm/components/checkbox.d.ts +6 -0
- package/lib/esm/components/checkbox.js +19 -0
- package/lib/esm/components/date-picker.d.ts +8 -0
- package/lib/esm/components/date-picker.js +21 -0
- package/lib/esm/components/drawer.d.ts +3 -0
- package/lib/esm/components/drawer.js +18 -0
- package/lib/esm/components/icon.d.ts +2 -0
- package/lib/esm/components/icon.js +45 -0
- package/lib/esm/components/index.d.ts +8 -2
- package/lib/esm/components/index.js +9 -3
- package/lib/esm/components/popconfirm.d.ts +3 -0
- package/lib/esm/components/popconfirm.js +23 -0
- package/lib/esm/components/radio.d.ts +6 -0
- package/lib/esm/components/radio.js +24 -0
- package/lib/esm/components/select.js +30 -4
- package/lib/esm/components/typography.d.ts +2 -1
- package/lib/esm/components/typography.js +4 -1
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/prototypes/alert.js +6 -1
- package/lib/esm/prototypes/auto-complete.js +70 -19
- package/lib/esm/prototypes/button.js +8 -6
- package/lib/esm/prototypes/cascader.js +1 -1
- package/lib/esm/prototypes/common.js +6 -5
- package/lib/esm/prototypes/drawer.js +25 -15
- package/lib/esm/prototypes/form.js +1 -1
- package/lib/esm/prototypes/icon.d.ts +2 -0
- package/lib/esm/prototypes/icon.js +43 -0
- package/lib/esm/prototypes/popconfirm.js +3 -1
- package/lib/esm/prototypes/progress.js +1 -0
- package/lib/esm/prototypes/radio.js +20 -4
- package/lib/esm/prototypes/select.js +8 -0
- package/lib/esm/prototypes/steps.js +30 -4
- package/lib/esm/prototypes/table.js +5 -5
- package/lib/esm/prototypes/tabs.js +53 -4
- package/lib/esm/prototypes/tree-select.js +32 -2
- package/lib/esm/prototypes/tree.js +1 -1
- package/lib/esm/utils/utils.d.ts +2 -0
- package/lib/esm/utils/utils.js +5 -0
- package/package.json +3 -3
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Button = void 0;
|
4
4
|
const common_1 = require("./common");
|
5
|
+
// import { AntdIconSetter } from '../setters';
|
5
6
|
exports.Button = {
|
6
7
|
title: '按钮',
|
7
8
|
name: 'Button',
|
@@ -23,6 +24,7 @@ exports.Button = {
|
|
23
24
|
{ label: '幽灵按钮', value: 'ghost' },
|
24
25
|
{ label: '虚线按钮', value: 'dashed' },
|
25
26
|
{ label: '链接按钮', value: 'link' },
|
27
|
+
{ label: '文本按钮', value: 'text' },
|
26
28
|
],
|
27
29
|
},
|
28
30
|
{
|
@@ -34,13 +36,13 @@ exports.Button = {
|
|
34
36
|
{
|
35
37
|
name: 'icon',
|
36
38
|
title: '图标',
|
37
|
-
setter: '
|
38
|
-
},
|
39
|
-
{
|
40
|
-
name: 'isText',
|
41
|
-
title: '文本按钮',
|
42
|
-
setter: 'boolSetter',
|
39
|
+
setter: 'AntdIconSetter',
|
43
40
|
},
|
41
|
+
// {
|
42
|
+
// name: 'isText',
|
43
|
+
// title: '文本按钮',
|
44
|
+
// setter: 'boolSetter',
|
45
|
+
// },
|
44
46
|
{
|
45
47
|
name: 'shape',
|
46
48
|
title: '按钮形状',
|
@@ -90,7 +90,7 @@ exports.Cascader = {
|
|
90
90
|
name: 'loadData',
|
91
91
|
title: '动态加载选项',
|
92
92
|
setter: 'expressionSetter',
|
93
|
-
autoCompleteOptions: ['(selectedOptions) => {} '],
|
93
|
+
autoCompleteOptions: ['(selectedOptions) => {\nconsole.log("选择", selectedOptions);\nconst targetOption = selectedOptions[selectedOptions.length - 1];\nconsole.log("targetOption", targetOption);\nsetTimeout(() => {\ntargetOption.children = [\n{ label: `${targetOption.label} Dynamic 1`, value: "dynamic1" },\n{ label: `${targetOption.label} Dynamic 2`, value: "dynamic2" },\n];\nconsole.log("targetOption1", targetOption);\nthis.setState({ optionsList: [...this.state.optionsList] });\n }, 1000);\n} '],
|
94
94
|
tip: '无法与 showSearch 一起使用',
|
95
95
|
},
|
96
96
|
],
|
@@ -5,12 +5,13 @@ exports.StylePrototypes = [
|
|
5
5
|
{
|
6
6
|
name: 'style',
|
7
7
|
title: '样式对象',
|
8
|
-
setter: 'expressionSetter',
|
9
|
-
setterProps: {
|
10
|
-
|
11
|
-
},
|
8
|
+
// setter: 'expressionSetter',
|
9
|
+
// setterProps: {
|
10
|
+
// expressionType: 'cssObject',
|
11
|
+
// },
|
12
|
+
setter: 'cssSetter',
|
12
13
|
group: 'style',
|
13
|
-
autoCompleteOptions: ['{}'],
|
14
|
+
// autoCompleteOptions: ['{}'],
|
14
15
|
},
|
15
16
|
{
|
16
17
|
name: 'className',
|
@@ -14,17 +14,26 @@ exports.Drawer = {
|
|
14
14
|
initChildren: '',
|
15
15
|
props: [
|
16
16
|
...common_1.StylePrototypes,
|
17
|
-
{
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
},
|
23
|
-
{
|
24
|
-
|
17
|
+
// {
|
18
|
+
// name: 'id',
|
19
|
+
// title: '弹窗 ID',
|
20
|
+
// tip: '设置弹窗 ID,可以借助 tango.openModal 轻松唤起弹窗',
|
21
|
+
// setter: 'textSetter',
|
22
|
+
// },
|
23
|
+
// {
|
24
|
+
// name: 'visible',
|
25
|
+
// title: '是否显示',
|
26
|
+
// setter: 'expressionSetter',
|
27
|
+
// group: 'basic',
|
28
|
+
// },
|
29
|
+
{
|
30
|
+
name: 'open',
|
25
31
|
title: '是否显示',
|
26
32
|
setter: 'expressionSetter',
|
27
33
|
group: 'basic',
|
34
|
+
// initValue: true,
|
35
|
+
initValue: true,
|
36
|
+
tip: '默认显示为true,也可以绑定变量如:this.state.open',
|
28
37
|
},
|
29
38
|
{
|
30
39
|
name: 'title',
|
@@ -37,18 +46,18 @@ exports.Drawer = {
|
|
37
46
|
name: 'closable',
|
38
47
|
title: '是否显示关闭按钮',
|
39
48
|
setter: 'boolSetter',
|
40
|
-
|
49
|
+
initValue: true,
|
41
50
|
},
|
42
51
|
{
|
43
52
|
name: 'destroyOnClose',
|
44
53
|
title: '关闭时销毁子元素',
|
45
54
|
setter: 'boolSetter',
|
46
|
-
|
55
|
+
initValue: false,
|
47
56
|
},
|
48
57
|
{
|
49
58
|
name: 'width',
|
50
59
|
title: '宽度',
|
51
|
-
|
60
|
+
initValue: 378,
|
52
61
|
setter: 'numberSetter',
|
53
62
|
},
|
54
63
|
{
|
@@ -63,6 +72,7 @@ exports.Drawer = {
|
|
63
72
|
title: '点击关闭按钮的回调',
|
64
73
|
setter: 'actionSetter',
|
65
74
|
group: 'event',
|
75
|
+
initValue: '{{() => {if(this.state.open){ this.setState({open: false})}}}}',
|
66
76
|
},
|
67
77
|
{
|
68
78
|
name: 'afterVisibleChange',
|
@@ -73,7 +83,7 @@ exports.Drawer = {
|
|
73
83
|
{
|
74
84
|
name: 'placement',
|
75
85
|
title: '抽屉的方向',
|
76
|
-
|
86
|
+
initValue: 'right',
|
77
87
|
options: [
|
78
88
|
{ label: '上', value: 'top' },
|
79
89
|
{ label: '右', value: 'right' },
|
@@ -87,7 +97,7 @@ exports.Drawer = {
|
|
87
97
|
name: 'size',
|
88
98
|
title: '预设尺寸',
|
89
99
|
setter: 'choiceSetter',
|
90
|
-
|
100
|
+
initValue: 'default',
|
91
101
|
options: [
|
92
102
|
{ label: '默认', value: 'default' },
|
93
103
|
{ label: '更宽', value: 'large' },
|
@@ -97,7 +107,7 @@ exports.Drawer = {
|
|
97
107
|
name: 'mask',
|
98
108
|
title: '是否展示遮罩',
|
99
109
|
setter: 'boolSetter',
|
100
|
-
|
110
|
+
initValue: true,
|
101
111
|
},
|
102
112
|
{
|
103
113
|
name: 'keyboard',
|
@@ -112,7 +122,7 @@ exports.Drawer = {
|
|
112
122
|
{
|
113
123
|
name: 'zIndex',
|
114
124
|
title: '设置 Drawer 的 z-index',
|
115
|
-
|
125
|
+
initValue: 1000,
|
116
126
|
setter: 'numberSetter',
|
117
127
|
group: 'advanced',
|
118
128
|
},
|
@@ -58,7 +58,7 @@ exports.Form = {
|
|
58
58
|
Submit
|
59
59
|
</Button>
|
60
60
|
</Form.Item>`,
|
61
|
-
relatedImports: ['FormItem', 'FormFooter', 'Button'],
|
61
|
+
relatedImports: ['FormItem', 'FormFooter', 'Button', 'Input'],
|
62
62
|
childrenName: ['FormItem', 'Fieldset', 'FormFooter'],
|
63
63
|
props: [
|
64
64
|
...common_1.StylePrototypes,
|
@@ -0,0 +1,46 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AntdIcon = void 0;
|
4
|
+
// import { AntdIconSetter } from '../setters';
|
5
|
+
exports.AntdIcon = {
|
6
|
+
title: '图标',
|
7
|
+
name: 'AntdIcon',
|
8
|
+
icon: 'icon-anniu',
|
9
|
+
type: 'element',
|
10
|
+
package: '@cuvp1225/antd',
|
11
|
+
props: [
|
12
|
+
{
|
13
|
+
name: 'type',
|
14
|
+
title: '图标',
|
15
|
+
setter: 'AntdIconSetter',
|
16
|
+
},
|
17
|
+
{
|
18
|
+
name: 'size',
|
19
|
+
title: '大小',
|
20
|
+
setter: 'NumberSetter',
|
21
|
+
defaultValue: 20,
|
22
|
+
},
|
23
|
+
{
|
24
|
+
name: 'color',
|
25
|
+
title: '颜色',
|
26
|
+
setter: 'ColorSetter',
|
27
|
+
},
|
28
|
+
{
|
29
|
+
name: 'rotate',
|
30
|
+
title: '旋转角度',
|
31
|
+
setter: 'NumberSetter',
|
32
|
+
defaultValue: 0,
|
33
|
+
},
|
34
|
+
{
|
35
|
+
name: 'spin',
|
36
|
+
title: '旋转动画',
|
37
|
+
setter: 'BooleanSetter',
|
38
|
+
defaultValue: false,
|
39
|
+
},
|
40
|
+
// {
|
41
|
+
// name: 'onClick',
|
42
|
+
// title: '点击回调',
|
43
|
+
// propType: 'func',
|
44
|
+
// },
|
45
|
+
],
|
46
|
+
};
|
@@ -6,11 +6,13 @@ const button_1 = require("./button");
|
|
6
6
|
exports.Popconfirm = {
|
7
7
|
name: 'Popconfirm',
|
8
8
|
title: '气泡确认框',
|
9
|
+
exportType: 'namedExport',
|
9
10
|
package: '@cuvp1225/antd',
|
10
11
|
icon: 'icon-qipaoqueren',
|
11
12
|
help: '点击元素,弹出气泡式的确认框',
|
12
|
-
type: '
|
13
|
+
type: 'container',
|
13
14
|
hasChildren: true,
|
15
|
+
siblingNames: ['Popconfirm'],
|
14
16
|
initChildren: '<Button children="删除" />',
|
15
17
|
relatedImports: ['Button'],
|
16
18
|
props: [
|
@@ -23,11 +23,27 @@ exports.Radio = {
|
|
23
23
|
title: '选中',
|
24
24
|
setter: 'boolSetter',
|
25
25
|
},
|
26
|
-
{
|
27
|
-
|
28
|
-
|
26
|
+
// {
|
27
|
+
// name: 'radioGroup',
|
28
|
+
// title: '单选框组',
|
29
|
+
// setter: 'boolSetter',
|
30
|
+
// },
|
31
|
+
{
|
32
|
+
name: 'label',
|
33
|
+
title: '标签',
|
34
|
+
initValue: '单项1',
|
29
35
|
setter: 'textSetter',
|
30
36
|
},
|
37
|
+
{
|
38
|
+
name: 'optionType',
|
39
|
+
title: '选项类型',
|
40
|
+
setter: 'choiceSetter',
|
41
|
+
initValue: 'default',
|
42
|
+
options: [
|
43
|
+
{ label: '默认', value: 'default' },
|
44
|
+
{ label: '按钮类型', value: 'button' },
|
45
|
+
],
|
46
|
+
},
|
31
47
|
{
|
32
48
|
name: 'defaultChecked',
|
33
49
|
title: '初始选中',
|
@@ -144,7 +160,7 @@ exports.RadioGroup = {
|
|
144
160
|
{ label: '按钮', value: 'button' },
|
145
161
|
],
|
146
162
|
},
|
147
|
-
group: '
|
163
|
+
group: 'basic',
|
148
164
|
},
|
149
165
|
{
|
150
166
|
name: 'size',
|
@@ -31,6 +31,7 @@ exports.CommonPrototypes = [
|
|
31
31
|
setter: 'expressionSetter',
|
32
32
|
tip: '可通过model变量设置初始值',
|
33
33
|
group: 'basic',
|
34
|
+
initValue: [], // 默认值
|
34
35
|
},
|
35
36
|
{
|
36
37
|
name: 'width',
|
@@ -364,6 +365,13 @@ exports.Select = {
|
|
364
365
|
setter: 'actionSetter',
|
365
366
|
group: 'event',
|
366
367
|
},
|
368
|
+
{
|
369
|
+
name: "style",
|
370
|
+
title: "样式",
|
371
|
+
setter: "styleSetter",
|
372
|
+
group: "style",
|
373
|
+
initValue: `{{{width: '100%'}}}`
|
374
|
+
},
|
367
375
|
{
|
368
376
|
name: 'dropdownClassName',
|
369
377
|
title: '下拉菜单className',
|
@@ -14,7 +14,24 @@ exports.Steps = {
|
|
14
14
|
initChildren: '<StepsItem title="步骤1" /><StepsItem title="步骤2" />',
|
15
15
|
relatedImports: ['StepsItem'],
|
16
16
|
props: [
|
17
|
-
...
|
17
|
+
// ...StylePrototypes,
|
18
|
+
{
|
19
|
+
name: 'style',
|
20
|
+
title: '样式对象',
|
21
|
+
setter: 'expressionSetter',
|
22
|
+
setterProps: {
|
23
|
+
expressionType: 'cssObject',
|
24
|
+
},
|
25
|
+
group: 'style',
|
26
|
+
initValue: '{{{width: "100%"}}}',
|
27
|
+
autoCompleteOptions: ['{}'],
|
28
|
+
},
|
29
|
+
{
|
30
|
+
name: 'className',
|
31
|
+
title: '自定义样式类名',
|
32
|
+
setter: 'classNameSetter',
|
33
|
+
group: 'style',
|
34
|
+
},
|
18
35
|
{
|
19
36
|
name: 'initial',
|
20
37
|
title: '默认起始序号',
|
@@ -119,12 +136,21 @@ exports.StepsItem = {
|
|
119
136
|
type: 'element',
|
120
137
|
props: [
|
121
138
|
...common_1.StylePrototypes,
|
122
|
-
{
|
123
|
-
|
139
|
+
{
|
140
|
+
name: 'title',
|
141
|
+
title: '标题',
|
142
|
+
setter: 'textSetter',
|
143
|
+
initValue: '步骤'
|
144
|
+
},
|
145
|
+
{
|
146
|
+
name: 'subTitle',
|
147
|
+
title: '子标题',
|
148
|
+
setter: 'textSetter',
|
149
|
+
},
|
124
150
|
{
|
125
151
|
name: 'description',
|
126
152
|
title: '步骤的详情描述',
|
127
|
-
setter: '
|
153
|
+
setter: 'textSetter',
|
128
154
|
},
|
129
155
|
{
|
130
156
|
name: 'status',
|
@@ -7,10 +7,10 @@ const renderChildrenOptions = [
|
|
7
7
|
{ label: '取消自定义', value: '' },
|
8
8
|
{
|
9
9
|
label: '自定义区域',
|
10
|
-
value: '
|
10
|
+
value: 'div',
|
11
11
|
//render: '{(record, index, indent, expanded) => <Box></Box>}',
|
12
|
-
render: '(record, index, indent, expanded) => <
|
13
|
-
relatedImports: ['
|
12
|
+
render: '(record, index, indent, expanded) => <div><Placeholder text="放置替换" /></div>',
|
13
|
+
relatedImports: ['div'],
|
14
14
|
},
|
15
15
|
];
|
16
16
|
exports.Table = {
|
@@ -271,13 +271,13 @@ exports.Table = {
|
|
271
271
|
{
|
272
272
|
name: 'x',
|
273
273
|
title: '横向滚动',
|
274
|
-
tip: "
|
274
|
+
tip: '可用于指定滚动区域的宽,可以设置为像素值如"2000px"或2000, 百分比如"80%" 和 "max-content"',
|
275
275
|
setter: 'expressionSetter',
|
276
276
|
},
|
277
277
|
{
|
278
278
|
name: 'y',
|
279
279
|
title: '纵向滚动',
|
280
|
-
tip: '
|
280
|
+
tip: '可用于指定滚动区域的高,可以设置为像素值如"150px"或150, 百分比如"100%" 和 "max-content"',
|
281
281
|
setter: 'expressionSetter',
|
282
282
|
},
|
283
283
|
],
|
@@ -10,16 +10,38 @@ exports.Tabs = {
|
|
10
10
|
type: 'container',
|
11
11
|
package: '@cuvp1225/antd',
|
12
12
|
help: '提供平级的区域将大块内容进行收纳和展现,保持界面整洁',
|
13
|
-
hasChildren:
|
14
|
-
initChildren:
|
13
|
+
hasChildren: false,
|
14
|
+
initChildren: `<TabPane key="1" tab="选项卡1"><Placeholder text="放置替换" style={{ margin: "15px"}} /></TabPane><TabPane key="2" tab="选项卡2"><Placeholder text="放置替换" style={{ margin: "15px" }}/></TabPane>`,
|
15
15
|
childrenName: 'TabPane',
|
16
16
|
relatedImports: ['TabPane'],
|
17
17
|
props: [
|
18
18
|
...common_1.StylePrototypes,
|
19
|
+
{
|
20
|
+
name: 'items',
|
21
|
+
title: '标签项',
|
22
|
+
setter: 'tabPaneSetter',
|
23
|
+
initValue: [
|
24
|
+
{
|
25
|
+
key: '1',
|
26
|
+
label: '选项卡1',
|
27
|
+
forceRender: false,
|
28
|
+
disabled: false,
|
29
|
+
// children: '选项卡1',
|
30
|
+
},
|
31
|
+
{
|
32
|
+
key: '2',
|
33
|
+
label: '选项卡2',
|
34
|
+
forceRender: false,
|
35
|
+
disabled: false,
|
36
|
+
// children: '选项卡2',
|
37
|
+
},
|
38
|
+
]
|
39
|
+
},
|
19
40
|
{
|
20
41
|
name: 'defaultActiveKey',
|
21
42
|
title: '默认选中的面板',
|
22
43
|
setter: 'textSetter',
|
44
|
+
initValue: '1',
|
23
45
|
},
|
24
46
|
{
|
25
47
|
name: 'centered',
|
@@ -34,9 +56,20 @@ exports.Tabs = {
|
|
34
56
|
{ label: '基本', value: 'line' },
|
35
57
|
{ label: '卡片', value: 'card' },
|
36
58
|
{ label: '可编辑卡片', value: 'editable-card' },
|
37
|
-
{ label: '胶囊', value: 'capsule' },
|
38
|
-
{ label: '文本', value: 'text' },
|
59
|
+
// { label: '胶囊', value: 'capsule' },
|
60
|
+
// { label: '文本', value: 'text' },
|
61
|
+
],
|
62
|
+
},
|
63
|
+
{
|
64
|
+
name: 'size',
|
65
|
+
title: '选项卡大小',
|
66
|
+
setter: 'choiceSetter',
|
67
|
+
options: [
|
68
|
+
{ label: '大', value: 'large' },
|
69
|
+
{ label: '中', value: 'middle' },
|
70
|
+
{ label: '小', value: 'small' },
|
39
71
|
],
|
72
|
+
tip: '提供large、middle和small三种大小',
|
40
73
|
},
|
41
74
|
{
|
42
75
|
name: 'tabPosition',
|
@@ -49,6 +82,13 @@ exports.Tabs = {
|
|
49
82
|
{ label: '左', value: 'left' },
|
50
83
|
],
|
51
84
|
},
|
85
|
+
{
|
86
|
+
name: 'hideAdd',
|
87
|
+
title: '是否隐藏加号图标',
|
88
|
+
tip: '仅在选项卡类型为可编辑卡片时有效',
|
89
|
+
setter: 'boolSetter',
|
90
|
+
getVisible: (form) => form.getValue('type') === 'editable-card',
|
91
|
+
},
|
52
92
|
{
|
53
93
|
name: 'onChange',
|
54
94
|
title: '当面板切换时',
|
@@ -56,6 +96,15 @@ exports.Tabs = {
|
|
56
96
|
group: 'event',
|
57
97
|
autoCompleteOptions: ['(activeKey)=>{}'],
|
58
98
|
},
|
99
|
+
{
|
100
|
+
name: 'onEdit',
|
101
|
+
title: '新增和删除页签的回调',
|
102
|
+
tip: '仅在选项卡类型为可编辑卡片时有效',
|
103
|
+
setter: 'expressionSetter',
|
104
|
+
group: 'event',
|
105
|
+
// autoCompleteOptions: ["(action === 'add' ? event : targetKey, action): void"],
|
106
|
+
getVisible: (form) => form.getValue('type') === 'editable-card',
|
107
|
+
},
|
59
108
|
{
|
60
109
|
name: 'tabBarExtraContent',
|
61
110
|
title: 'tab bar 上额外的元素',
|
@@ -13,7 +13,24 @@ exports.TreeSelect = {
|
|
13
13
|
childrenName: 'TreeNode',
|
14
14
|
relatedImports: ['TreeNode'],
|
15
15
|
props: [
|
16
|
-
...
|
16
|
+
// ...StylePrototypes,
|
17
|
+
{
|
18
|
+
name: 'style',
|
19
|
+
title: '样式对象',
|
20
|
+
setter: 'expressionSetter',
|
21
|
+
setterProps: {
|
22
|
+
expressionType: 'cssObject',
|
23
|
+
},
|
24
|
+
group: 'style',
|
25
|
+
initValue: '{{{width: "100%"}}}',
|
26
|
+
autoCompleteOptions: ['{}'],
|
27
|
+
},
|
28
|
+
{
|
29
|
+
name: 'className',
|
30
|
+
title: '自定义样式类名',
|
31
|
+
setter: 'classNameSetter',
|
32
|
+
group: 'style',
|
33
|
+
},
|
17
34
|
...common_1.InstancePrototypes,
|
18
35
|
{
|
19
36
|
name: 'treeData',
|
@@ -200,6 +217,19 @@ exports.TreeSelect = {
|
|
200
217
|
name: 'loadData',
|
201
218
|
title: '异步加载数据',
|
202
219
|
setter: 'expressionSetter',
|
220
|
+
autoCompleteOptions: [`({ id }) =>
|
221
|
+
new Promise((resolve) => {
|
222
|
+
setTimeout(() => {
|
223
|
+
this.setState({
|
224
|
+
treeData: this.state.treeData.concat([
|
225
|
+
genTreeNode(id, false),
|
226
|
+
genTreeNode(id, true),
|
227
|
+
genTreeNode(id, true),
|
228
|
+
]),
|
229
|
+
});
|
230
|
+
resolve(undefined);
|
231
|
+
}, 300);
|
232
|
+
})`]
|
203
233
|
},
|
204
234
|
{
|
205
235
|
name: 'maxTagCount',
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.has = exports.set = exports.get = void 0;
|
4
|
+
exports.uuid = uuid;
|
5
|
+
var lodash_1 = require("lodash");
|
6
|
+
Object.defineProperty(exports, "get", { enumerable: true, get: function () { return lodash_1.get; } });
|
7
|
+
Object.defineProperty(exports, "set", { enumerable: true, get: function () { return lodash_1.set; } });
|
8
|
+
Object.defineProperty(exports, "has", { enumerable: true, get: function () { return lodash_1.has; } });
|
9
|
+
// simple uuid
|
10
|
+
function uuid() {
|
11
|
+
return ((Math.random() * 1e6) >> 0).toString(36);
|
12
|
+
}
|
@@ -1,3 +1,29 @@
|
|
1
|
+
// import { defineComponent } from '@music163/tango-boot';
|
2
|
+
// import { Button as AntButton } from 'antd';
|
3
|
+
// import React from 'react';
|
4
|
+
// import SmileOutlined from '@ant-design/icons/SmileOutlined';
|
5
|
+
// import { Placeholder } from './placeholder';
|
6
|
+
// function ButtonDesigner({
|
7
|
+
// children,
|
8
|
+
// style,
|
9
|
+
// icon,
|
10
|
+
// ...rest
|
11
|
+
// }: any) {
|
12
|
+
// return (
|
13
|
+
// <AntButton {...rest} style={style} icon={icon || <SmileOutlined/>}/>
|
14
|
+
// );
|
15
|
+
// }
|
16
|
+
// export const Button = defineComponent(AntButton, {
|
17
|
+
// name: 'Button',
|
18
|
+
// designerConfig: {
|
19
|
+
// render({ designerProps, originalProps }) {
|
20
|
+
// return <ButtonDesigner {...designerProps} {...originalProps} />;
|
21
|
+
// },
|
22
|
+
// },
|
23
|
+
// });
|
24
|
+
// export const ButtonGroup = defineComponent(AntButton.Group, {
|
25
|
+
// name: 'ButtonGroup',
|
26
|
+
// });
|
1
27
|
import { defineComponent } from '@music163/tango-boot';
|
2
28
|
import { Button as AntButton } from 'antd';
|
3
29
|
export const Button = defineComponent(AntButton, {
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export declare const Cascader: React.ForwardRefExoticComponent<(Omit<Omit<import("rc-cascader").SingleCascaderProps<import("rc-cascader").DefaultOptionType>, "options" | "checkable"> & {
|
3
|
+
multiple?: false;
|
4
|
+
} & {
|
5
|
+
multiple?: boolean;
|
6
|
+
size?: import("antd/lib/button").ButtonSize;
|
7
|
+
disabled?: boolean;
|
8
|
+
bordered?: boolean;
|
9
|
+
placement?: import("antd/lib/_util/motion").SelectCommonPlacement;
|
10
|
+
suffixIcon?: React.ReactNode;
|
11
|
+
options?: (import("rc-cascader").DefaultOptionType | import("rc-cascader").BaseOptionType)[];
|
12
|
+
status?: import("antd/lib/_util/statusUtils").InputStatus;
|
13
|
+
dropdownClassName?: string;
|
14
|
+
} & {
|
15
|
+
children?: React.ReactNode | undefined;
|
16
|
+
} & {
|
17
|
+
ref?: React.Ref<import("antd/lib/cascader").CascaderRef> | undefined;
|
18
|
+
} & import("@music163/tango-boot").TangoComponentProps, "ref"> | Omit<Omit<import("rc-cascader").MultipleCascaderProps<import("rc-cascader").DefaultOptionType>, "options" | "checkable"> & {
|
19
|
+
multiple: true;
|
20
|
+
} & {
|
21
|
+
multiple?: boolean;
|
22
|
+
size?: import("antd/lib/button").ButtonSize;
|
23
|
+
disabled?: boolean;
|
24
|
+
bordered?: boolean;
|
25
|
+
placement?: import("antd/lib/_util/motion").SelectCommonPlacement;
|
26
|
+
suffixIcon?: React.ReactNode;
|
27
|
+
options?: (import("rc-cascader").DefaultOptionType | import("rc-cascader").BaseOptionType)[];
|
28
|
+
status?: import("antd/lib/_util/statusUtils").InputStatus;
|
29
|
+
dropdownClassName?: string;
|
30
|
+
} & {
|
31
|
+
children?: React.ReactNode | undefined;
|
32
|
+
} & {
|
33
|
+
ref?: React.Ref<import("antd/lib/cascader").CascaderRef> | undefined;
|
34
|
+
} & import("@music163/tango-boot").TangoComponentProps, "ref">) & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { __rest } from "tslib";
|
2
|
+
import { defineComponent } from '@music163/tango-boot';
|
3
|
+
import { Cascader as AntCascader } from 'antd';
|
4
|
+
import React from 'react';
|
5
|
+
function CascaderDesigner(_a) {
|
6
|
+
var { style, value } = _a, rest = __rest(_a, ["style", "value"]);
|
7
|
+
if (value && value.length > 0) {
|
8
|
+
return React.createElement(AntCascader, Object.assign({ value: value }, rest, { style: style }));
|
9
|
+
}
|
10
|
+
return (React.createElement(AntCascader, Object.assign({}, rest, { style: style })));
|
11
|
+
}
|
12
|
+
export const Cascader = defineComponent(AntCascader, {
|
13
|
+
name: 'Cascader',
|
14
|
+
designerConfig: {
|
15
|
+
render({ designerProps, originalProps, }) {
|
16
|
+
console.log("Cascader props:", designerProps, originalProps);
|
17
|
+
return React.createElement(CascaderDesigner, Object.assign({}, designerProps, originalProps));
|
18
|
+
},
|
19
|
+
},
|
20
|
+
});
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { CheckboxProps } from 'antd';
|
2
|
+
import React from 'react';
|
3
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps & React.RefAttributes<HTMLInputElement> & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|
4
|
+
export declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<Omit<import("antd/lib/checkbox").CheckboxGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
5
|
+
ref?: React.Ref<HTMLDivElement>;
|
6
|
+
} & import("@music163/tango-boot").TangoComponentProps, "ref"> & React.RefAttributes<unknown>>;
|