@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.
@@ -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": "labelKey",
67
- "description": "显示字段",
68
- "type": "string",
69
- "default": "'label'"
70
- },
71
- {
72
- "name": "valueKey",
73
- "description": "值字段",
74
- "type": "string",
75
- "default": "'value'"
76
- },
77
- {
78
- "name": "pidKey",
79
- "description": "父级字段",
80
- "type": "string",
81
- "default": "'pid'"
82
- },
83
- {
84
- "name": "idKey",
85
- "description": "id字段",
86
- "type": "string"
87
- },
88
- {
89
- "name": "iconKey",
90
- "description": "图标字段",
91
- "type": "string",
92
- "default": "'nodeIcon'"
93
- },
94
- {
95
- "name": "iconColorKey",
96
- "description": "图标颜色字段",
97
- "type": "string",
98
- "default": "'nodeIconColor'"
99
- },
100
- {
101
- "name": "list",
102
- "description": "数据",
103
- "type": "any[]"
104
- },
105
- {
106
- "name": "dataType",
107
- "description": "数据类型",
108
- "type": "string"
109
- },
110
- {
111
- "name": "dataCode",
112
- "description": "数据编码",
113
- "type": "string"
114
- },
115
- {
116
- "name": "checkable",
117
- "description": "是否可选择",
118
- "type": "boolean"
119
- },
120
- {
121
- "name": "check",
122
- "description": "勾选方法",
123
- "type": "func"
124
- },
125
- {
126
- "name": "emptyDes",
127
- "description": "空状态数据描述",
128
- "type": "string",
129
- "default": "'暂无数据'"
130
- },
131
- {
132
- "name": "defaultIcon",
133
- "description": "设置该组件的默认图标(优先使用节点数据中自定义的图标)",
134
- "type": "string",
135
- "default": "''"
136
- },
137
- {
138
- "name": "defaultIconColor",
139
- "description": "设置该组件的默认图标颜色(优先使用节点数据中自定义的图标颜色)",
140
- "type": "string",
141
- "default": "''"
142
- },
143
- {
144
- "name": "treeButtons",
145
- "description": "树按钮(右击显示)",
146
- "type": "ButtonCompType[]",
147
- "default": "() => []"
148
- },
149
- {
150
- "name": "filterButton",
151
- "description": "过滤按钮",
152
- "type": "func"
153
- },
154
- {
155
- "name": "buttonDefaultIcon",
156
- "description": "树按钮默认图标",
157
- "type": "string",
158
- "default": "''"
159
- },
160
- {
161
- "name": "buttonIconColor",
162
- "description": "树按钮图标默认颜色",
163
- "type": "string",
164
- "default": "''"
165
- },
166
- {
167
- "name": "runFlow",
168
- "description": "执行事件编排方法",
169
- "type": "func"
170
- },
171
- {
172
- "name": "nodeClickFlow",
173
- "description": "事件编排",
174
- "type": "string"
175
- },
176
- {
177
- "name": "isHeightAuto",
178
- "description": "是否根据高度自动调整(关闭虚拟滚动)",
179
- "type": "boolean",
180
- "default": "false"
181
- },
182
- {
183
- "name": "theme",
184
- "description": "主题 default | menu",
185
- "type": "string",
186
- "default": "'default'"
187
- },
188
- {
189
- "name": "draggable",
190
- "description": "是否可拖拽",
191
- "type": "boolean",
192
- "default": "false"
193
- },
194
- {
195
- "name": "expandOnClickNode",
196
- "description": "是否在点击节点的时候展开或者收缩节点, 默认值为 false,则只有点箭头图标的时候才会展开或者收缩节点。",
197
- "type": "boolean",
198
- "default": "false"
199
- },
200
- {
201
- "name": "allowDrop",
202
- "description": "允许放置的节点",
203
- "type": "func"
204
- }
205
- ],
206
- "events": [
207
- {
208
- "name": "node-drop",
209
- "description": "",
210
- "type": "unknown"
211
- }
212
- ],
213
- "slots": [],
214
- "methods": [
215
- {
216
- "name": "refreshData",
217
- "description": "",
218
- "type": "async () => Promise<any>"
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')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a2simcode/ui",
3
- "version": "0.0.163",
3
+ "version": "0.0.165",
4
4
  "description": "A Vue 3 UI Component Library",
5
5
  "type": "module",
6
6
  "main": "./dist/simcode-ui.umd.js",