@a2simcode/ui 0.0.163 → 0.0.165
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/components/input-layer/index.d.ts +2 -2
- package/dist/components/input-layer/src/input-layer.vue.d.ts +2 -2
- package/dist/components/tree/index.d.ts +0 -54
- package/dist/components/tree/src/tree.vue.d.ts +0 -57
- package/dist/core/index.d.ts +0 -1
- package/dist/simcode-ui.es.js +4926 -5048
- package/dist/simcode-ui.umd.js +2 -2
- package/dist/stats.html +1 -1
- package/dist/ui.css +1 -1
- package/docs/components/meta/tree.ts +219 -242
- package/docs/examples/form/basic.vue +30 -3
- package/package.json +1 -1
|
@@ -1,242 +1,219 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
"props": [
|
|
3
|
-
{
|
|
4
|
-
"name": "loadData",
|
|
5
|
-
"description": "加载数据方法",
|
|
6
|
-
"type": "func"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"name": "afterLoadData",
|
|
10
|
-
"description": "加载数据后",
|
|
11
|
-
"type": "func"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"name": "click",
|
|
15
|
-
"description": "点击方法",
|
|
16
|
-
"type": "func"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "immediate",
|
|
20
|
-
"description": "是否立即执行加载数据",
|
|
21
|
-
"type": "boolean",
|
|
22
|
-
"default": "true"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "defaultExpandAll",
|
|
26
|
-
"description": "是否全部展开",
|
|
27
|
-
"type": "boolean",
|
|
28
|
-
"default": "true"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "defaultCheckedKeys",
|
|
32
|
-
"description": "默认选中",
|
|
33
|
-
"type": "any[]",
|
|
34
|
-
"default": "() => []"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"name": "defaultExpandedKeys",
|
|
38
|
-
"description": "默认展开",
|
|
39
|
-
"type": "any[]",
|
|
40
|
-
"default": "() => []"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "accordion",
|
|
44
|
-
"description": "是否每次只打开一个同级树节点展开",
|
|
45
|
-
"type": "boolean",
|
|
46
|
-
"default": "false"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"name": "highlightCurrent",
|
|
50
|
-
"description": "是否高亮当前选中节点",
|
|
51
|
-
"type": "boolean",
|
|
52
|
-
"default": "true"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "filterNode",
|
|
56
|
-
"description": "过滤树节点函数",
|
|
57
|
-
"type": "func"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"name": "renderAfterExpand",
|
|
61
|
-
"description": "是否在展开节点后渲染",
|
|
62
|
-
"type": "boolean",
|
|
63
|
-
"default": "true"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"name": "
|
|
67
|
-
"description": "
|
|
68
|
-
"type": "string",
|
|
69
|
-
"default": "'
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"name": "
|
|
73
|
-
"description": "
|
|
74
|
-
"type": "string",
|
|
75
|
-
"default": "'
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "
|
|
79
|
-
"description": "
|
|
80
|
-
"type": "
|
|
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
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"name": "
|
|
122
|
-
"description": "
|
|
123
|
-
"type": "
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"name": "
|
|
133
|
-
"description": "
|
|
134
|
-
"type": "string",
|
|
135
|
-
"default": "''"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"name": "
|
|
139
|
-
"description": "
|
|
140
|
-
"type": "string",
|
|
141
|
-
"default": "''"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"name": "
|
|
145
|
-
"description": "
|
|
146
|
-
"type": "
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"name": "
|
|
173
|
-
"description": "
|
|
174
|
-
"type": "
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
"
|
|
179
|
-
"
|
|
180
|
-
"
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
"
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
"
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
"
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
{
|
|
208
|
-
"name": "
|
|
209
|
-
"description": "",
|
|
210
|
-
"type": "
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
{
|
|
221
|
-
"name": "setValue",
|
|
222
|
-
"description": "",
|
|
223
|
-
"type": "() => void"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"name": "getValue",
|
|
227
|
-
"description": "",
|
|
228
|
-
"type": "() => void"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"name": "setCheck",
|
|
232
|
-
"description": "",
|
|
233
|
-
"type": "() => void"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"name": "getCheck",
|
|
237
|
-
"description": "",
|
|
238
|
-
"type": "() => void"
|
|
239
|
-
}
|
|
240
|
-
],
|
|
241
|
-
"types": []
|
|
242
|
-
}
|
|
1
|
+
export default {
|
|
2
|
+
"props": [
|
|
3
|
+
{
|
|
4
|
+
"name": "loadData",
|
|
5
|
+
"description": "加载数据方法",
|
|
6
|
+
"type": "func"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"name": "afterLoadData",
|
|
10
|
+
"description": "加载数据后",
|
|
11
|
+
"type": "func"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "click",
|
|
15
|
+
"description": "点击方法",
|
|
16
|
+
"type": "func"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "immediate",
|
|
20
|
+
"description": "是否立即执行加载数据",
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": "true"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "defaultExpandAll",
|
|
26
|
+
"description": "是否全部展开",
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"default": "true"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "defaultCheckedKeys",
|
|
32
|
+
"description": "默认选中",
|
|
33
|
+
"type": "any[]",
|
|
34
|
+
"default": "() => []"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "defaultExpandedKeys",
|
|
38
|
+
"description": "默认展开",
|
|
39
|
+
"type": "any[]",
|
|
40
|
+
"default": "() => []"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "accordion",
|
|
44
|
+
"description": "是否每次只打开一个同级树节点展开",
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"default": "false"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "highlightCurrent",
|
|
50
|
+
"description": "是否高亮当前选中节点",
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"default": "true"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "filterNode",
|
|
56
|
+
"description": "过滤树节点函数",
|
|
57
|
+
"type": "func"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "renderAfterExpand",
|
|
61
|
+
"description": "是否在展开节点后渲染",
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"default": "true"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "iconKey",
|
|
67
|
+
"description": "图标字段",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"default": "'nodeIcon'"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "iconColorKey",
|
|
73
|
+
"description": "图标颜色字段",
|
|
74
|
+
"type": "string",
|
|
75
|
+
"default": "'nodeIconColor'"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "list",
|
|
79
|
+
"description": "数据",
|
|
80
|
+
"type": "any[]"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "dataType",
|
|
84
|
+
"description": "数据类型",
|
|
85
|
+
"type": "string"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "dataCode",
|
|
89
|
+
"description": "数据编码",
|
|
90
|
+
"type": "string"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "checkable",
|
|
94
|
+
"description": "是否可选择",
|
|
95
|
+
"type": "boolean"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "check",
|
|
99
|
+
"description": "勾选方法",
|
|
100
|
+
"type": "func"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "emptyDes",
|
|
104
|
+
"description": "空状态数据描述",
|
|
105
|
+
"type": "string",
|
|
106
|
+
"default": "'暂无数据'"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "defaultIcon",
|
|
110
|
+
"description": "设置该组件的默认图标(优先使用节点数据中自定义的图标)",
|
|
111
|
+
"type": "string",
|
|
112
|
+
"default": "''"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "defaultIconColor",
|
|
116
|
+
"description": "设置该组件的默认图标颜色(优先使用节点数据中自定义的图标颜色)",
|
|
117
|
+
"type": "string",
|
|
118
|
+
"default": "''"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "treeButtons",
|
|
122
|
+
"description": "树按钮(右击显示)",
|
|
123
|
+
"type": "ButtonCompType[]",
|
|
124
|
+
"default": "() => []"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "filterButton",
|
|
128
|
+
"description": "过滤按钮",
|
|
129
|
+
"type": "func"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "buttonDefaultIcon",
|
|
133
|
+
"description": "树按钮默认图标",
|
|
134
|
+
"type": "string",
|
|
135
|
+
"default": "''"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "buttonIconColor",
|
|
139
|
+
"description": "树按钮图标默认颜色",
|
|
140
|
+
"type": "string",
|
|
141
|
+
"default": "''"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "runFlow",
|
|
145
|
+
"description": "执行事件编排方法",
|
|
146
|
+
"type": "func"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "nodeClickFlow",
|
|
150
|
+
"description": "事件编排",
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "isHeightAuto",
|
|
155
|
+
"description": "是否根据高度自动调整(关闭虚拟滚动)",
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"default": "false"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "theme",
|
|
161
|
+
"description": "主题 default | menu",
|
|
162
|
+
"type": "string",
|
|
163
|
+
"default": "'default'"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "draggable",
|
|
167
|
+
"description": "是否可拖拽",
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"default": "false"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "expandOnClickNode",
|
|
173
|
+
"description": "是否在点击节点的时候展开或者收缩节点, 默认值为 false,则只有点箭头图标的时候才会展开或者收缩节点。",
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"default": "false"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "allowDrop",
|
|
179
|
+
"description": "允许放置的节点",
|
|
180
|
+
"type": "func"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"events": [
|
|
184
|
+
{
|
|
185
|
+
"name": "node-drop",
|
|
186
|
+
"description": "",
|
|
187
|
+
"type": "unknown"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"slots": [],
|
|
191
|
+
"methods": [
|
|
192
|
+
{
|
|
193
|
+
"name": "refreshData",
|
|
194
|
+
"description": "",
|
|
195
|
+
"type": "async () => Promise<any>"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "setValue",
|
|
199
|
+
"description": "",
|
|
200
|
+
"type": "() => void"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "getValue",
|
|
204
|
+
"description": "",
|
|
205
|
+
"type": "() => void"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "setCheck",
|
|
209
|
+
"description": "",
|
|
210
|
+
"type": "() => void"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"name": "getCheck",
|
|
214
|
+
"description": "",
|
|
215
|
+
"type": "() => void"
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"types": []
|
|
219
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<j-form ref="formRef" :schema="schema" :config="formConfig" @change="handleChange"/>
|
|
3
|
+
<j-form ref="formRef" :schema="schema" :config="formConfig" @change="handleChange" />
|
|
4
4
|
<div style="margin-top: 16px; padding-left: 100px">
|
|
5
5
|
<j-button type="primary" label="提交" @click="handleSubmit"></j-button>
|
|
6
6
|
<j-button style="margin-left: 8px" label="重置" @click="handleReset"></j-button>
|
|
@@ -308,7 +308,7 @@ const schema = [
|
|
|
308
308
|
],
|
|
309
309
|
getCompConfig: (data) => {
|
|
310
310
|
return {
|
|
311
|
-
display: !(data.formData.radio === '1')
|
|
311
|
+
display: !(data.formData.radio === '1'),
|
|
312
312
|
}
|
|
313
313
|
},
|
|
314
314
|
},
|
|
@@ -447,6 +447,33 @@ const schema = [
|
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
},
|
|
450
|
+
{
|
|
451
|
+
id: 'moreConfig',
|
|
452
|
+
type: 'j-layer-form',
|
|
453
|
+
config: {
|
|
454
|
+
icon: 'mdi:settings-outline',
|
|
455
|
+
formConfig: {
|
|
456
|
+
size: 'small',
|
|
457
|
+
labelWidth: 80,
|
|
458
|
+
labelPosition: 'left',
|
|
459
|
+
},
|
|
460
|
+
defaultValue: {},
|
|
461
|
+
},
|
|
462
|
+
children: [
|
|
463
|
+
{
|
|
464
|
+
id: 'width',
|
|
465
|
+
type: 'j-number',
|
|
466
|
+
config: {
|
|
467
|
+
label: '宽度',
|
|
468
|
+
placeholder: '请输入',
|
|
469
|
+
},
|
|
470
|
+
getCompConfig: ({ row }) => {
|
|
471
|
+
console.log(row, 'getCompConfig-row')
|
|
472
|
+
return {}
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
],
|
|
476
|
+
},
|
|
450
477
|
],
|
|
451
478
|
},
|
|
452
479
|
],
|
|
@@ -514,7 +541,7 @@ const schema = [
|
|
|
514
541
|
// }
|
|
515
542
|
// }
|
|
516
543
|
},
|
|
517
|
-
]
|
|
544
|
+
]
|
|
518
545
|
|
|
519
546
|
const handleChange = (component, data) => {
|
|
520
547
|
console.log(component, data, 'change')
|