@pisell/materials 1.0.69 → 1.0.72
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/lowcode/affix/meta.ts +29 -29
- package/lowcode/alert/meta.ts +3 -0
- package/lowcode/anchor.link/meta.ts +1 -0
- package/lowcode/auto-complete/meta.ts +133 -133
- package/lowcode/avatar/meta.ts +51 -50
- package/lowcode/badge/meta.ts +67 -66
- package/lowcode/breadcrumb/meta.ts +2 -3
- package/lowcode/button/meta.ts +1 -1
- package/lowcode/calendar/meta.ts +92 -92
- package/lowcode/card/meta.ts +67 -65
- package/lowcode/carousel/meta.ts +110 -110
- package/lowcode/cascader/meta.ts +135 -135
- package/lowcode/checkbox/meta.ts +1 -1
- package/lowcode/checkbox.group/meta.ts +1 -0
- package/lowcode/collapse/meta.ts +172 -172
- package/lowcode/collapse.pane/meta.ts +1 -0
- package/lowcode/date-picker/meta.ts +1 -1
- package/lowcode/date-picker.range-picker/meta.ts +1 -1
- package/lowcode/descriptions/meta.ts +197 -193
- package/lowcode/descriptions.item/meta.ts +1 -0
- package/lowcode/divider/meta.ts +44 -44
- package/lowcode/drawer/meta.ts +1 -1
- package/lowcode/dropdown/meta.ts +104 -104
- package/lowcode/empty/meta.ts +1 -0
- package/lowcode/filter/meta.ts +5 -4
- package/lowcode/form.item/meta.ts +8 -5
- package/lowcode/image/meta.ts +1 -0
- package/lowcode/input/meta.ts +5 -1
- package/lowcode/input-number/meta.ts +104 -98
- package/lowcode/input.password/meta.ts +4 -1
- package/lowcode/input.search/meta.ts +99 -92
- package/lowcode/input.text-area/meta.ts +1 -1
- package/lowcode/menu/meta.ts +1 -1
- package/lowcode/menu/snippets.ts +1 -1
- package/lowcode/modal/meta.ts +137 -131
- package/lowcode/popconfirm/meta.ts +3 -4
- package/lowcode/popover/meta.ts +2 -2
- package/lowcode/radio/meta.ts +1 -1
- package/lowcode/rate/meta.ts +1 -0
- package/lowcode/select/meta.ts +3 -3
- package/lowcode/spin/meta.ts +1 -0
- package/lowcode/steps/meta.ts +3 -3
- package/lowcode/switch/meta.ts +2 -2
- package/lowcode/table/meta.ts +4 -4
- package/lowcode/tabs/meta.ts +1 -1
- package/lowcode/tag/meta.ts +1 -0
- package/lowcode/time-picker/meta.ts +1 -0
- package/lowcode/timeline/meta.ts +1 -1
- package/lowcode/tooltip/meta.ts +1 -1
- package/lowcode/transfer/meta.ts +3 -2
- package/lowcode/tree-select/meta.ts +1 -1
- package/lowcode/typography.link/meta.ts +3 -1
- package/lowcode/typography.paragraph/meta.ts +3 -1
- package/lowcode/typography.text/meta.ts +3 -1
- package/lowcode/typography.title/meta.ts +3 -1
- package/package.json +2 -2
package/lowcode/cascader/meta.ts
CHANGED
|
@@ -16,146 +16,146 @@ export default {
|
|
|
16
16
|
destructuring: true,
|
|
17
17
|
subName: "",
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
value: { type: 'oneOfType', value: ['string', 'number'] },
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'value',
|
|
31
|
-
title: { label: '当前选中项', tip: '当前选中项' },
|
|
32
|
-
propType: {
|
|
33
|
-
type: 'arrayOf',
|
|
34
|
-
value: { type: 'oneOfType', value: ['string', 'number'] },
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'options',
|
|
39
|
-
title: { label: '选项数据', tip: '可选项数据源' },
|
|
40
|
-
setter: 'JsonSetter',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'allowClear',
|
|
44
|
-
title: { label: '支持清除', tip: '是否允许清除' },
|
|
45
|
-
propType: 'bool',
|
|
46
|
-
defaultValue: true,
|
|
47
|
-
setter: 'BoolSetter'
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: 'autoFocus',
|
|
51
|
-
title: { label: '自动聚焦', tip: '自动获取焦点' },
|
|
52
|
-
propType: 'bool',
|
|
53
|
-
defaultValue: false,
|
|
54
|
-
setter: 'BoolSetter'
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'bordered',
|
|
58
|
-
title: { label: '显示边框', tip: '是否有边框' },
|
|
59
|
-
propType: 'bool',
|
|
60
|
-
defaultValue: true,
|
|
61
|
-
setter: 'BoolSetter'
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: 'changeOnSelect',
|
|
65
|
-
title: {
|
|
66
|
-
label: '点选触发',
|
|
67
|
-
tip: '点选每级菜单选项值都会触发onChange',
|
|
68
|
-
},
|
|
69
|
-
propType: 'bool',
|
|
70
|
-
defaultValue: false,
|
|
71
|
-
setter: 'BoolSetter'
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'defaultValue',
|
|
22
|
+
title: { label: '默认的选中项', tip: '默认的选中项' },
|
|
23
|
+
propType: {
|
|
24
|
+
type: 'arrayOf',
|
|
25
|
+
value: { type: 'oneOfType', value: ['string', 'number'] },
|
|
72
26
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
name: 'disabled',
|
|
81
|
-
title: { label: '是否禁用', tip: '是否为禁用状态' },
|
|
82
|
-
propType: 'bool',
|
|
83
|
-
defaultValue: false,
|
|
84
|
-
setter: 'BoolSetter'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: 'expandTrigger',
|
|
88
|
-
title: { label: '菜单触发方式', tip: '触发次级菜单的展开的方式' },
|
|
89
|
-
propType: { type: 'oneOf', value: ['click', 'hover'] },
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
name: 'notFoundContent',
|
|
93
|
-
title: { label: '无数据展示', tip: '无数据' },
|
|
94
|
-
propType: 'string',
|
|
95
|
-
setter: 'StringSetter'
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: 'placeholder',
|
|
99
|
-
title: { label: '输入框占位文本', tip: '输入框占位文本' },
|
|
100
|
-
propType: 'string',
|
|
101
|
-
setter: 'StringSetter'
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
name: 'placement',
|
|
105
|
-
title: { label: '浮层预设位置', tip: '浮层预设位置' },
|
|
106
|
-
propType: {
|
|
107
|
-
type: 'oneOf',
|
|
108
|
-
value: ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'],
|
|
109
|
-
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'value',
|
|
30
|
+
title: { label: '当前选中项', tip: '当前选中项' },
|
|
31
|
+
propType: {
|
|
32
|
+
type: 'arrayOf',
|
|
33
|
+
value: { type: 'oneOfType', value: ['string', 'number'] },
|
|
110
34
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'options',
|
|
38
|
+
title: { label: '选项数据', tip: '可选项数据源' },
|
|
39
|
+
setter: 'JsonSetter',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'allowClear',
|
|
43
|
+
title: { label: '支持清除', tip: '是否允许清除' },
|
|
44
|
+
propType: 'bool',
|
|
45
|
+
defaultValue: true,
|
|
46
|
+
setter: 'BoolSetter'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'autoFocus',
|
|
50
|
+
title: { label: '自动聚焦', tip: '自动获取焦点' },
|
|
51
|
+
propType: 'bool',
|
|
52
|
+
defaultValue: false,
|
|
53
|
+
setter: 'BoolSetter'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'bordered',
|
|
57
|
+
title: { label: '显示边框', tip: '是否有边框' },
|
|
58
|
+
propType: 'bool',
|
|
59
|
+
defaultValue: true,
|
|
60
|
+
setter: 'BoolSetter'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'changeOnSelect',
|
|
64
|
+
title: {
|
|
65
|
+
label: '点选触发',
|
|
66
|
+
tip: '点选每级菜单选项值都会触发onChange',
|
|
67
|
+
},
|
|
68
|
+
propType: 'bool',
|
|
69
|
+
defaultValue: false,
|
|
70
|
+
setter: 'BoolSetter'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'className',
|
|
74
|
+
title: { label: '自定义类名', tip: '自定义类名' },
|
|
75
|
+
propType: 'string',
|
|
76
|
+
setter: 'StringSetter'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'disabled',
|
|
80
|
+
title: { label: '是否禁用', tip: '是否为禁用状态' },
|
|
81
|
+
propType: 'bool',
|
|
82
|
+
defaultValue: false,
|
|
83
|
+
setter: 'BoolSetter'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'expandTrigger',
|
|
87
|
+
title: { label: '菜单触发方式', tip: '触发次级菜单的展开的方式' },
|
|
88
|
+
propType: { type: 'oneOf', value: ['click', 'hover'] },
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'notFoundContent',
|
|
92
|
+
title: { label: '无数据展示', tip: '无数据' },
|
|
93
|
+
propType: 'string',
|
|
94
|
+
setter: 'PisellI18nSetter'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'placeholder',
|
|
98
|
+
title: { label: '输入框占位文本', tip: '输入框占位文本' },
|
|
99
|
+
propType: 'string',
|
|
100
|
+
setter: 'PisellI18nSetter'
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'placement',
|
|
104
|
+
title: { label: '浮层预设位置', tip: '浮层预设位置' },
|
|
105
|
+
propType: {
|
|
106
|
+
type: 'oneOf',
|
|
107
|
+
value: ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'],
|
|
117
108
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'showSearch',
|
|
112
|
+
title: { label: '支持搜索', tip: '在选择框中显示搜索框' },
|
|
113
|
+
propType: 'bool',
|
|
114
|
+
defaultValue: false,
|
|
115
|
+
setter: 'BoolSetter'
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'size',
|
|
119
|
+
title: { label: '尺寸', tip: '输入框大小' },
|
|
120
|
+
propType: { type: 'oneOf', value: ['large', 'middle', 'small'] },
|
|
121
|
+
setter: {
|
|
122
|
+
componentName: 'SelectSetter',
|
|
123
|
+
props: {
|
|
124
|
+
options: [
|
|
125
|
+
{
|
|
126
|
+
title: '大',
|
|
127
|
+
value: 'large',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
title: '中',
|
|
131
|
+
value: 'middle',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: '小',
|
|
135
|
+
value: 'small',
|
|
136
|
+
},
|
|
137
|
+
],
|
|
140
138
|
},
|
|
141
|
-
defaultValue: 'middle',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
name: 'style',
|
|
145
|
-
title: { label: '自定义样式', tip: '自定义样式' },
|
|
146
|
-
propType: 'object',
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
name: 'onChange',
|
|
150
|
-
title: { label: '选择完成后的回调', tip: '选择完成后的回调' },
|
|
151
|
-
propType: 'func',
|
|
152
139
|
},
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
|
|
140
|
+
defaultValue: 'middle',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'style',
|
|
144
|
+
title: { label: '自定义样式', tip: '自定义样式' },
|
|
145
|
+
propType: 'object',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'onChange',
|
|
149
|
+
title: { label: '选择完成后的回调', tip: '选择完成后的回调' },
|
|
150
|
+
propType: 'func',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'onPopupVisibleChange',
|
|
154
|
+
title: { label: '显示/隐藏浮层的回调', tip: '显示/隐藏浮层的回调' },
|
|
155
|
+
propType: 'func',
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
configure: {
|
|
159
159
|
supports: {
|
|
160
160
|
style: true,
|
|
161
161
|
events: [
|
package/lowcode/checkbox/meta.ts
CHANGED
package/lowcode/collapse/meta.ts
CHANGED
|
@@ -18,193 +18,193 @@ export default {
|
|
|
18
18
|
destructuring: true,
|
|
19
19
|
subName: "",
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
value: ['-', 'header', 'disabled'],
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
// {
|
|
48
|
-
// name: 'expandIcon',
|
|
49
|
-
// title: { label: '自定义切换图标', tip: '自定义切换图标' },
|
|
50
|
-
// propType: 'func',
|
|
51
|
-
// },
|
|
52
|
-
{
|
|
53
|
-
name: 'expandIconPosition',
|
|
54
|
-
title: { label: '图标位置', tip: '设置图标位置' },
|
|
55
|
-
propType: { type: 'oneOf', value: ['left', 'right'] },
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: 'destroyInactivePanel',
|
|
59
|
-
title: { label: '隐藏时销毁', tip: '销毁折叠隐藏的面板' },
|
|
60
|
-
propType: 'bool',
|
|
61
|
-
defaultValue: false,
|
|
62
|
-
setter: 'BoolSetter',
|
|
63
|
-
supportVariable: true
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: 'ghost',
|
|
67
|
-
title: { label: '透明无边框', tip: '使折叠面板透明且无边框' },
|
|
68
|
-
propType: 'bool',
|
|
69
|
-
defaultValue: false,
|
|
70
|
-
setter: 'BoolSetter',
|
|
71
|
-
supportVariable: true
|
|
21
|
+
props: [
|
|
22
|
+
{
|
|
23
|
+
name: 'bordered',
|
|
24
|
+
title: { label: '显示边框', tip: '带边框风格的折叠面板' },
|
|
25
|
+
propType: 'bool',
|
|
26
|
+
defaultValue: true,
|
|
27
|
+
setter: 'BoolSetter',
|
|
28
|
+
supportVariable: true
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'accordion',
|
|
32
|
+
title: { label: '手风琴模式', tip: '手风琴模式' },
|
|
33
|
+
propType: 'bool',
|
|
34
|
+
defaultValue: false,
|
|
35
|
+
setter: 'BoolSetter',
|
|
36
|
+
supportVariable: true
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'collapsible',
|
|
40
|
+
title: '可折叠触发区域',
|
|
41
|
+
propType: {
|
|
42
|
+
type: 'oneOf',
|
|
43
|
+
value: ['-', 'header', 'disabled'],
|
|
72
44
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
45
|
+
},
|
|
46
|
+
// {
|
|
47
|
+
// name: 'expandIcon',
|
|
48
|
+
// title: { label: '自定义切换图标', tip: '自定义切换图标' },
|
|
49
|
+
// propType: 'func',
|
|
50
|
+
// },
|
|
51
|
+
{
|
|
52
|
+
name: 'expandIconPosition',
|
|
53
|
+
title: { label: '图标位置', tip: '设置图标位置' },
|
|
54
|
+
propType: { type: 'oneOf', value: ['left', 'right'] },
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'destroyInactivePanel',
|
|
58
|
+
title: { label: '隐藏时销毁', tip: '销毁折叠隐藏的面板' },
|
|
59
|
+
propType: 'bool',
|
|
60
|
+
defaultValue: false,
|
|
61
|
+
setter: 'BoolSetter',
|
|
62
|
+
supportVariable: true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'ghost',
|
|
66
|
+
title: { label: '透明无边框', tip: '使折叠面板透明且无边框' },
|
|
67
|
+
propType: 'bool',
|
|
68
|
+
defaultValue: false,
|
|
69
|
+
setter: 'BoolSetter',
|
|
70
|
+
supportVariable: true
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'collapses',
|
|
74
|
+
title: '折叠项',
|
|
75
|
+
setter: {
|
|
76
|
+
componentName: 'ArraySetter',
|
|
77
|
+
props: {
|
|
78
|
+
itemSetter: {
|
|
79
|
+
componentName: 'ObjectSetter',
|
|
80
|
+
props: {
|
|
81
|
+
config: {
|
|
82
|
+
items: [
|
|
83
|
+
{
|
|
84
|
+
name: 'key',
|
|
85
|
+
title: 'key',
|
|
86
|
+
setter: 'StringSetter',
|
|
87
|
+
initialValue: (val) => val || uuid()
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'header',
|
|
91
|
+
title: '面板头内容',
|
|
92
|
+
setter: 'PisellI18nSetter',
|
|
93
|
+
initialValue: '折叠项'
|
|
94
|
+
},
|
|
95
|
+
],
|
|
107
96
|
},
|
|
108
97
|
},
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
extraProps: {
|
|
112
|
-
getValue(target, fieldValue) {
|
|
113
|
-
console.log('getValue', target.node.children.length);
|
|
114
|
-
const map = target.node.children.map((child) => {
|
|
115
|
-
const key = child.getPropValue('key') ? String(child.getPropValue('key')) : child.id;
|
|
98
|
+
initialValue: () => {
|
|
116
99
|
return {
|
|
117
|
-
key,
|
|
118
|
-
header:
|
|
119
|
-
showArrow:
|
|
120
|
-
collapsible:
|
|
121
|
-
forceRender:
|
|
100
|
+
key: uuid(),
|
|
101
|
+
header: '折叠项',
|
|
102
|
+
showArrow: true,
|
|
103
|
+
collapsible: undefined,
|
|
104
|
+
forceRender: false,
|
|
122
105
|
};
|
|
123
|
-
}
|
|
124
|
-
return map;
|
|
106
|
+
},
|
|
125
107
|
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
extraProps: {
|
|
111
|
+
getValue(target, fieldValue) {
|
|
112
|
+
console.log('getValue', target.node.children.length);
|
|
113
|
+
const map = target.node.children.map((child) => {
|
|
114
|
+
const key = child.getPropValue('key') ? String(child.getPropValue('key')) : child.id;
|
|
115
|
+
return {
|
|
116
|
+
key,
|
|
117
|
+
header: child.getPropValue('header'),
|
|
118
|
+
showArrow: child.getPropValue('showArrow'),
|
|
119
|
+
collapsible: child.getPropValue('collapsible'),
|
|
120
|
+
forceRender: child.getPropValue('forceRender'),
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
return map;
|
|
124
|
+
},
|
|
125
|
+
setValue(target, value) {
|
|
126
|
+
const { node } = target;
|
|
127
|
+
const map = {};
|
|
129
128
|
|
|
130
|
-
|
|
129
|
+
// console.log('setValue',value);
|
|
131
130
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
if (!Array.isArray(value)) {
|
|
132
|
+
value = [];
|
|
133
|
+
}
|
|
134
|
+
value.forEach((item) => {
|
|
135
|
+
const tabItem = Object.assign({}, item);
|
|
136
|
+
map[item.key] = tabItem;
|
|
137
|
+
});
|
|
139
138
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
node.children.mergeChildren(
|
|
140
|
+
(child) => {
|
|
141
|
+
const key = String(child.getPropValue('key'));
|
|
142
|
+
if (Object.hasOwnProperty.call(map, key)) {
|
|
143
|
+
child.setPropValue('header', map[key].header);
|
|
144
|
+
child.setPropValue('showArrow', map[key].showArrow);
|
|
145
|
+
child.setPropValue('collapsible', map[key].collapsible);
|
|
146
|
+
child.setPropValue('forceRender', map[key].forceRender);
|
|
147
|
+
delete map[key];
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
return true;
|
|
151
|
+
},
|
|
152
|
+
() => {
|
|
153
|
+
const items = [];
|
|
154
|
+
for (const key in map) {
|
|
143
155
|
if (Object.hasOwnProperty.call(map, key)) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
delete map[key];
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
151
|
-
return true;
|
|
152
|
-
},
|
|
153
|
-
() => {
|
|
154
|
-
const items = [];
|
|
155
|
-
for (const key in map) {
|
|
156
|
-
if (Object.hasOwnProperty.call(map, key)) {
|
|
157
|
-
items.push({
|
|
158
|
-
componentName: 'Collapse.Panel',
|
|
159
|
-
props: map[key],
|
|
160
|
-
});
|
|
161
|
-
}
|
|
156
|
+
items.push({
|
|
157
|
+
componentName: 'Collapse.Panel',
|
|
158
|
+
props: map[key],
|
|
159
|
+
});
|
|
162
160
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
)
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
161
|
+
}
|
|
162
|
+
return items;
|
|
163
|
+
},
|
|
164
|
+
(child1, child2) => {
|
|
165
|
+
const a = value.findIndex(
|
|
166
|
+
(item) => String(item.key) === String(child1.getPropValue('key')),
|
|
167
|
+
);
|
|
168
|
+
const b = value.findIndex(
|
|
169
|
+
(item) => String(item.key) === String(child2.getPropValue('key')),
|
|
170
|
+
);
|
|
171
|
+
return a - b;
|
|
172
|
+
},
|
|
173
|
+
);
|
|
176
174
|
},
|
|
177
175
|
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'defaultActiveKey',
|
|
179
|
+
title: { label: '初始化选中面板的 key', tip: '初始化选中面板的 key' },
|
|
180
|
+
propType: {
|
|
181
|
+
type: 'oneOfType',
|
|
182
|
+
value: [
|
|
183
|
+
'string',
|
|
184
|
+
{ type: 'arrayOf', value: 'string' },
|
|
185
|
+
'number',
|
|
186
|
+
{ type: 'arrayOf', value: 'number' },
|
|
187
|
+
],
|
|
190
188
|
},
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: 'activeKey',
|
|
192
|
+
title: {
|
|
193
|
+
label: '当前激活 tab 面板的 key',
|
|
194
|
+
tip: '当前激活 tab 面板的 key',
|
|
195
|
+
},
|
|
196
|
+
propType: {
|
|
197
|
+
type: 'oneOfType',
|
|
198
|
+
value: [
|
|
199
|
+
'string',
|
|
200
|
+
{ type: 'arrayOf', value: 'string' },
|
|
201
|
+
'number',
|
|
202
|
+
{ type: 'arrayOf', value: 'number' },
|
|
203
|
+
],
|
|
206
204
|
},
|
|
207
|
-
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
configure: {
|
|
208
208
|
supports: {
|
|
209
209
|
style: true,
|
|
210
210
|
events: [
|