@cuvp1225/antd 0.2.57 → 0.2.59
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 +1966 -171
- package/dist/index.js +2048 -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 -3
- package/lib/cjs/components/index.js +18 -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/row.d.ts +1 -1
- package/lib/cjs/components/row.js +3 -3
- 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/divider.js +6 -1
- 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/row.d.ts +1 -1
- package/lib/cjs/prototypes/row.js +4 -4
- package/lib/cjs/prototypes/select.js +8 -0
- package/lib/cjs/prototypes/space.js +6 -1
- package/lib/cjs/prototypes/spin.js +9 -3
- 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/prototypes/typography.js +5 -5
- 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 -3
- 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/row.d.ts +1 -1
- package/lib/esm/components/row.js +2 -2
- 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/divider.js +6 -1
- 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/row.d.ts +1 -1
- package/lib/esm/prototypes/row.js +3 -3
- package/lib/esm/prototypes/select.js +8 -0
- package/lib/esm/prototypes/space.js +6 -1
- package/lib/esm/prototypes/spin.js +9 -3
- 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/prototypes/typography.js +5 -5
- package/lib/esm/utils/utils.d.ts +2 -0
- package/lib/esm/utils/utils.js +5 -0
- package/package.json +3 -3
@@ -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',
|
@@ -130,11 +130,11 @@ export const Title = {
|
|
130
130
|
title: '标题级别',
|
131
131
|
setter: 'pickerSetter',
|
132
132
|
options: [
|
133
|
-
{ label: 'h1', value:
|
134
|
-
{ label: 'h2', value:
|
135
|
-
{ label: 'h3', value:
|
136
|
-
{ label: 'h4', value:
|
137
|
-
{ label: 'h5', value:
|
133
|
+
{ label: 'h1', value: 1 },
|
134
|
+
{ label: 'h2', value: 2 },
|
135
|
+
{ label: 'h3', value: 3 },
|
136
|
+
{ label: 'h4', value: 4 },
|
137
|
+
{ label: 'h5', value: 5 },
|
138
138
|
],
|
139
139
|
tip: '数字越小,级别越大',
|
140
140
|
},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cuvp1225/antd",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.59",
|
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": "68716a436bd75f6a016f07ac05ca390d0284af0b"
|
58
58
|
}
|