@a2simcode/ui 0.0.240 → 0.0.242

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,403 +1,409 @@
1
- export default {
2
- "props": [
3
- {
4
- "name": "id",
5
- "description": "",
6
- "type": "string",
7
- "default": "''"
8
- },
9
- {
10
- "name": "modelValue",
11
- "description": "输入值【作为表单的编辑表格使用】",
12
- "type": "Record<string, any>[]",
13
- "default": "() => []"
14
- },
15
- {
16
- "name": "columns",
17
- "description": "表格列配置(支持树形结构)",
18
- "type": "ColumnSchemaConfig[]",
19
- "default": "() => []"
20
- },
21
- {
22
- "name": "records",
23
- "description": "表格数据",
24
- "type": "Record<string, any>[]",
25
- "default": "() => []"
26
- },
27
- {
28
- "name": "isTree",
29
- "description": "是否是树形结构",
30
- "type": "boolean",
31
- "default": "false"
32
- },
33
- {
34
- "name": "defaultExpandAll",
35
- "description": "是否默认全部展开(仅 isTree 为 true 且非懒加载时生效)",
36
- "type": "boolean",
37
- "default": "false"
38
- },
39
- {
40
- "name": "parentKey",
41
- "description": "父级字段名(isTree 为 true 时用于将扁平数据转换成树形数据)",
42
- "type": "string",
43
- "default": "''"
44
- },
45
- {
46
- "name": "isShowNumber",
47
- "description": "是否显示序号",
48
- "type": "boolean",
49
- "default": "true"
50
- },
51
- {
52
- "name": "isMultiple",
53
- "description": "是否开启多选",
54
- "type": "boolean",
55
- "default": "false"
56
- },
57
- {
58
- "name": "selectStateKey",
59
- "description": "选状态字段名",
60
- "type": "string",
61
- "default": "''"
62
- },
63
- {
64
- "name": "multipleDisabled",
65
- "description": "多选禁用判断",
66
- "type": "(record: Record<string, any>) => boolean",
67
- "default": "null"
68
- },
69
- {
70
- "name": "isPage",
71
- "description": "是否分页",
72
- "type": "boolean",
73
- "default": "false"
74
- },
75
- {
76
- "name": "pageLayoutSimple",
77
- "description": "分页样式是否是简洁模式",
78
- "type": "boolean",
79
- "default": "false"
80
- },
81
- {
82
- "name": "pageSizes",
83
- "description": "每页显示个数选择器的选项设置",
84
- "type": "array"
85
- },
86
- {
87
- "name": "pageTotal",
88
- "description": "总的数据条数",
89
- "type": "number",
90
- "default": "0"
91
- },
92
- {
93
- "name": "tablePage",
94
- "description": "当前页面",
95
- "type": "number",
96
- "default": "1"
97
- },
98
- {
99
- "name": "pageSize",
100
- "description": "当前显示页数",
101
- "type": "number",
102
- "default": "100"
103
- },
104
- {
105
- "name": "rowKey",
106
- "description": "行主键",
107
- "type": "string",
108
- "default": "'id'"
109
- },
110
- {
111
- "name": "rowDrag",
112
- "description": "是否支持行拖动排序",
113
- "type": "boolean",
114
- "default": "false"
115
- },
116
- {
117
- "name": "actions",
118
- "description": "行内操作按钮配置",
119
- "type": "ButtonCompType[]",
120
- "default": "() => []"
121
- },
122
- {
123
- "name": "actionFilter",
124
- "description": "行内操作按钮过滤方法",
125
- "type": "(params: {\n action: ButtonCompType\n record: Record<string, any>\n recordIndex: number\n col: number\n row: number\n table: any\n}) =>\n | boolean\n | {\n display?: boolean\n disabled?: boolean\n }\n | null\n | undefined",
126
- "default": "null"
127
- },
128
- {
129
- "name": "actionsMaxCount",
130
- "description": "操作列最大显示按钮数量",
131
- "type": "number",
132
- "default": "3"
133
- },
134
- {
135
- "name": "actionsLabel",
136
- "description": "操作列标题",
137
- "type": "string",
138
- "default": "'操作'"
139
- },
140
- {
141
- "name": "isAnimationAppear",
142
- "description": "是否开启动画出现",
143
- "type": "boolean",
144
- "default": "false"
145
- },
146
- {
147
- "name": "heightMode",
148
- "description": "高度模式 full 充满父容器 auto 根据内容自适应",
149
- "type": "'full' | 'auto'",
150
- "default": "'full'"
151
- },
152
- {
153
- "name": "maxHeight",
154
- "description": "最大高度,仅在 heightMode auto 时生效",
155
- "type": "string|number",
156
- "default": "undefined"
157
- },
158
- {
159
- "name": "highlightMode",
160
- "description": "高亮模式 cross 十字 row 行 column 列 cell 单元格",
161
- "type": "'cross' | 'row' | 'column' | 'cell'",
162
- "default": "'row'"
163
- },
164
- {
165
- "name": "editConfig",
166
- "description": "编辑参数",
167
- "type": "EditConfigType",
168
- "default": "() => ({})"
169
- },
170
- {
171
- "name": "emptyTipText",
172
- "description": "空数据提示文本",
173
- "type": "string",
174
- "default": "'暂无数据'"
175
- },
176
- {
177
- "name": "subColumns",
178
- "description": "子表列配置",
179
- "type": "any[]",
180
- "default": "() => []"
181
- },
182
- {
183
- "name": "isSubShowNumber",
184
- "description": "是否显示子表序号",
185
- "type": "boolean",
186
- "default": "true"
187
- },
188
- {
189
- "name": "subActions",
190
- "description": "子表行内操作按钮配置",
191
- "type": "ButtonCompType[]",
192
- "default": "() => []"
193
- },
194
- {
195
- "name": "loadChildren",
196
- "description": "懒加载子节点数据",
197
- "type": "(record: Record<string, any>) => Promise<any[]>",
198
- "default": "null"
199
- }
200
- ],
201
- "events": [
202
- {
203
- "name": "ready",
204
- "description": "表格实例创建完成时触发",
205
- "type": "any"
206
- },
207
- {
208
- "name": "selectionChanged",
209
- "description": "选中数据变化时触发",
210
- "type": "{\n isMultiple: boolean\n selections: Record<string, any>[]\n record: Record<string, any>\n checked: boolean\n}"
211
- },
212
- {
213
- "name": "selectRecordsChanged",
214
- "description": "根据 selectStateKey 初始化多选选中项时触发",
215
- "type": "Array"
216
- },
217
- {
218
- "name": "update:tablePage",
219
- "description": "",
220
- "type": "number"
221
- },
222
- {
223
- "name": "update:pageSize",
224
- "description": "",
225
- "type": "number"
226
- },
227
- {
228
- "name": "loadPageData",
229
- "description": "当前页面",
230
- "type": "{ rows: number; page: number }"
231
- },
232
- {
233
- "name": "rowChange",
234
- "description": "行数据变化",
235
- "type": "Record"
236
- },
237
- {
238
- "name": "update:modelValue",
239
- "description": "v-model 双向绑定更新事件",
240
- "type": "Array"
241
- },
242
- {
243
- "name": "change",
244
- "description": "变更事件",
245
- "type": "{\n id: string\n value: any\n data: any\n formData: Record<string, any>\n tableData: Record<string, any>[]\n type: 'add' | 'delete' | 'update' | 'sort'\n}"
246
- }
247
- ],
248
- "slots": [],
249
- "methods": [
250
- {
251
- "name": "getInstance",
252
- "description": "输入值【作为表单的编辑表格使用】",
253
- "type": "() => void"
254
- },
255
- {
256
- "name": "setRecords",
257
- "description": "输入值【作为表单的编辑表格使用】",
258
- "type": "() => void"
259
- },
260
- {
261
- "name": "getRecords",
262
- "description": "",
263
- "type": "() => void"
264
- },
265
- {
266
- "name": "getSelection",
267
- "description": "输入值【作为表单的编辑表格使用】",
268
- "type": "() => void"
269
- },
270
- {
271
- "name": "setSelection",
272
- "description": "输入值【作为表单的编辑表格使用】",
273
- "type": "() => void"
274
- },
275
- {
276
- "name": "renderTable",
277
- "description": "",
278
- "type": "() => void"
279
- }
280
- ],
281
- "types": [
282
- {
283
- "name": "TableColumnConfig",
284
- "properties": [
285
- {
286
- "name": "width",
287
- "type": "number",
288
- "description": "列的宽度"
289
- },
290
- {
291
- "name": "minWidth",
292
- "type": "number",
293
- "description": "列的最小宽度"
294
- },
295
- {
296
- "name": "maxWidth",
297
- "type": "number",
298
- "description": "列的最大宽度"
299
- },
300
- {
301
- "name": "align",
302
- "type": "'left' | 'center' | 'right'",
303
- "description": "列的对齐方式"
304
- },
305
- {
306
- "name": "headerAlign",
307
- "type": "'left' | 'center' | 'right'",
308
- "description": "列标题的对齐方式,不设置时默认使用 align"
309
- },
310
- {
311
- "name": "dataType",
312
- "type": "string",
313
- "description": "数据类型 dataItem 数据字典 dataView 数据视图 options 选项 user 用户 department 部门 company 公司"
314
- },
315
- {
316
- "name": "dataCode",
317
- "type": "string",
318
- "description": "数据编码"
319
- },
320
- {
321
- "name": "options",
322
- "type": "Record<string, any>",
323
- "description": "数据"
324
- },
325
- {
326
- "name": "valueType",
327
- "type": "string",
328
- "description": "数据值类型 text, number, text_list, number_list"
329
- },
330
- {
331
- "name": "filter",
332
- "type": "TableColumnFilter",
333
- "description": "列的过滤器"
334
- },
335
- {
336
- "name": "sorter",
337
- "type": "TableColumnSorter",
338
- "description": "列的排序器"
339
- },
340
- {
341
- "name": "fieldFormat",
342
- "type": "(row: Record<string, any>) => any",
343
- "description": "列的格式化函数"
344
- },
345
- {
346
- "name": "frozen",
347
- "type": "'left' | 'right'",
348
- "description": "冻结列 left 左侧冻结 right 右侧冻结"
349
- }
350
- ]
351
- },
352
- {
353
- "name": "TableColumnFilter",
354
- "properties": [
355
- {
356
- "name": "isSearchKeyword",
357
- "type": "boolean",
358
- "description": "是否是搜索关键字"
359
- }
360
- ]
361
- },
362
- {
363
- "name": "TableColumnSorter",
364
- "properties": [
365
- {
366
- "name": "isNot",
367
- "type": "boolean",
368
- "description": "是否不需要排序"
369
- }
370
- ]
371
- },
372
- {
373
- "name": "ColumnSchemaConfig",
374
- "properties": [
375
- {
376
- "name": "id",
377
- "type": "string",
378
- "description": "id"
379
- },
380
- {
381
- "name": "type",
382
- "type": "string",
383
- "description": "类型"
384
- },
385
- {
386
- "name": "customLayout",
387
- "type": "(args: any) => any",
388
- "description": "自定义布局函数"
389
- },
390
- {
391
- "name": "config",
392
- "type": "TableColumnCompConfig & {\n /**\n * @zh 列的标题\n */\n label: string\n }",
393
- "description": "列配置"
394
- },
395
- {
396
- "name": "children",
397
- "type": "ColumnSchemaConfig[]",
398
- "description": "子集"
399
- }
400
- ]
401
- }
402
- ]
403
- }
1
+ export default {
2
+ "props": [
3
+ {
4
+ "name": "id",
5
+ "description": "",
6
+ "type": "string",
7
+ "default": "''"
8
+ },
9
+ {
10
+ "name": "modelValue",
11
+ "description": "输入值【作为表单的编辑表格使用】",
12
+ "type": "Record<string, any>[]",
13
+ "default": "() => []"
14
+ },
15
+ {
16
+ "name": "columns",
17
+ "description": "表格列配置(支持树形结构)",
18
+ "type": "ColumnSchemaConfig[]",
19
+ "default": "() => []"
20
+ },
21
+ {
22
+ "name": "columnFilter",
23
+ "description": "列过滤(用于隐藏列)",
24
+ "type": "string[]",
25
+ "default": "() => []"
26
+ },
27
+ {
28
+ "name": "records",
29
+ "description": "表格数据",
30
+ "type": "Record<string, any>[]",
31
+ "default": "() => []"
32
+ },
33
+ {
34
+ "name": "isTree",
35
+ "description": "是否是树形结构",
36
+ "type": "boolean",
37
+ "default": "false"
38
+ },
39
+ {
40
+ "name": "defaultExpandAll",
41
+ "description": "是否默认全部展开(仅 isTree 为 true 且非懒加载时生效)",
42
+ "type": "boolean",
43
+ "default": "false"
44
+ },
45
+ {
46
+ "name": "parentKey",
47
+ "description": "父级字段名(isTree 为 true 时用于将扁平数据转换成树形数据)",
48
+ "type": "string",
49
+ "default": "''"
50
+ },
51
+ {
52
+ "name": "isShowNumber",
53
+ "description": "是否显示序号",
54
+ "type": "boolean",
55
+ "default": "true"
56
+ },
57
+ {
58
+ "name": "isMultiple",
59
+ "description": "是否开启多选",
60
+ "type": "boolean",
61
+ "default": "false"
62
+ },
63
+ {
64
+ "name": "selectStateKey",
65
+ "description": "选状态字段名",
66
+ "type": "string",
67
+ "default": "''"
68
+ },
69
+ {
70
+ "name": "multipleDisabled",
71
+ "description": "多选禁用判断",
72
+ "type": "(record: Record<string, any>) => boolean",
73
+ "default": "null"
74
+ },
75
+ {
76
+ "name": "isPage",
77
+ "description": "是否分页",
78
+ "type": "boolean",
79
+ "default": "false"
80
+ },
81
+ {
82
+ "name": "pageLayoutSimple",
83
+ "description": "分页样式是否是简洁模式",
84
+ "type": "boolean",
85
+ "default": "false"
86
+ },
87
+ {
88
+ "name": "pageSizes",
89
+ "description": "每页显示个数选择器的选项设置",
90
+ "type": "array"
91
+ },
92
+ {
93
+ "name": "pageTotal",
94
+ "description": "总的数据条数",
95
+ "type": "number",
96
+ "default": "0"
97
+ },
98
+ {
99
+ "name": "tablePage",
100
+ "description": "当前页面",
101
+ "type": "number",
102
+ "default": "1"
103
+ },
104
+ {
105
+ "name": "pageSize",
106
+ "description": "当前显示页数",
107
+ "type": "number",
108
+ "default": "100"
109
+ },
110
+ {
111
+ "name": "rowKey",
112
+ "description": "行主键",
113
+ "type": "string",
114
+ "default": "'id'"
115
+ },
116
+ {
117
+ "name": "rowDrag",
118
+ "description": "是否支持行拖动排序",
119
+ "type": "boolean",
120
+ "default": "false"
121
+ },
122
+ {
123
+ "name": "actions",
124
+ "description": "行内操作按钮配置",
125
+ "type": "ButtonCompType[]",
126
+ "default": "() => []"
127
+ },
128
+ {
129
+ "name": "actionFilter",
130
+ "description": "行内操作按钮过滤方法",
131
+ "type": "(params: {\r\n action: ButtonCompType\r\n record: Record<string, any>\r\n recordIndex: number\r\n col: number\r\n row: number\r\n table: any\r\n}) =>\r\n | boolean\r\n | {\r\n display?: boolean\r\n disabled?: boolean\r\n }\r\n | null\r\n | undefined",
132
+ "default": "null"
133
+ },
134
+ {
135
+ "name": "actionsMaxCount",
136
+ "description": "操作列最大显示按钮数量",
137
+ "type": "number",
138
+ "default": "3"
139
+ },
140
+ {
141
+ "name": "actionsLabel",
142
+ "description": "操作列标题",
143
+ "type": "string",
144
+ "default": "'操作'"
145
+ },
146
+ {
147
+ "name": "isAnimationAppear",
148
+ "description": "是否开启动画出现",
149
+ "type": "boolean",
150
+ "default": "false"
151
+ },
152
+ {
153
+ "name": "heightMode",
154
+ "description": "高度模式 full 充满父容器 auto 根据内容自适应",
155
+ "type": "'full' | 'auto'",
156
+ "default": "'full'"
157
+ },
158
+ {
159
+ "name": "maxHeight",
160
+ "description": "最大高度,仅在 heightMode auto 时生效",
161
+ "type": "string|number",
162
+ "default": "undefined"
163
+ },
164
+ {
165
+ "name": "highlightMode",
166
+ "description": "高亮模式 cross 十字 row 行 column 列 cell 单元格",
167
+ "type": "'cross' | 'row' | 'column' | 'cell'",
168
+ "default": "'row'"
169
+ },
170
+ {
171
+ "name": "editConfig",
172
+ "description": "编辑参数",
173
+ "type": "EditConfigType",
174
+ "default": "() => ({})"
175
+ },
176
+ {
177
+ "name": "emptyTipText",
178
+ "description": "空数据提示文本",
179
+ "type": "string",
180
+ "default": "'暂无数据'"
181
+ },
182
+ {
183
+ "name": "subColumns",
184
+ "description": "子表列配置",
185
+ "type": "any[]",
186
+ "default": "() => []"
187
+ },
188
+ {
189
+ "name": "isSubShowNumber",
190
+ "description": "是否显示子表序号",
191
+ "type": "boolean",
192
+ "default": "true"
193
+ },
194
+ {
195
+ "name": "subActions",
196
+ "description": "子表行内操作按钮配置",
197
+ "type": "ButtonCompType[]",
198
+ "default": "() => []"
199
+ },
200
+ {
201
+ "name": "loadChildren",
202
+ "description": "懒加载子节点数据",
203
+ "type": "(record: Record<string, any>) => Promise<any[]>",
204
+ "default": "null"
205
+ }
206
+ ],
207
+ "events": [
208
+ {
209
+ "name": "ready",
210
+ "description": "表格实例创建完成时触发",
211
+ "type": "any"
212
+ },
213
+ {
214
+ "name": "selectionChanged",
215
+ "description": "选中数据变化时触发",
216
+ "type": "{\r\n isMultiple: boolean\r\n selections: Record<string, any>[]\r\n record: Record<string, any>\r\n checked: boolean\r\n}"
217
+ },
218
+ {
219
+ "name": "selectRecordsChanged",
220
+ "description": "根据 selectStateKey 初始化多选选中项时触发",
221
+ "type": "Array"
222
+ },
223
+ {
224
+ "name": "update:tablePage",
225
+ "description": "",
226
+ "type": "number"
227
+ },
228
+ {
229
+ "name": "update:pageSize",
230
+ "description": "",
231
+ "type": "number"
232
+ },
233
+ {
234
+ "name": "loadPageData",
235
+ "description": "当前页面",
236
+ "type": "{ rows: number; page: number }"
237
+ },
238
+ {
239
+ "name": "rowChange",
240
+ "description": "行数据变化",
241
+ "type": "Record"
242
+ },
243
+ {
244
+ "name": "update:modelValue",
245
+ "description": "v-model 双向绑定更新事件",
246
+ "type": "Array"
247
+ },
248
+ {
249
+ "name": "change",
250
+ "description": "变更事件",
251
+ "type": "{\r\n id: string\r\n value: any\r\n data: any\r\n formData: Record<string, any>\r\n tableData: Record<string, any>[]\r\n type: 'add' | 'delete' | 'update' | 'sort'\r\n}"
252
+ }
253
+ ],
254
+ "slots": [],
255
+ "methods": [
256
+ {
257
+ "name": "getInstance",
258
+ "description": "输入值【作为表单的编辑表格使用】",
259
+ "type": "() => void"
260
+ },
261
+ {
262
+ "name": "setRecords",
263
+ "description": "输入值【作为表单的编辑表格使用】",
264
+ "type": "() => void"
265
+ },
266
+ {
267
+ "name": "getRecords",
268
+ "description": "",
269
+ "type": "() => void"
270
+ },
271
+ {
272
+ "name": "getSelection",
273
+ "description": "输入值【作为表单的编辑表格使用】",
274
+ "type": "() => void"
275
+ },
276
+ {
277
+ "name": "setSelection",
278
+ "description": "输入值【作为表单的编辑表格使用】",
279
+ "type": "() => void"
280
+ },
281
+ {
282
+ "name": "renderTable",
283
+ "description": "",
284
+ "type": "() => void"
285
+ }
286
+ ],
287
+ "types": [
288
+ {
289
+ "name": "TableColumnConfig",
290
+ "properties": [
291
+ {
292
+ "name": "width",
293
+ "type": "number",
294
+ "description": "列的宽度"
295
+ },
296
+ {
297
+ "name": "minWidth",
298
+ "type": "number",
299
+ "description": "列的最小宽度"
300
+ },
301
+ {
302
+ "name": "maxWidth",
303
+ "type": "number",
304
+ "description": "列的最大宽度"
305
+ },
306
+ {
307
+ "name": "align",
308
+ "type": "'left' | 'center' | 'right'",
309
+ "description": "列的对齐方式"
310
+ },
311
+ {
312
+ "name": "headerAlign",
313
+ "type": "'left' | 'center' | 'right'",
314
+ "description": "列标题的对齐方式,不设置时默认使用 align"
315
+ },
316
+ {
317
+ "name": "dataType",
318
+ "type": "string",
319
+ "description": "数据类型 dataItem 数据字典 dataView 数据视图 options 选项 user 用户 department 部门 company 公司"
320
+ },
321
+ {
322
+ "name": "dataCode",
323
+ "type": "string",
324
+ "description": "数据编码"
325
+ },
326
+ {
327
+ "name": "options",
328
+ "type": "Record<string, any>",
329
+ "description": "数据"
330
+ },
331
+ {
332
+ "name": "valueType",
333
+ "type": "string",
334
+ "description": "数据值类型 text, number, text_list, number_list"
335
+ },
336
+ {
337
+ "name": "filter",
338
+ "type": "TableColumnFilter",
339
+ "description": "列的过滤器"
340
+ },
341
+ {
342
+ "name": "sorter",
343
+ "type": "TableColumnSorter",
344
+ "description": "列的排序器"
345
+ },
346
+ {
347
+ "name": "fieldFormat",
348
+ "type": "(row: Record<string, any>) => any",
349
+ "description": "列的格式化函数"
350
+ },
351
+ {
352
+ "name": "frozen",
353
+ "type": "'left' | 'right'",
354
+ "description": "冻结列 left 左侧冻结 right 右侧冻结"
355
+ }
356
+ ]
357
+ },
358
+ {
359
+ "name": "TableColumnFilter",
360
+ "properties": [
361
+ {
362
+ "name": "isSearchKeyword",
363
+ "type": "boolean",
364
+ "description": "是否是搜索关键字"
365
+ }
366
+ ]
367
+ },
368
+ {
369
+ "name": "TableColumnSorter",
370
+ "properties": [
371
+ {
372
+ "name": "isNot",
373
+ "type": "boolean",
374
+ "description": "是否不需要排序"
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ "name": "ColumnSchemaConfig",
380
+ "properties": [
381
+ {
382
+ "name": "id",
383
+ "type": "string",
384
+ "description": "id"
385
+ },
386
+ {
387
+ "name": "type",
388
+ "type": "string",
389
+ "description": "类型"
390
+ },
391
+ {
392
+ "name": "customLayout",
393
+ "type": "(args: any) => any",
394
+ "description": "自定义布局函数"
395
+ },
396
+ {
397
+ "name": "config",
398
+ "type": "TableColumnCompConfig & {\r\n /**\r\n * @zh 列的标题\r\n */\r\n label: string\r\n }",
399
+ "description": "列配置"
400
+ },
401
+ {
402
+ "name": "children",
403
+ "type": "ColumnSchemaConfig[]",
404
+ "description": "子集"
405
+ }
406
+ ]
407
+ }
408
+ ]
409
+ }