workdesktop-ai 1.2.1 → 1.2.3

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.
Files changed (115) hide show
  1. package/CHANGELOG.md +190 -190
  2. package/dist/chunks/Path-pIP0JQ0c.mjs +245 -0
  3. package/dist/chunks/Path-pIP0JQ0c.mjs.map +1 -0
  4. package/dist/chunks/Station-BTP0SbBg.mjs +818 -0
  5. package/dist/chunks/Station-BTP0SbBg.mjs.map +1 -0
  6. package/dist/index.esm.js +2 -2
  7. package/dist/index.umd.js +19 -19
  8. package/dist/index.umd.js.map +1 -1
  9. package/dist/path/index.mjs +1 -1
  10. package/dist/path/style.css +1 -1
  11. package/dist/station/index.mjs +1 -1
  12. package/dist/station/style.css +1 -1
  13. package/dist/style.css +1 -1
  14. package/dist/types/src/components/buttons/ApiButton.vue.d.ts +134 -0
  15. package/dist/types/src/components/buttons/ConfirmButton.vue.d.ts +169 -0
  16. package/dist/types/src/components/buttons/DialogButton.vue.d.ts +167 -0
  17. package/dist/types/src/components/buttons/DrawerButton.vue.d.ts +186 -0
  18. package/dist/types/src/components/buttons/PopconfirmButton.vue.d.ts +317 -0
  19. package/dist/types/src/components/buttons/PromptButton.vue.d.ts +180 -0
  20. package/dist/types/src/components/buttons/RouteButton.vue.d.ts +122 -0
  21. package/dist/types/src/components/buttons/TipsButton.vue.d.ts +66 -0
  22. package/dist/types/src/components/buttons/useApiAction.d.ts +20 -0
  23. package/dist/types/src/components/common/props.d.ts +122 -0
  24. package/dist/types/src/components/containers/Drawer.vue.d.ts +172 -0
  25. package/dist/types/src/components/containers/Iframe.vue.d.ts +81 -0
  26. package/dist/types/src/components/containers/containerContext.d.ts +15 -0
  27. package/dist/types/src/components/containers/useContainerController.d.ts +24 -0
  28. package/dist/types/src/components/containers/useIframeContainer.d.ts +20 -0
  29. package/dist/types/src/components/core/Requester.vue.d.ts +41 -0
  30. package/dist/types/src/components/data/datagrid/DataGrid.vue.d.ts +542 -0
  31. package/dist/types/src/components/data/datagrid/useColumnSettings.d.ts +62 -0
  32. package/dist/types/src/components/data/editable-grid/EditableGrid.vue.d.ts +586 -0
  33. package/dist/types/src/components/data/viewer/Viewer.vue.d.ts +187 -0
  34. package/dist/types/src/components/form/FormItem.vue.d.ts +62 -0
  35. package/dist/types/src/components/form/SearchItem.vue.d.ts +62 -0
  36. package/dist/types/src/components/form/SearchPanel.vue.d.ts +167 -0
  37. package/dist/types/src/components/form/data-form/DataForm.vue.d.ts +311 -0
  38. package/dist/types/src/components/index.d.ts +32 -0
  39. package/dist/types/src/components/inputs/AutoComplete.vue.d.ts +166 -0
  40. package/dist/types/src/components/inputs/CheckboxList.vue.d.ts +166 -0
  41. package/dist/types/src/components/inputs/RadioList.vue.d.ts +166 -0
  42. package/dist/types/src/components/inputs/Select.vue.d.ts +176 -0
  43. package/dist/types/src/components/inputs/Switch.vue.d.ts +116 -0
  44. package/dist/types/src/components/inputs/useOptionsLoader.d.ts +32 -0
  45. package/dist/types/src/components/layout/Station.vue.d.ts +313 -0
  46. package/dist/types/src/components/layout/StationMenuNode.vue.d.ts +20 -0
  47. package/dist/types/src/components/layout/types.d.ts +67 -0
  48. package/dist/types/src/components/styles/Panel.vue.d.ts +94 -0
  49. package/dist/types/src/components/styles/Path.vue.d.ts +103 -0
  50. package/dist/types/src/components/styles/Tips.vue.d.ts +60 -0
  51. package/dist/types/src/components/upload/ImageUpload.vue.d.ts +176 -0
  52. package/dist/types/src/components/upload/Upload.vue.d.ts +235 -0
  53. package/dist/types/src/entries/api-button.d.ts +9 -0
  54. package/dist/types/src/entries/auto-complete.d.ts +9 -0
  55. package/dist/types/src/entries/checkbox-list.d.ts +9 -0
  56. package/dist/types/src/entries/components-map.d.ts +8 -0
  57. package/dist/types/src/entries/confirm-button.d.ts +9 -0
  58. package/dist/types/src/entries/data-form.d.ts +9 -0
  59. package/dist/types/src/entries/data-grid.d.ts +9 -0
  60. package/dist/types/src/entries/dialog-button.d.ts +9 -0
  61. package/dist/types/src/entries/drawer-button.d.ts +9 -0
  62. package/dist/types/src/entries/drawer.d.ts +9 -0
  63. package/dist/types/src/entries/editable-grid.d.ts +9 -0
  64. package/dist/types/src/entries/form-item.d.ts +9 -0
  65. package/dist/types/src/entries/iframe.d.ts +9 -0
  66. package/dist/types/src/entries/image-upload.d.ts +9 -0
  67. package/dist/types/src/entries/panel.d.ts +9 -0
  68. package/dist/types/src/entries/path.d.ts +9 -0
  69. package/dist/types/src/entries/prompt-button.d.ts +9 -0
  70. package/dist/types/src/entries/radio-list.d.ts +9 -0
  71. package/dist/types/src/entries/requester.d.ts +9 -0
  72. package/dist/types/src/entries/route-button.d.ts +9 -0
  73. package/dist/types/src/entries/search-item.d.ts +9 -0
  74. package/dist/types/src/entries/search-panel.d.ts +9 -0
  75. package/dist/types/src/entries/select.d.ts +9 -0
  76. package/dist/types/src/entries/station.d.ts +9 -0
  77. package/dist/types/src/entries/switch.d.ts +9 -0
  78. package/dist/types/src/entries/tips-button.d.ts +9 -0
  79. package/dist/types/src/entries/tips.d.ts +9 -0
  80. package/dist/types/src/entries/upload.d.ts +9 -0
  81. package/dist/types/src/entries/viewer.d.ts +9 -0
  82. package/dist/types/src/index.d.ts +24 -0
  83. package/dist/types/src/lib/composables/useConfig.d.ts +19 -0
  84. package/dist/types/src/lib/composables/useDataGrid.d.ts +69 -0
  85. package/dist/types/src/lib/composables/useEventBus.d.ts +16 -0
  86. package/dist/types/src/lib/composables/useGlobalState.d.ts +5 -0
  87. package/dist/types/src/lib/composables/useRequest.d.ts +42 -0
  88. package/dist/types/src/lib/configs/default-config.d.ts +6 -0
  89. package/dist/types/src/lib/core/config.d.ts +28 -0
  90. package/dist/types/src/lib/core/http.d.ts +100 -0
  91. package/dist/types/src/lib/core/linkage.d.ts +48 -0
  92. package/dist/types/src/lib/core/skins/apple.d.ts +3 -0
  93. package/dist/types/src/lib/core/skins/business.d.ts +3 -0
  94. package/dist/types/src/lib/core/skins/chinese.d.ts +3 -0
  95. package/dist/types/src/lib/core/skins/cool.d.ts +3 -0
  96. package/dist/types/src/lib/core/skins/cyberpunk.d.ts +3 -0
  97. package/dist/types/src/lib/core/skins/default.d.ts +3 -0
  98. package/dist/types/src/lib/core/skins/fashion.d.ts +3 -0
  99. package/dist/types/src/lib/core/skins/flat.d.ts +3 -0
  100. package/dist/types/src/lib/core/skins/governance.d.ts +3 -0
  101. package/dist/types/src/lib/core/skins/index.d.ts +15 -0
  102. package/dist/types/src/lib/core/skins/tech.d.ts +3 -0
  103. package/dist/types/src/lib/core/skins/types.d.ts +19 -0
  104. package/dist/types/src/lib/core/station-linkage.d.ts +72 -0
  105. package/dist/types/src/lib/core/theme.d.ts +11 -0
  106. package/dist/types/src/lib/core/utils.d.ts +28 -0
  107. package/dist/types/src/lib/install.d.ts +11 -0
  108. package/dist/types/src/types/config.d.ts +130 -0
  109. package/dist/types/src/types/index.d.ts +4 -0
  110. package/dist/types/vite.config.d.ts +7 -0
  111. package/package.json +7 -2
  112. package/dist/chunks/Path-C_oyo6Dg.mjs +0 -200
  113. package/dist/chunks/Path-C_oyo6Dg.mjs.map +0 -1
  114. package/dist/chunks/Station-DLV19USa.mjs +0 -780
  115. package/dist/chunks/Station-DLV19USa.mjs.map +0 -1
