@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
@@ -55,7 +55,7 @@ export const Form = {
|
|
55
55
|
Submit
|
56
56
|
</Button>
|
57
57
|
</Form.Item>`,
|
58
|
-
relatedImports: ['FormItem', 'FormFooter', 'Button'],
|
58
|
+
relatedImports: ['FormItem', 'FormFooter', 'Button', 'Input'],
|
59
59
|
childrenName: ['FormItem', 'Fieldset', 'FormFooter'],
|
60
60
|
props: [
|
61
61
|
...StylePrototypes,
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// import { AntdIconSetter } from '../setters';
|
2
|
+
export const AntdIcon = {
|
3
|
+
title: '图标',
|
4
|
+
name: 'AntdIcon',
|
5
|
+
icon: 'icon-anniu',
|
6
|
+
type: 'element',
|
7
|
+
package: '@cuvp1225/antd',
|
8
|
+
props: [
|
9
|
+
{
|
10
|
+
name: 'type',
|
11
|
+
title: '图标',
|
12
|
+
setter: 'AntdIconSetter',
|
13
|
+
},
|
14
|
+
{
|
15
|
+
name: 'size',
|
16
|
+
title: '大小',
|
17
|
+
setter: 'NumberSetter',
|
18
|
+
defaultValue: 20,
|
19
|
+
},
|
20
|
+
{
|
21
|
+
name: 'color',
|
22
|
+
title: '颜色',
|
23
|
+
setter: 'ColorSetter',
|
24
|
+
},
|
25
|
+
{
|
26
|
+
name: 'rotate',
|
27
|
+
title: '旋转角度',
|
28
|
+
setter: 'NumberSetter',
|
29
|
+
defaultValue: 0,
|
30
|
+
},
|
31
|
+
{
|
32
|
+
name: 'spin',
|
33
|
+
title: '旋转动画',
|
34
|
+
setter: 'BooleanSetter',
|
35
|
+
defaultValue: false,
|
36
|
+
},
|
37
|
+
// {
|
38
|
+
// name: 'onClick',
|
39
|
+
// title: '点击回调',
|
40
|
+
// propType: 'func',
|
41
|
+
// },
|
42
|
+
],
|
43
|
+
};
|
@@ -3,11 +3,13 @@ import { Button as ButtonPrototype } from './button';
|
|
3
3
|
export const Popconfirm = {
|
4
4
|
name: 'Popconfirm',
|
5
5
|
title: '气泡确认框',
|
6
|
+
exportType: 'namedExport',
|
6
7
|
package: '@cuvp1225/antd',
|
7
8
|
icon: 'icon-qipaoqueren',
|
8
9
|
help: '点击元素,弹出气泡式的确认框',
|
9
|
-
type: '
|
10
|
+
type: 'container',
|
10
11
|
hasChildren: true,
|
12
|
+
siblingNames: ['Popconfirm'],
|
11
13
|
initChildren: '<Button children="删除" />',
|
12
14
|
relatedImports: ['Button'],
|
13
15
|
props: [
|
@@ -20,11 +20,27 @@ export const Radio = {
|
|
20
20
|
title: '选中',
|
21
21
|
setter: 'boolSetter',
|
22
22
|
},
|
23
|
-
{
|
24
|
-
|
25
|
-
|
23
|
+
// {
|
24
|
+
// name: 'radioGroup',
|
25
|
+
// title: '单选框组',
|
26
|
+
// setter: 'boolSetter',
|
27
|
+
// },
|
28
|
+
{
|
29
|
+
name: 'label',
|
30
|
+
title: '标签',
|
31
|
+
initValue: '单项1',
|
26
32
|
setter: 'textSetter',
|
27
33
|
},
|
34
|
+
{
|
35
|
+
name: 'optionType',
|
36
|
+
title: '选项类型',
|
37
|
+
setter: 'choiceSetter',
|
38
|
+
initValue: 'default',
|
39
|
+
options: [
|
40
|
+
{ label: '默认', value: 'default' },
|
41
|
+
{ label: '按钮类型', value: 'button' },
|
42
|
+
],
|
43
|
+
},
|
28
44
|
{
|
29
45
|
name: 'defaultChecked',
|
30
46
|
title: '初始选中',
|
@@ -141,7 +157,7 @@ export const RadioGroup = {
|
|
141
157
|
{ label: '按钮', value: 'button' },
|
142
158
|
],
|
143
159
|
},
|
144
|
-
group: '
|
160
|
+
group: 'basic',
|
145
161
|
},
|
146
162
|
{
|
147
163
|
name: 'size',
|
@@ -28,6 +28,7 @@ export const CommonPrototypes = [
|
|
28
28
|
setter: 'expressionSetter',
|
29
29
|
tip: '可通过model变量设置初始值',
|
30
30
|
group: 'basic',
|
31
|
+
initValue: [], // 默认值
|
31
32
|
},
|
32
33
|
{
|
33
34
|
name: 'width',
|
@@ -361,6 +362,13 @@ export const Select = {
|
|
361
362
|
setter: 'actionSetter',
|
362
363
|
group: 'event',
|
363
364
|
},
|
365
|
+
{
|
366
|
+
name: "style",
|
367
|
+
title: "样式",
|
368
|
+
setter: "styleSetter",
|
369
|
+
group: "style",
|
370
|
+
initValue: `{{{width: '100%'}}}`
|
371
|
+
},
|
364
372
|
{
|
365
373
|
name: 'dropdownClassName',
|
366
374
|
title: '下拉菜单className',
|
@@ -11,7 +11,24 @@ export const Steps = {
|
|
11
11
|
initChildren: '<StepsItem title="步骤1" /><StepsItem title="步骤2" />',
|
12
12
|
relatedImports: ['StepsItem'],
|
13
13
|
props: [
|
14
|
-
...StylePrototypes,
|
14
|
+
// ...StylePrototypes,
|
15
|
+
{
|
16
|
+
name: 'style',
|
17
|
+
title: '样式对象',
|
18
|
+
setter: 'expressionSetter',
|
19
|
+
setterProps: {
|
20
|
+
expressionType: 'cssObject',
|
21
|
+
},
|
22
|
+
group: 'style',
|
23
|
+
initValue: '{{{width: "100%"}}}',
|
24
|
+
autoCompleteOptions: ['{}'],
|
25
|
+
},
|
26
|
+
{
|
27
|
+
name: 'className',
|
28
|
+
title: '自定义样式类名',
|
29
|
+
setter: 'classNameSetter',
|
30
|
+
group: 'style',
|
31
|
+
},
|
15
32
|
{
|
16
33
|
name: 'initial',
|
17
34
|
title: '默认起始序号',
|
@@ -116,12 +133,21 @@ export const StepsItem = {
|
|
116
133
|
type: 'element',
|
117
134
|
props: [
|
118
135
|
...StylePrototypes,
|
119
|
-
{
|
120
|
-
|
136
|
+
{
|
137
|
+
name: 'title',
|
138
|
+
title: '标题',
|
139
|
+
setter: 'textSetter',
|
140
|
+
initValue: '步骤'
|
141
|
+
},
|
142
|
+
{
|
143
|
+
name: 'subTitle',
|
144
|
+
title: '子标题',
|
145
|
+
setter: 'textSetter',
|
146
|
+
},
|
121
147
|
{
|
122
148
|
name: 'description',
|
123
149
|
title: '步骤的详情描述',
|
124
|
-
setter: '
|
150
|
+
setter: 'textSetter',
|
125
151
|
},
|
126
152
|
{
|
127
153
|
name: 'status',
|
@@ -4,10 +4,10 @@ const renderChildrenOptions = [
|
|
4
4
|
{ label: '取消自定义', value: '' },
|
5
5
|
{
|
6
6
|
label: '自定义区域',
|
7
|
-
value: '
|
7
|
+
value: 'div',
|
8
8
|
//render: '{(record, index, indent, expanded) => <Box></Box>}',
|
9
|
-
render: '(record, index, indent, expanded) => <
|
10
|
-
relatedImports: ['
|
9
|
+
render: '(record, index, indent, expanded) => <div><Placeholder text="放置替换" /></div>',
|
10
|
+
relatedImports: ['div'],
|
11
11
|
},
|
12
12
|
];
|
13
13
|
export const Table = {
|
@@ -268,13 +268,13 @@ export const Table = {
|
|
268
268
|
{
|
269
269
|
name: 'x',
|
270
270
|
title: '横向滚动',
|
271
|
-
tip: "
|
271
|
+
tip: '可用于指定滚动区域的宽,可以设置为像素值如"2000px"或2000, 百分比如"80%" 和 "max-content"',
|
272
272
|
setter: 'expressionSetter',
|
273
273
|
},
|
274
274
|
{
|
275
275
|
name: 'y',
|
276
276
|
title: '纵向滚动',
|
277
|
-
tip: '
|
277
|
+
tip: '可用于指定滚动区域的高,可以设置为像素值如"150px"或150, 百分比如"100%" 和 "max-content"',
|
278
278
|
setter: 'expressionSetter',
|
279
279
|
},
|
280
280
|
],
|
@@ -7,16 +7,38 @@ export const Tabs = {
|
|
7
7
|
type: 'container',
|
8
8
|
package: '@cuvp1225/antd',
|
9
9
|
help: '提供平级的区域将大块内容进行收纳和展现,保持界面整洁',
|
10
|
-
hasChildren:
|
11
|
-
initChildren:
|
10
|
+
hasChildren: false,
|
11
|
+
initChildren: `<TabPane key="1" tab="选项卡1"><Placeholder text="放置替换" style={{ margin: "15px"}} /></TabPane><TabPane key="2" tab="选项卡2"><Placeholder text="放置替换" style={{ margin: "15px" }}/></TabPane>`,
|
12
12
|
childrenName: 'TabPane',
|
13
13
|
relatedImports: ['TabPane'],
|
14
14
|
props: [
|
15
15
|
...StylePrototypes,
|
16
|
+
{
|
17
|
+
name: 'items',
|
18
|
+
title: '标签项',
|
19
|
+
setter: 'tabPaneSetter',
|
20
|
+
initValue: [
|
21
|
+
{
|
22
|
+
key: '1',
|
23
|
+
label: '选项卡1',
|
24
|
+
forceRender: false,
|
25
|
+
disabled: false,
|
26
|
+
// children: '选项卡1',
|
27
|
+
},
|
28
|
+
{
|
29
|
+
key: '2',
|
30
|
+
label: '选项卡2',
|
31
|
+
forceRender: false,
|
32
|
+
disabled: false,
|
33
|
+
// children: '选项卡2',
|
34
|
+
},
|
35
|
+
]
|
36
|
+
},
|
16
37
|
{
|
17
38
|
name: 'defaultActiveKey',
|
18
39
|
title: '默认选中的面板',
|
19
40
|
setter: 'textSetter',
|
41
|
+
initValue: '1',
|
20
42
|
},
|
21
43
|
{
|
22
44
|
name: 'centered',
|
@@ -31,9 +53,20 @@ export const Tabs = {
|
|
31
53
|
{ label: '基本', value: 'line' },
|
32
54
|
{ label: '卡片', value: 'card' },
|
33
55
|
{ label: '可编辑卡片', value: 'editable-card' },
|
34
|
-
{ label: '胶囊', value: 'capsule' },
|
35
|
-
{ label: '文本', value: 'text' },
|
56
|
+
// { label: '胶囊', value: 'capsule' },
|
57
|
+
// { label: '文本', value: 'text' },
|
58
|
+
],
|
59
|
+
},
|
60
|
+
{
|
61
|
+
name: 'size',
|
62
|
+
title: '选项卡大小',
|
63
|
+
setter: 'choiceSetter',
|
64
|
+
options: [
|
65
|
+
{ label: '大', value: 'large' },
|
66
|
+
{ label: '中', value: 'middle' },
|
67
|
+
{ label: '小', value: 'small' },
|
36
68
|
],
|
69
|
+
tip: '提供large、middle和small三种大小',
|
37
70
|
},
|
38
71
|
{
|
39
72
|
name: 'tabPosition',
|
@@ -46,6 +79,13 @@ export const Tabs = {
|
|
46
79
|
{ label: '左', value: 'left' },
|
47
80
|
],
|
48
81
|
},
|
82
|
+
{
|
83
|
+
name: 'hideAdd',
|
84
|
+
title: '是否隐藏加号图标',
|
85
|
+
tip: '仅在选项卡类型为可编辑卡片时有效',
|
86
|
+
setter: 'boolSetter',
|
87
|
+
getVisible: (form) => form.getValue('type') === 'editable-card',
|
88
|
+
},
|
49
89
|
{
|
50
90
|
name: 'onChange',
|
51
91
|
title: '当面板切换时',
|
@@ -53,6 +93,15 @@ export const Tabs = {
|
|
53
93
|
group: 'event',
|
54
94
|
autoCompleteOptions: ['(activeKey)=>{}'],
|
55
95
|
},
|
96
|
+
{
|
97
|
+
name: 'onEdit',
|
98
|
+
title: '新增和删除页签的回调',
|
99
|
+
tip: '仅在选项卡类型为可编辑卡片时有效',
|
100
|
+
setter: 'expressionSetter',
|
101
|
+
group: 'event',
|
102
|
+
// autoCompleteOptions: ["(action === 'add' ? event : targetKey, action): void"],
|
103
|
+
getVisible: (form) => form.getValue('type') === 'editable-card',
|
104
|
+
},
|
56
105
|
{
|
57
106
|
name: 'tabBarExtraContent',
|
58
107
|
title: 'tab bar 上额外的元素',
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { InstancePrototypes
|
1
|
+
import { InstancePrototypes } from './common';
|
2
2
|
export const TreeSelect = {
|
3
3
|
name: 'TreeSelect',
|
4
4
|
title: '树选择',
|
@@ -10,7 +10,24 @@ export const TreeSelect = {
|
|
10
10
|
childrenName: 'TreeNode',
|
11
11
|
relatedImports: ['TreeNode'],
|
12
12
|
props: [
|
13
|
-
...StylePrototypes,
|
13
|
+
// ...StylePrototypes,
|
14
|
+
{
|
15
|
+
name: 'style',
|
16
|
+
title: '样式对象',
|
17
|
+
setter: 'expressionSetter',
|
18
|
+
setterProps: {
|
19
|
+
expressionType: 'cssObject',
|
20
|
+
},
|
21
|
+
group: 'style',
|
22
|
+
initValue: '{{{width: "100%"}}}',
|
23
|
+
autoCompleteOptions: ['{}'],
|
24
|
+
},
|
25
|
+
{
|
26
|
+
name: 'className',
|
27
|
+
title: '自定义样式类名',
|
28
|
+
setter: 'classNameSetter',
|
29
|
+
group: 'style',
|
30
|
+
},
|
14
31
|
...InstancePrototypes,
|
15
32
|
{
|
16
33
|
name: 'treeData',
|
@@ -197,6 +214,19 @@ export const TreeSelect = {
|
|
197
214
|
name: 'loadData',
|
198
215
|
title: '异步加载数据',
|
199
216
|
setter: 'expressionSetter',
|
217
|
+
autoCompleteOptions: [`({ id }) =>
|
218
|
+
new Promise((resolve) => {
|
219
|
+
setTimeout(() => {
|
220
|
+
this.setState({
|
221
|
+
treeData: this.state.treeData.concat([
|
222
|
+
genTreeNode(id, false),
|
223
|
+
genTreeNode(id, true),
|
224
|
+
genTreeNode(id, true),
|
225
|
+
]),
|
226
|
+
});
|
227
|
+
resolve(undefined);
|
228
|
+
}, 300);
|
229
|
+
})`]
|
200
230
|
},
|
201
231
|
{
|
202
232
|
name: 'maxTagCount',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cuvp1225/antd",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.60",
|
4
4
|
"description": "antd components for tango app",
|
5
5
|
"author": "wwsun <ww.sww@outlook.com>",
|
6
6
|
"homepage": "https://github.com/netease/tango-components#readme",
|
@@ -49,10 +49,10 @@
|
|
49
49
|
"@cuvp1225/formily": "^0.2.6",
|
50
50
|
"@cuvp1225/foundation": "^0.3.2",
|
51
51
|
"@music163/tango-boot": "^0.3.3",
|
52
|
-
"@music163/tango-helpers": "
|
52
|
+
"@music163/tango-helpers": "1.2.8",
|
53
53
|
"antd": "4",
|
54
54
|
"classnames": "^2.3.2",
|
55
55
|
"coral-system": "^1.0.6"
|
56
56
|
},
|
57
|
-
"gitHead": "
|
57
|
+
"gitHead": "95f84ca42d28407f52c08a5ec3046450c21cd520"
|
58
58
|
}
|