@@ -0,0 +1,542 @@
1
+ import { type PropType } from 'vue';
2
+ /** 移除购物车中某行;若该行在当前页,同时取消勾选(经 selection 同步移除) */
3
+ declare function removeCartRow(row: any): void;
4
+ /** 清空购物车(计数归零,面板同步;当前页勾选一并清空) */
5
+ declare function clearCart(): void;
6
+ /** 获取购物车暂存数组(跨页累计、已去重) */
7
+ declare function getCartList(): any[];
8
+ declare function onChangeCurrentpage(val: number): void;
9
+ declare function onChangePagesize(val: number): void;
10
+ declare function requestApi(options?: {
11
+ apiParam?: Record<string, any>;
12
+ }): Promise<void>;
13
+ declare function refresh(): Promise<void>;
14
+ declare function getSelection(): any[];
15
+ declare function clearSelection(): void;
16
+ /** 搜索面板联动:带搜索参数查询(重置到第一页) */
17
+ declare function search(params?: Record<string, any>): Promise<void>;
18
+ /** 重置搜索并刷新 */
19
+ declare function resetSearch(): Promise<import("../../../lib/composables/useDataGrid").ListData>;
20
+ declare var __VLS_1: {
21
+ selection: any[];
22
+ list: any[];
23
+ }, __VLS_198: {}, __VLS_208: {
24
+ row: any;
25
+ index: number;
26
+ }, __VLS_210: {
27
+ selection: any[];
28
+ list: any[];
29
+ }, __VLS_421: {
30
+ list: any[];
31
+ remove: typeof removeCartRow;
32
+ clear: typeof clearCart;
33
+ };
34
+ type __VLS_Slots = {} & {
35
+ toolbar?: (props: typeof __VLS_1) => any;
36
+ } & {
37
+ empty?: (props: typeof __VLS_198) => any;
38
+ } & {
39
+ 'card-item'?: (props: typeof __VLS_208) => any;
40
+ } & {
41
+ toolbar?: (props: typeof __VLS_210) => any;
42
+ } & {
43
+ 'cart-content'?: (props: typeof __VLS_421) => any;
44
+ };
45
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
46
+ api: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ apiMethod: {
51
+ type: PropType<"get" | "post" | "put" | "delete">;
52
+ default: string;
53
+ };
54
+ apiParam: {
55
+ type: PropType<Record<string, any>>;
56
+ default: () => {};
57
+ };
58
+ active: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
62
+ /** 静态数据(数组) */
63
+ dataSource: {
64
+ type: PropType<any[] | any>;
65
+ default: undefined;
66
+ };
67
+ withPager: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ withSearch: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
75
+ modeSwitch: {
76
+ type: BooleanConstructor;
77
+ default: boolean;
78
+ };
79
+ dynamicColumn: {
80
+ type: BooleanConstructor;
81
+ default: boolean;
82
+ };
83
+ columnStorageKey: {
84
+ type: StringConstructor;
85
+ default: string;
86
+ };
87
+ fix: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
91
+ border: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ stripe: {
96
+ type: BooleanConstructor;
97
+ default: boolean;
98
+ };
99
+ /**
100
+ * 高度模式:缺省内容自适应(数据多少就多高);
101
+ * 'fix' —— 贴合最近一个有确定高度 / 可滚动的祖先容器(顶部取自身位置、底部贴其内容区底),
102
+ * 数据超出在行区内滚动、表头固定;祖先无定高 / 滚动约束时退化为内容自适应;
103
+ * 数字 / CSS 长度(如 '520px')—— 表格固定高度,行区内滚动。
104
+ */
105
+ height: {
106
+ type: PropType<string | number>;
107
+ default: undefined;
108
+ };
109
+ autoHeight: {
110
+ type: BooleanConstructor;
111
+ default: boolean;
112
+ };
113
+ rowKey: {
114
+ type: StringConstructor;
115
+ default: string;
116
+ };
117
+ tableSize: {
118
+ type: PropType<"large" | "default" | "small">;
119
+ default: string;
120
+ };
121
+ pagerStyle: {
122
+ type: PropType<"simple" | "normal" | "full">;
123
+ default: string;
124
+ };
125
+ /** 分页在底栏的水平位置:left/center/right;缺省走全局配置 page.pager.position(默认 right) */
126
+ pagerPosition: {
127
+ type: PropType<"left" | "center" | "right">;
128
+ default: string;
129
+ };
130
+ withIndex: {
131
+ type: BooleanConstructor;
132
+ default: boolean;
133
+ };
134
+ withSelection: {
135
+ type: BooleanConstructor;
136
+ default: boolean;
137
+ };
138
+ rowspanKey: {
139
+ type: StringConstructor;
140
+ default: string;
141
+ };
142
+ rowspanColumn: {
143
+ type: PropType<string[]>;
144
+ default: () => never[];
145
+ };
146
+ treeProps: {
147
+ type: ObjectConstructor;
148
+ default: () => {
149
+ children: string;
150
+ hasChildren: string;
151
+ };
152
+ };
153
+ defaultExpandAll: {
154
+ type: BooleanConstructor;
155
+ default: boolean;
156
+ };
157
+ modelValue: {
158
+ type: PropType<any[]>;
159
+ default: () => never[];
160
+ };
161
+ /**
162
+ * 选中项返回:默认返回完整行对象数组;如果设置 selectionKey,则返回对应字段值数组
163
+ */
164
+ selectionKey: {
165
+ type: StringConstructor;
166
+ default: string;
167
+ };
168
+ tools: {
169
+ type: PropType<{
170
+ refresh?: boolean;
171
+ columnSetting?: boolean;
172
+ modeSwitch?: boolean;
173
+ size?: boolean;
174
+ /** 显示内置「新增」按钮(点击 emit add) */
175
+ add?: boolean;
176
+ /** 显示内置「导出」按钮(点击 emit export) */
177
+ export?: boolean;
178
+ /** 右侧工具按钮形态:round 圆角(默认)/ square 方角 / group 按钮组 */
179
+ mode?: "round" | "square" | "group";
180
+ /** 工具按钮尺寸:large / default(默认)/ small,与 el-button 一致 */
181
+ buttonSize?: "large" | "default" | "small";
182
+ }>;
183
+ default: () => {};
184
+ };
185
+ /**
186
+ * 内置工具按钮组(刷新 / 大小 / 模式切换 / 列设置 / 购物车)位置:
187
+ * left 右上左区 / right 右上右区(默认)/ bottom 底栏(与分页同一行)
188
+ */
189
+ toolsPosition: {
190
+ type: PropType<"left" | "right" | "bottom">;
191
+ default: string;
192
+ };
193
+ /**
194
+ * 自定义工具栏(toolbar 插槽 + 新增/导出按钮)位置:
195
+ * left 左上左区(默认)/ right 左上右区 / bottom 底栏(与分页同一行)
196
+ */
197
+ toolbarPosition: {
198
+ type: PropType<"left" | "right" | "bottom">;
199
+ default: string;
200
+ };
201
+ /** 内置操作列配置(渲染行操作按钮,点击 emit row-action) */
202
+ rowActions: {
203
+ type: PropType<Array<{
204
+ text: string;
205
+ command?: string;
206
+ type?: string;
207
+ }>>;
208
+ default: () => never[];
209
+ };
210
+ withSelectionCart: {
211
+ type: BooleanConstructor;
212
+ default: boolean;
213
+ };
214
+ /** 购物车去重/自动回勾的唯一键字段,缺省复用 rowKey,均未配置时退化为按行对象引用比较 */
215
+ cartRowKey: {
216
+ type: StringConstructor;
217
+ default: string;
218
+ };
219
+ /** 购物车按钮与查看面板配置 */
220
+ cartConfig: {
221
+ type: PropType<{
222
+ type?: "dialog" | "drawer";
223
+ title?: string;
224
+ buttonText?: string;
225
+ size?: number | string;
226
+ showClear?: boolean;
227
+ showRemove?: boolean;
228
+ }>;
229
+ default: () => {
230
+ type: string;
231
+ title: string;
232
+ buttonText: string;
233
+ size: number;
234
+ showClear: boolean;
235
+ showRemove: boolean;
236
+ };
237
+ };
238
+ filter: {
239
+ type: StringConstructor;
240
+ default: string;
241
+ };
242
+ }>, {
243
+ requestApi: typeof requestApi;
244
+ refresh: typeof refresh;
245
+ onChangePagesize: typeof onChangePagesize;
246
+ onChangeCurrentpage: typeof onChangeCurrentpage;
247
+ getSelection: typeof getSelection;
248
+ clearSelection: typeof clearSelection;
249
+ search: typeof search;
250
+ resetSearch: typeof resetSearch;
251
+ getCartList: typeof getCartList;
252
+ clearCart: typeof clearCart;
253
+ tableRef: import("vue").Ref<any, any>;
254
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
255
+ apiBefore: (...args: any[]) => void;
256
+ apiAfter: (...args: any[]) => void;
257
+ add: (...args: any[]) => void;
258
+ export: (...args: any[]) => void;
259
+ "row-action": (...args: any[]) => void;
260
+ "page-change": (...args: any[]) => void;
261
+ "selection-change": (...args: any[]) => void;
262
+ "mode-change": (...args: any[]) => void;
263
+ loaded: (...args: any[]) => void;
264
+ "update:modelValue": (...args: any[]) => void;
265
+ "cart-change": (...args: any[]) => void;
266
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
267
+ api: {
268
+ type: StringConstructor;
269
+ default: string;
270
+ };
271
+ apiMethod: {
272
+ type: PropType<"get" | "post" | "put" | "delete">;
273
+ default: string;
274
+ };
275
+ apiParam: {
276
+ type: PropType<Record<string, any>>;
277
+ default: () => {};
278
+ };
279
+ active: {
280
+ type: BooleanConstructor;
281
+ default: boolean;
282
+ };
283
+ /** 静态数据(数组) */
284
+ dataSource: {
285
+ type: PropType<any[] | any>;
286
+ default: undefined;
287
+ };
288
+ withPager: {
289
+ type: BooleanConstructor;
290
+ default: boolean;
291
+ };
292
+ withSearch: {
293
+ type: BooleanConstructor;
294
+ default: boolean;
295
+ };
296
+ modeSwitch: {
297
+ type: BooleanConstructor;
298
+ default: boolean;
299
+ };
300
+ dynamicColumn: {
301
+ type: BooleanConstructor;
302
+ default: boolean;
303
+ };
304
+ columnStorageKey: {
305
+ type: StringConstructor;
306
+ default: string;
307
+ };
308
+ fix: {
309
+ type: BooleanConstructor;
310
+ default: boolean;
311
+ };
312
+ border: {
313
+ type: BooleanConstructor;
314
+ default: boolean;
315
+ };
316
+ stripe: {
317
+ type: BooleanConstructor;
318
+ default: boolean;
319
+ };
320
+ /**
321
+ * 高度模式:缺省内容自适应(数据多少就多高);
322
+ * 'fix' —— 贴合最近一个有确定高度 / 可滚动的祖先容器(顶部取自身位置、底部贴其内容区底),
323
+ * 数据超出在行区内滚动、表头固定;祖先无定高 / 滚动约束时退化为内容自适应;
324
+ * 数字 / CSS 长度(如 '520px')—— 表格固定高度,行区内滚动。
325
+ */
326
+ height: {
327
+ type: PropType<string | number>;
328
+ default: undefined;
329
+ };
330
+ autoHeight: {
331
+ type: BooleanConstructor;
332
+ default: boolean;
333
+ };
334
+ rowKey: {
335
+ type: StringConstructor;
336
+ default: string;
337
+ };
338
+ tableSize: {
339
+ type: PropType<"large" | "default" | "small">;
340
+ default: string;
341
+ };
342
+ pagerStyle: {
343
+ type: PropType<"simple" | "normal" | "full">;
344
+ default: string;
345
+ };
346
+ /** 分页在底栏的水平位置:left/center/right;缺省走全局配置 page.pager.position(默认 right) */
347
+ pagerPosition: {
348
+ type: PropType<"left" | "center" | "right">;
349
+ default: string;
350
+ };
351
+ withIndex: {
352
+ type: BooleanConstructor;
353
+ default: boolean;
354
+ };
355
+ withSelection: {
356
+ type: BooleanConstructor;
357
+ default: boolean;
358
+ };
359
+ rowspanKey: {
360
+ type: StringConstructor;
361
+ default: string;
362
+ };
363
+ rowspanColumn: {
364
+ type: PropType<string[]>;
365
+ default: () => never[];
366
+ };
367
+ treeProps: {
368
+ type: ObjectConstructor;
369
+ default: () => {
370
+ children: string;
371
+ hasChildren: string;
372
+ };
373
+ };
374
+ defaultExpandAll: {
375
+ type: BooleanConstructor;
376
+ default: boolean;
377
+ };
378
+ modelValue: {
379
+ type: PropType<any[]>;
380
+ default: () => never[];
381
+ };
382
+ /**
383
+ * 选中项返回:默认返回完整行对象数组;如果设置 selectionKey,则返回对应字段值数组
384
+ */
385
+ selectionKey: {
386
+ type: StringConstructor;
387
+ default: string;
388
+ };
389
+ tools: {
390
+ type: PropType<{
391
+ refresh?: boolean;
392
+ columnSetting?: boolean;
393
+ modeSwitch?: boolean;
394
+ size?: boolean;
395
+ /** 显示内置「新增」按钮(点击 emit add) */
396
+ add?: boolean;
397
+ /** 显示内置「导出」按钮(点击 emit export) */
398
+ export?: boolean;
399
+ /** 右侧工具按钮形态:round 圆角(默认)/ square 方角 / group 按钮组 */
400
+ mode?: "round" | "square" | "group";
401
+ /** 工具按钮尺寸:large / default(默认)/ small,与 el-button 一致 */
402
+ buttonSize?: "large" | "default" | "small";
403
+ }>;
404
+ default: () => {};
405
+ };
406
+ /**
407
+ * 内置工具按钮组(刷新 / 大小 / 模式切换 / 列设置 / 购物车)位置:
408
+ * left 右上左区 / right 右上右区(默认)/ bottom 底栏(与分页同一行)
409
+ */
410
+ toolsPosition: {
411
+ type: PropType<"left" | "right" | "bottom">;
412
+ default: string;
413
+ };
414
+ /**
415
+ * 自定义工具栏(toolbar 插槽 + 新增/导出按钮)位置:
416
+ * left 左上左区(默认)/ right 左上右区 / bottom 底栏(与分页同一行)
417
+ */
418
+ toolbarPosition: {
419
+ type: PropType<"left" | "right" | "bottom">;
420
+ default: string;
421
+ };
422
+ /** 内置操作列配置(渲染行操作按钮,点击 emit row-action) */
423
+ rowActions: {
424
+ type: PropType<Array<{
425
+ text: string;
426
+ command?: string;
427
+ type?: string;
428
+ }>>;
429
+ default: () => never[];
430
+ };
431
+ withSelectionCart: {
432
+ type: BooleanConstructor;
433
+ default: boolean;
434
+ };
435
+ /** 购物车去重/自动回勾的唯一键字段,缺省复用 rowKey,均未配置时退化为按行对象引用比较 */
436
+ cartRowKey: {
437
+ type: StringConstructor;
438
+ default: string;
439
+ };
440
+ /** 购物车按钮与查看面板配置 */
441
+ cartConfig: {
442
+ type: PropType<{
443
+ type?: "dialog" | "drawer";
444
+ title?: string;
445
+ buttonText?: string;
446
+ size?: number | string;
447
+ showClear?: boolean;
448
+ showRemove?: boolean;
449
+ }>;
450
+ default: () => {
451
+ type: string;
452
+ title: string;
453
+ buttonText: string;
454
+ size: number;
455
+ showClear: boolean;
456
+ showRemove: boolean;
457
+ };
458
+ };
459
+ filter: {
460
+ type: StringConstructor;
461
+ default: string;
462
+ };
463
+ }>> & Readonly<{
464
+ onApiBefore?: ((...args: any[]) => any) | undefined;
465
+ onApiAfter?: ((...args: any[]) => any) | undefined;
466
+ onAdd?: ((...args: any[]) => any) | undefined;
467
+ onExport?: ((...args: any[]) => any) | undefined;
468
+ "onRow-action"?: ((...args: any[]) => any) | undefined;
469
+ "onPage-change"?: ((...args: any[]) => any) | undefined;
470
+ "onSelection-change"?: ((...args: any[]) => any) | undefined;
471
+ "onMode-change"?: ((...args: any[]) => any) | undefined;
472
+ onLoaded?: ((...args: any[]) => any) | undefined;
473
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
474
+ "onCart-change"?: ((...args: any[]) => any) | undefined;
475
+ }>, {
476
+ filter: string;
477
+ api: string;
478
+ apiMethod: "post" | "delete" | "get" | "put";
479
+ apiParam: Record<string, any>;
480
+ active: boolean;
481
+ dataSource: any;
482
+ withPager: boolean;
483
+ withSearch: boolean;
484
+ modeSwitch: boolean;
485
+ dynamicColumn: boolean;
486
+ columnStorageKey: string;
487
+ fix: boolean;
488
+ border: boolean;
489
+ stripe: boolean;
490
+ height: string | number;
491
+ autoHeight: boolean;
492
+ rowKey: string;
493
+ tableSize: "default" | "small" | "large";
494
+ pagerStyle: "simple" | "normal" | "full";
495
+ pagerPosition: "left" | "center" | "right";
496
+ withIndex: boolean;
497
+ withSelection: boolean;
498
+ rowspanKey: string;
499
+ rowspanColumn: string[];
500
+ treeProps: Record<string, any>;
501
+ defaultExpandAll: boolean;
502
+ modelValue: any[];
503
+ selectionKey: string;
504
+ tools: {
505
+ refresh?: boolean;
506
+ columnSetting?: boolean;
507
+ modeSwitch?: boolean;
508
+ size?: boolean;
509
+ /** 显示内置「新增」按钮(点击 emit add) */
510
+ add?: boolean;
511
+ /** 显示内置「导出」按钮(点击 emit export) */
512
+ export?: boolean;
513
+ /** 右侧工具按钮形态:round 圆角(默认)/ square 方角 / group 按钮组 */
514
+ mode?: "round" | "square" | "group";
515
+ /** 工具按钮尺寸:large / default(默认)/ small,与 el-button 一致 */
516
+ buttonSize?: "large" | "default" | "small";
517
+ };
518
+ toolsPosition: "left" | "right" | "bottom";
519
+ toolbarPosition: "left" | "right" | "bottom";
520
+ rowActions: {
521
+ text: string;
522
+ command?: string;
523
+ type?: string;
524
+ }[];
525
+ withSelectionCart: boolean;
526
+ cartRowKey: string;
527
+ cartConfig: {
528
+ type?: "dialog" | "drawer";
529
+ title?: string;
530
+ buttonText?: string;
531
+ size?: number | string;
532
+ showClear?: boolean;
533
+ showRemove?: boolean;
534
+ };
535
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
536
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
537
+ export default _default;
538
+ type __VLS_WithSlots<T, S> = T & {
539
+ new (): {
540
+ $slots: S;
541
+ };
542
+ };
@@ -0,0 +1,62 @@
1
+ import { nextTick } from 'vue';
2
+ import type { VNode } from 'vue';
3
+ /**
4
+ * 动态列:从默认插槽的 el-table-column vnode 中提取列元信息,
5
+ * 支持显示/隐藏/排序,状态可持久化到 localStorage(PRD 4.2)。
6
+ */
7
+ export interface ColumnMeta {
8
+ /** el-table-column 的 key(prop 或自动 id) */
9
+ key: string;
10
+ label: string;
11
+ /** 用户可控制的业务列(selection/index 等内置列不可控) */
12
+ controllable: boolean;
13
+ visible: boolean;
14
+ order: number;
15
+ }
16
+ /**
17
+ * 从插槽 vnode 数组中解析列
18
+ */
19
+ export declare function extractColumns(vnodes: VNode[]): ColumnMeta[];
20
+ /**
21
+ * 按列设置中的 order 重排业务列 vnode。
22
+ * key 解析规则必须与 extractColumns 完全一致(含自动编号计数),
23
+ * 未匹配到列设置的 vnode 保持原相对顺序排在末尾。
24
+ */
25
+ export declare function orderColumnVnodes(vnodes: VNode[], orderMap: Map<string, number>): VNode[];
26
+ export declare function useColumnSettings(storageKey?: string): {
27
+ columns: import("vue").Ref<{
28
+ key: string;
29
+ label: string;
30
+ controllable: boolean;
31
+ visible: boolean;
32
+ order: number;
33
+ }[], ColumnMeta[] | {
34
+ key: string;
35
+ label: string;
36
+ controllable: boolean;
37
+ visible: boolean;
38
+ order: number;
39
+ }[]>;
40
+ controllableColumns: import("vue").ComputedRef<{
41
+ key: string;
42
+ label: string;
43
+ controllable: boolean;
44
+ visible: boolean;
45
+ order: number;
46
+ }[]>;
47
+ hiddenKeys: import("vue").ComputedRef<Set<string>>;
48
+ columnOrderMap: import("vue").ComputedRef<Map<string, number>>;
49
+ settingVisible: import("vue").Ref<boolean, boolean>;
50
+ init: (vnodes: VNode[]) => void;
51
+ initMetas: (metas: Array<{
52
+ key: string;
53
+ label: string;
54
+ controllable?: boolean;
55
+ visible?: boolean;
56
+ }>) => void;
57
+ setVisible: (key: string, visible: boolean) => void;
58
+ move: (key: string, direction: -1 | 1) => void;
59
+ reorder: (fromKey: string, toKey: string, position?: "before" | "after") => void;
60
+ reset: () => void;
61
+ nextTick: typeof nextTick;
62
+ };