workdesktop-ai 1.0.2 → 1.1.0

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 (223) hide show
  1. package/CHANGELOG.md +155 -93
  2. package/README.md +123 -25
  3. package/dist/api-button/index.mjs +7 -0
  4. package/dist/api-button/index.mjs.map +1 -0
  5. package/dist/assets/Select-CNzSyvlZ.css +1 -0
  6. package/dist/auto-complete/index.mjs +7 -0
  7. package/dist/auto-complete/index.mjs.map +1 -0
  8. package/dist/auto-complete/style.css +1 -0
  9. package/dist/base.css +1 -0
  10. package/dist/checkbox-list/index.mjs +7 -0
  11. package/dist/checkbox-list/index.mjs.map +1 -0
  12. package/dist/checkbox-list/style.css +1 -0
  13. package/dist/chunks/ApiButton.vue_vue_type_script_setup_true_lang-CweWFfDE.mjs +80 -0
  14. package/dist/chunks/ApiButton.vue_vue_type_script_setup_true_lang-CweWFfDE.mjs.map +1 -0
  15. package/dist/chunks/AutoComplete-B_L169hU.mjs +80 -0
  16. package/dist/chunks/AutoComplete-B_L169hU.mjs.map +1 -0
  17. package/dist/chunks/CheckboxList-bPqpbd8d.mjs +129 -0
  18. package/dist/chunks/CheckboxList-bPqpbd8d.mjs.map +1 -0
  19. package/dist/chunks/ConfirmButton.vue_vue_type_script_setup_true_lang-DpdMPkka.mjs +99 -0
  20. package/dist/chunks/ConfirmButton.vue_vue_type_script_setup_true_lang-DpdMPkka.mjs.map +1 -0
  21. package/dist/chunks/DataForm-C6UW92Ds.mjs +305 -0
  22. package/dist/chunks/DataForm-C6UW92Ds.mjs.map +1 -0
  23. package/dist/chunks/DataGrid-BhgND4G_.mjs +1124 -0
  24. package/dist/chunks/DataGrid-BhgND4G_.mjs.map +1 -0
  25. package/dist/chunks/DialogButton.vue_vue_type_script_setup_true_lang-CTXP79zc.mjs +117 -0
  26. package/dist/chunks/DialogButton.vue_vue_type_script_setup_true_lang-CTXP79zc.mjs.map +1 -0
  27. package/dist/chunks/Drawer-ucXKUecL.mjs +259 -0
  28. package/dist/chunks/Drawer-ucXKUecL.mjs.map +1 -0
  29. package/dist/chunks/DrawerButton.vue_vue_type_script_setup_true_lang-DUda4p7_.mjs +125 -0
  30. package/dist/chunks/DrawerButton.vue_vue_type_script_setup_true_lang-DUda4p7_.mjs.map +1 -0
  31. package/dist/chunks/EditableGrid-Cx7ScWkW.mjs +1783 -0
  32. package/dist/chunks/EditableGrid-Cx7ScWkW.mjs.map +1 -0
  33. package/dist/chunks/FormItem-C1q0opnk.mjs +79 -0
  34. package/dist/chunks/FormItem-C1q0opnk.mjs.map +1 -0
  35. package/dist/chunks/Iframe-CeSiMnvR.mjs +65 -0
  36. package/dist/chunks/Iframe-CeSiMnvR.mjs.map +1 -0
  37. package/dist/chunks/ImageUpload-D3JGJjVO.mjs +193 -0
  38. package/dist/chunks/ImageUpload-D3JGJjVO.mjs.map +1 -0
  39. package/dist/chunks/Panel-d4chdlTA.mjs +113 -0
  40. package/dist/chunks/Panel-d4chdlTA.mjs.map +1 -0
  41. package/dist/chunks/PromptButton.vue_vue_type_script_setup_true_lang-BqoNAUoo.mjs +118 -0
  42. package/dist/chunks/PromptButton.vue_vue_type_script_setup_true_lang-BqoNAUoo.mjs.map +1 -0
  43. package/dist/chunks/RadioList-DT-8WSN2.mjs +129 -0
  44. package/dist/chunks/RadioList-DT-8WSN2.mjs.map +1 -0
  45. package/dist/chunks/Requester.vue_vue_type_script_setup_true_lang-5B1V-53c.mjs +80 -0
  46. package/dist/chunks/Requester.vue_vue_type_script_setup_true_lang-5B1V-53c.mjs.map +1 -0
  47. package/dist/chunks/RouteButton.vue_vue_type_script_setup_true_lang-Da0D3tKA.mjs +73 -0
  48. package/dist/chunks/RouteButton.vue_vue_type_script_setup_true_lang-Da0D3tKA.mjs.map +1 -0
  49. package/dist/chunks/SearchItem-pFO57lEO.mjs +79 -0
  50. package/dist/chunks/SearchItem-pFO57lEO.mjs.map +1 -0
  51. package/dist/chunks/SearchPanel-xQ1hPaNq.mjs +158 -0
  52. package/dist/chunks/SearchPanel-xQ1hPaNq.mjs.map +1 -0
  53. package/dist/chunks/Select-CMw-tWYm.mjs +114 -0
  54. package/dist/chunks/Select-CMw-tWYm.mjs.map +1 -0
  55. package/dist/chunks/Station-BF_QlQ8c.mjs +796 -0
  56. package/dist/chunks/Station-BF_QlQ8c.mjs.map +1 -0
  57. package/dist/chunks/Switch.vue_vue_type_script_setup_true_lang-CCU_d3jW.mjs +71 -0
  58. package/dist/chunks/Switch.vue_vue_type_script_setup_true_lang-CCU_d3jW.mjs.map +1 -0
  59. package/dist/chunks/Tips-IWCZcR1K.mjs +63 -0
  60. package/dist/chunks/Tips-IWCZcR1K.mjs.map +1 -0
  61. package/dist/chunks/TipsButton.vue_vue_type_script_setup_true_lang-DvcpRSV1.mjs +51 -0
  62. package/dist/chunks/TipsButton.vue_vue_type_script_setup_true_lang-DvcpRSV1.mjs.map +1 -0
  63. package/dist/chunks/Upload.vue_vue_type_script_setup_true_lang-CkxGO85H.mjs +200 -0
  64. package/dist/chunks/Upload.vue_vue_type_script_setup_true_lang-CkxGO85H.mjs.map +1 -0
  65. package/dist/chunks/Viewer-COLbtcgF.mjs +381 -0
  66. package/dist/chunks/Viewer-COLbtcgF.mjs.map +1 -0
  67. package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.mjs +10 -0
  68. package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.mjs.map +1 -0
  69. package/dist/chunks/containerContext-BgphFDeH.mjs +13 -0
  70. package/dist/chunks/containerContext-BgphFDeH.mjs.map +1 -0
  71. package/dist/chunks/http-DUPsbs2K.mjs +2951 -0
  72. package/dist/chunks/http-DUPsbs2K.mjs.map +1 -0
  73. package/dist/chunks/linkage-FbL1mcz3.mjs +66 -0
  74. package/dist/chunks/linkage-FbL1mcz3.mjs.map +1 -0
  75. package/dist/chunks/props-DAytpx7D.mjs +65 -0
  76. package/dist/chunks/props-DAytpx7D.mjs.map +1 -0
  77. package/dist/chunks/useApiAction-C1CdKGjt.mjs +30 -0
  78. package/dist/chunks/useApiAction-C1CdKGjt.mjs.map +1 -0
  79. package/dist/chunks/useColumnSettings-BDtF5-8R.mjs +216 -0
  80. package/dist/chunks/useColumnSettings-BDtF5-8R.mjs.map +1 -0
  81. package/dist/chunks/useOptionsLoader-D0RTB_ar.mjs +64 -0
  82. package/dist/chunks/useOptionsLoader-D0RTB_ar.mjs.map +1 -0
  83. package/dist/confirm-button/index.mjs +7 -0
  84. package/dist/confirm-button/index.mjs.map +1 -0
  85. package/dist/data-form/index.mjs +7 -0
  86. package/dist/data-form/index.mjs.map +1 -0
  87. package/dist/data-form/style.css +1 -0
  88. package/dist/data-grid/index.mjs +7 -0
  89. package/dist/data-grid/index.mjs.map +1 -0
  90. package/dist/data-grid/style.css +1 -0
  91. package/dist/dialog-button/index.mjs +7 -0
  92. package/dist/dialog-button/index.mjs.map +1 -0
  93. package/dist/drawer/index.mjs +7 -0
  94. package/dist/drawer/index.mjs.map +1 -0
  95. package/dist/drawer/style.css +1 -0
  96. package/dist/drawer-button/index.mjs +7 -0
  97. package/dist/drawer-button/index.mjs.map +1 -0
  98. package/dist/editable-grid/index.mjs +7 -0
  99. package/dist/editable-grid/index.mjs.map +1 -0
  100. package/dist/editable-grid/style.css +1 -0
  101. package/dist/form-item/index.mjs +7 -0
  102. package/dist/form-item/index.mjs.map +1 -0
  103. package/dist/form-item/style.css +1 -0
  104. package/dist/iframe/index.mjs +7 -0
  105. package/dist/iframe/index.mjs.map +1 -0
  106. package/dist/iframe/style.css +1 -0
  107. package/dist/image-upload/index.mjs +7 -0
  108. package/dist/image-upload/index.mjs.map +1 -0
  109. package/dist/image-upload/style.css +1 -0
  110. package/dist/index.esm.js +318 -6495
  111. package/dist/index.esm.js.map +1 -1
  112. package/dist/index.umd.js +20 -9
  113. package/dist/index.umd.js.map +1 -1
  114. package/dist/panel/index.mjs +7 -0
  115. package/dist/panel/index.mjs.map +1 -0
  116. package/dist/panel/style.css +1 -0
  117. package/dist/prompt-button/index.mjs +7 -0
  118. package/dist/prompt-button/index.mjs.map +1 -0
  119. package/dist/radio-list/index.mjs +7 -0
  120. package/dist/radio-list/index.mjs.map +1 -0
  121. package/dist/radio-list/style.css +1 -0
  122. package/dist/requester/index.mjs +7 -0
  123. package/dist/requester/index.mjs.map +1 -0
  124. package/dist/route-button/index.mjs +7 -0
  125. package/dist/route-button/index.mjs.map +1 -0
  126. package/dist/search-item/index.mjs +7 -0
  127. package/dist/search-item/index.mjs.map +1 -0
  128. package/dist/search-item/style.css +1 -0
  129. package/dist/search-panel/index.mjs +7 -0
  130. package/dist/search-panel/index.mjs.map +1 -0
  131. package/dist/search-panel/style.css +1 -0
  132. package/dist/select/index.mjs +7 -0
  133. package/dist/select/index.mjs.map +1 -0
  134. package/dist/station/index.mjs +7 -0
  135. package/dist/station/index.mjs.map +1 -0
  136. package/dist/station/style.css +1 -0
  137. package/dist/style.css +1 -1
  138. package/dist/switch/index.mjs +7 -0
  139. package/dist/switch/index.mjs.map +1 -0
  140. package/dist/tips/index.mjs +7 -0
  141. package/dist/tips/index.mjs.map +1 -0
  142. package/dist/tips/style.css +1 -0
  143. package/dist/tips-button/index.mjs +7 -0
  144. package/dist/tips-button/index.mjs.map +1 -0
  145. package/dist/types/src/components/buttons/ApiButton.vue.d.ts +35 -6
  146. package/dist/types/src/components/buttons/ConfirmButton.vue.d.ts +37 -8
  147. package/dist/types/src/components/buttons/DialogButton.vue.d.ts +89 -29
  148. package/dist/types/src/components/buttons/DrawerButton.vue.d.ts +99 -31
  149. package/dist/types/src/components/buttons/PopconfirmButton.vue.d.ts +317 -0
  150. package/dist/types/src/components/buttons/PromptButton.vue.d.ts +45 -14
  151. package/dist/types/src/components/buttons/RouteButton.vue.d.ts +34 -5
  152. package/dist/types/src/components/buttons/TipsButton.vue.d.ts +8 -15
  153. package/dist/types/src/components/common/props.d.ts +32 -2
  154. package/dist/types/src/components/containers/Drawer.vue.d.ts +61 -8
  155. package/dist/types/src/components/containers/Iframe.vue.d.ts +39 -2
  156. package/dist/types/src/components/containers/containerContext.d.ts +1 -1
  157. package/dist/types/src/components/containers/useContainerController.d.ts +5 -0
  158. package/dist/types/src/components/containers/useIframeContainer.d.ts +20 -0
  159. package/dist/types/src/components/core/Requester.vue.d.ts +41 -0
  160. package/dist/types/src/components/data/datagrid/DataGrid.vue.d.ts +212 -5
  161. package/dist/types/src/components/data/datagrid/useColumnSettings.d.ts +14 -0
  162. package/dist/types/src/components/data/editable-grid/EditableGrid.vue.d.ts +586 -0
  163. package/dist/types/src/components/data/viewer/Viewer.vue.d.ts +187 -0
  164. package/dist/types/src/components/form/FormItem.vue.d.ts +62 -0
  165. package/dist/types/src/components/form/SearchItem.vue.d.ts +62 -0
  166. package/dist/types/src/components/{containers → form}/SearchPanel.vue.d.ts +17 -2
  167. package/dist/types/src/components/form/data-form/DataForm.vue.d.ts +6 -6
  168. package/dist/types/src/components/index.d.ts +10 -6
  169. package/dist/types/src/components/inputs/AutoComplete.vue.d.ts +10 -1
  170. package/dist/types/src/components/inputs/CheckboxList.vue.d.ts +28 -3
  171. package/dist/types/src/components/inputs/RadioList.vue.d.ts +28 -3
  172. package/dist/types/src/components/inputs/Select.vue.d.ts +11 -1
  173. package/dist/types/src/components/inputs/Switch.vue.d.ts +2 -2
  174. package/dist/types/src/components/inputs/useOptionsLoader.d.ts +3 -0
  175. package/dist/types/src/components/layout/Station.vue.d.ts +302 -0
  176. package/dist/types/src/components/layout/StationMenuNode.vue.d.ts +20 -0
  177. package/dist/types/src/components/layout/types.d.ts +54 -0
  178. package/dist/types/src/components/styles/Panel.vue.d.ts +47 -5
  179. package/dist/types/src/components/upload/ImageUpload.vue.d.ts +4 -4
  180. package/dist/types/src/components/upload/Upload.vue.d.ts +1 -1
  181. package/dist/types/src/entries/api-button.d.ts +9 -0
  182. package/dist/types/src/entries/auto-complete.d.ts +9 -0
  183. package/dist/types/src/entries/checkbox-list.d.ts +9 -0
  184. package/dist/types/src/entries/components-map.d.ts +8 -0
  185. package/dist/types/src/entries/confirm-button.d.ts +9 -0
  186. package/dist/types/src/entries/data-form.d.ts +9 -0
  187. package/dist/types/src/entries/data-grid.d.ts +9 -0
  188. package/dist/types/src/entries/dialog-button.d.ts +9 -0
  189. package/dist/types/src/entries/drawer-button.d.ts +9 -0
  190. package/dist/types/src/entries/drawer.d.ts +9 -0
  191. package/dist/types/src/entries/editable-grid.d.ts +9 -0
  192. package/dist/types/src/entries/form-item.d.ts +9 -0
  193. package/dist/types/src/entries/iframe.d.ts +9 -0
  194. package/dist/types/src/entries/image-upload.d.ts +9 -0
  195. package/dist/types/src/entries/panel.d.ts +9 -0
  196. package/dist/types/src/entries/prompt-button.d.ts +9 -0
  197. package/dist/types/src/entries/radio-list.d.ts +9 -0
  198. package/dist/types/src/entries/requester.d.ts +9 -0
  199. package/dist/types/src/entries/route-button.d.ts +9 -0
  200. package/dist/types/src/entries/search-item.d.ts +9 -0
  201. package/dist/types/src/entries/search-panel.d.ts +9 -0
  202. package/dist/types/src/entries/select.d.ts +9 -0
  203. package/dist/types/src/entries/station.d.ts +9 -0
  204. package/dist/types/src/entries/switch.d.ts +9 -0
  205. package/dist/types/src/entries/tips-button.d.ts +9 -0
  206. package/dist/types/src/entries/tips.d.ts +9 -0
  207. package/dist/types/src/entries/upload.d.ts +9 -0
  208. package/dist/types/src/entries/viewer.d.ts +9 -0
  209. package/dist/types/src/index.d.ts +2 -1
  210. package/dist/types/src/lib/composables/useDataGrid.d.ts +15 -0
  211. package/dist/types/src/lib/core/http.d.ts +21 -4
  212. package/dist/types/src/lib/core/station-linkage.d.ts +41 -0
  213. package/dist/types/src/types/config.d.ts +20 -3
  214. package/dist/types/vite.config.d.ts +6 -1
  215. package/dist/upload/index.mjs +7 -0
  216. package/dist/upload/index.mjs.map +1 -0
  217. package/dist/viewer/index.mjs +7 -0
  218. package/dist/viewer/index.mjs.map +1 -0
  219. package/dist/viewer/style.css +1 -0
  220. package/package.json +199 -68
  221. package/dist/types/src/components/containers/Dialog.vue.d.ts +0 -112
  222. package/dist/types/src/components/data/editable-table/EditableTable.vue.d.ts +0 -306
  223. package/dist/types/src/components/utils/Viewer.vue.d.ts +0 -131
@@ -0,0 +1,586 @@
1
+ import { type PropType } from 'vue';
2
+ /** 可编辑列配置 */
3
+ export interface EditableColumn {
4
+ prop: string;
5
+ label: string;
6
+ width?: string | number;
7
+ minWidth?: string | number;
8
+ align?: 'left' | 'center' | 'right';
9
+ fixed?: boolean | 'left' | 'right';
10
+ /** 编辑器类型:input/number/select/date;默认 input */
11
+ editor?: 'input' | 'number' | 'select' | 'date';
12
+ editable?: boolean;
13
+ placeholder?: string;
14
+ /** select 选项 */
15
+ options?: {
16
+ text: string;
17
+ value: any;
18
+ }[];
19
+ /** number 约束 */
20
+ min?: number;
21
+ max?: number;
22
+ precision?: number;
23
+ /** 必填校验 */
24
+ required?: boolean;
25
+ /** 自定义校验:返回错误文案,空串/undefined 为通过 */
26
+ validator?: (value: any, row: Record<string, any>) => string | undefined;
27
+ /**
28
+ * 单元格内容校验规则(与 ElForm 的 rules 完全一致,基于 async-validator)。
29
+ * 规则不满足时单元格显示约束样式,并在保存/行内保存时中断并提示。
30
+ */
31
+ rules?: Array<Record<string, any>>;
32
+ /** 展示格式化(只读态) */
33
+ formatter?: (row: Record<string, any>, col: EditableColumn) => string;
34
+ }
35
+ declare function addRow(): void;
36
+ /** 批量保存:先校验(rules 不满足中断并提示),通过后提交脏行 */
37
+ declare function saveAll(): Promise<void>;
38
+ declare function onChangeCurrentpage(val: number): void;
39
+ declare function onChangePagesize(val: number): void;
40
+ declare function requestApi(options?: {
41
+ apiParam?: Record<string, any>;
42
+ }): Promise<void>;
43
+ declare function refresh(): Promise<void>;
44
+ declare function getSelection(): any[];
45
+ declare function clearSelection(): void;
46
+ declare function search(params?: Record<string, any>): Promise<void>;
47
+ declare function resetSearch(): Promise<import("../../../lib/composables/useDataGrid").ListData>;
48
+ /**
49
+ * 全量校验:默认校验所有行所有列;若传入 columns prop 数组,则只校验指定列;不满足则全部显示错误样式,首错提示并返回 false
50
+ */
51
+ declare function validate(columns?: string[]): Promise<boolean>;
52
+ declare function getDirtyRows(): Record<string, any>[];
53
+ declare var __VLS_1: {
54
+ dirtyRows: Record<string, any>[];
55
+ rows: Record<string, any>[];
56
+ selection: any[];
57
+ }, __VLS_19: {
58
+ dirtyRows: Record<string, any>[];
59
+ rows: Record<string, any>[];
60
+ selection: any[];
61
+ }, __VLS_185: `edit-${string}`, __VLS_186: {
62
+ row: any;
63
+ index: any;
64
+ column: EditableColumn;
65
+ }, __VLS_200: {
66
+ row: any;
67
+ column: EditableColumn;
68
+ index: any;
69
+ }, __VLS_250: `edit-${string}`, __VLS_251: {
70
+ row: any;
71
+ index: any;
72
+ column: EditableColumn;
73
+ }, __VLS_265: {
74
+ row: any;
75
+ column: EditableColumn;
76
+ index: any;
77
+ }, __VLS_327: {
78
+ row: any;
79
+ index: any;
80
+ }, __VLS_329: {}, __VLS_339: {
81
+ row: Record<string, any>;
82
+ index: number;
83
+ };
84
+ type __VLS_Slots = {} & {
85
+ [K in NonNullable<typeof __VLS_185>]?: (props: typeof __VLS_186) => any;
86
+ } & {
87
+ [K in NonNullable<typeof __VLS_250>]?: (props: typeof __VLS_251) => any;
88
+ } & {
89
+ toolbar?: (props: typeof __VLS_1) => any;
90
+ } & {
91
+ actions?: (props: typeof __VLS_19) => any;
92
+ } & {
93
+ 'dirty-tip-{{ col.prop }}'?: (props: typeof __VLS_200) => any;
94
+ } & {
95
+ 'dirty-tip-{{ col.prop }}'?: (props: typeof __VLS_265) => any;
96
+ } & {
97
+ 'row-actions'?: (props: typeof __VLS_327) => any;
98
+ } & {
99
+ empty?: (props: typeof __VLS_329) => any;
100
+ } & {
101
+ 'card-item'?: (props: typeof __VLS_339) => any;
102
+ };
103
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
104
+ /** 可编辑列配置 */
105
+ columns: {
106
+ type: PropType<EditableColumn[]>;
107
+ default: () => never[];
108
+ };
109
+ /** 行数据(v-model,静态数据推荐用法) */
110
+ modelValue: {
111
+ type: PropType<Record<string, any>[]>;
112
+ default: () => never[];
113
+ };
114
+ /** 编辑模式:cell=单元格点击编辑(默认);row=行编辑 */
115
+ editMode: {
116
+ type: PropType<"cell" | "row">;
117
+ default: string;
118
+ };
119
+ /** 批量保存地址;为空时仅本地保存并 emit save */
120
+ saveApi: {
121
+ type: StringConstructor;
122
+ default: string;
123
+ };
124
+ saveMethod: {
125
+ type: PropType<"post" | "put">;
126
+ default: string;
127
+ };
128
+ /** 新增行默认值(对象或工厂函数) */
129
+ defaultRow: {
130
+ type: PropType<Record<string, any> | (() => Record<string, any>)>;
131
+ default: undefined;
132
+ };
133
+ api: {
134
+ type: StringConstructor;
135
+ default: string;
136
+ };
137
+ apiMethod: {
138
+ type: PropType<"get" | "post" | "put" | "delete">;
139
+ default: string;
140
+ };
141
+ apiParam: {
142
+ type: PropType<Record<string, any>>;
143
+ default: () => {};
144
+ };
145
+ active: {
146
+ type: BooleanConstructor;
147
+ default: boolean;
148
+ };
149
+ /** 静态数据(数组);不传时回退到 modelValue */
150
+ dataSource: {
151
+ type: PropType<any[] | any>;
152
+ default: undefined;
153
+ };
154
+ withPager: {
155
+ type: BooleanConstructor;
156
+ default: boolean;
157
+ };
158
+ withSearch: {
159
+ type: BooleanConstructor;
160
+ default: boolean;
161
+ };
162
+ modeSwitch: {
163
+ type: BooleanConstructor;
164
+ default: boolean;
165
+ };
166
+ dynamicColumn: {
167
+ type: BooleanConstructor;
168
+ default: boolean;
169
+ };
170
+ columnStorageKey: {
171
+ type: StringConstructor;
172
+ default: string;
173
+ };
174
+ fix: {
175
+ type: BooleanConstructor;
176
+ default: boolean;
177
+ };
178
+ border: {
179
+ type: BooleanConstructor;
180
+ default: boolean;
181
+ };
182
+ stripe: {
183
+ type: BooleanConstructor;
184
+ default: boolean;
185
+ };
186
+ height: {
187
+ type: PropType<string | number>;
188
+ default: undefined;
189
+ };
190
+ autoHeight: {
191
+ type: BooleanConstructor;
192
+ default: boolean;
193
+ };
194
+ rowKey: {
195
+ type: StringConstructor;
196
+ default: string;
197
+ };
198
+ tableSize: {
199
+ type: PropType<"large" | "default" | "small">;
200
+ default: string;
201
+ };
202
+ pagerStyle: {
203
+ type: PropType<"simple" | "normal" | "full">;
204
+ default: string;
205
+ };
206
+ withIndex: {
207
+ type: BooleanConstructor;
208
+ default: boolean;
209
+ };
210
+ withSelection: {
211
+ type: BooleanConstructor;
212
+ default: boolean;
213
+ };
214
+ rowspanKey: {
215
+ type: StringConstructor;
216
+ default: string;
217
+ };
218
+ rowspanColumn: {
219
+ type: PropType<string[]>;
220
+ default: () => never[];
221
+ };
222
+ treeProps: {
223
+ type: ObjectConstructor;
224
+ default: () => {
225
+ children: string;
226
+ hasChildren: string;
227
+ };
228
+ };
229
+ defaultExpandAll: {
230
+ type: BooleanConstructor;
231
+ default: boolean;
232
+ };
233
+ tools: {
234
+ type: PropType<{
235
+ refresh?: boolean;
236
+ columnSetting?: boolean;
237
+ modeSwitch?: boolean;
238
+ size?: boolean;
239
+ }>;
240
+ default: () => {};
241
+ };
242
+ /** 内置只读操作列配置(渲染行操作按钮,点击 emit row-action) */
243
+ rowActions: {
244
+ type: PropType<Array<{
245
+ text: string;
246
+ command?: string;
247
+ type?: string;
248
+ }>>;
249
+ default: () => never[];
250
+ };
251
+ withToolbar: {
252
+ type: BooleanConstructor;
253
+ default: boolean;
254
+ };
255
+ withAdd: {
256
+ type: BooleanConstructor;
257
+ default: boolean;
258
+ };
259
+ withSave: {
260
+ type: BooleanConstructor;
261
+ default: boolean;
262
+ };
263
+ withDelete: {
264
+ type: BooleanConstructor;
265
+ default: boolean;
266
+ };
267
+ withActions: {
268
+ type: BooleanConstructor;
269
+ default: boolean;
270
+ };
271
+ addButtonText: {
272
+ type: StringConstructor;
273
+ default: string;
274
+ };
275
+ saveButtonText: {
276
+ type: StringConstructor;
277
+ default: string;
278
+ };
279
+ actionWidth: {
280
+ type: (NumberConstructor | StringConstructor)[];
281
+ default: number;
282
+ };
283
+ headRefreshDatagrid: {
284
+ type: PropType<boolean | string>;
285
+ default: boolean;
286
+ };
287
+ filter: {
288
+ type: StringConstructor;
289
+ default: string;
290
+ };
291
+ }>, {
292
+ requestApi: typeof requestApi;
293
+ refresh: typeof refresh;
294
+ search: typeof search;
295
+ resetSearch: typeof resetSearch;
296
+ onChangePagesize: typeof onChangePagesize;
297
+ onChangeCurrentpage: typeof onChangeCurrentpage;
298
+ getSelection: typeof getSelection;
299
+ clearSelection: typeof clearSelection;
300
+ saveAll: typeof saveAll;
301
+ validate: typeof validate;
302
+ addRow: typeof addRow;
303
+ getDirtyRows: typeof getDirtyRows;
304
+ tableRef: import("vue").Ref<any, any>;
305
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
306
+ apiBefore: (...args: any[]) => void;
307
+ apiSuccess: (...args: any[]) => void;
308
+ apiFail: (...args: any[]) => void;
309
+ apiException: (...args: any[]) => void;
310
+ apiAfter: (...args: any[]) => void;
311
+ "row-action": (...args: any[]) => void;
312
+ "page-change": (...args: any[]) => void;
313
+ "selection-change": (...args: any[]) => void;
314
+ "mode-change": (...args: any[]) => void;
315
+ loaded: (...args: any[]) => void;
316
+ "update:modelValue": (...args: any[]) => void;
317
+ change: (...args: any[]) => void;
318
+ save: (...args: any[]) => void;
319
+ "row-add": (...args: any[]) => void;
320
+ "row-remove": (...args: any[]) => void;
321
+ "validate-fail": (...args: any[]) => void;
322
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
323
+ /** 可编辑列配置 */
324
+ columns: {
325
+ type: PropType<EditableColumn[]>;
326
+ default: () => never[];
327
+ };
328
+ /** 行数据(v-model,静态数据推荐用法) */
329
+ modelValue: {
330
+ type: PropType<Record<string, any>[]>;
331
+ default: () => never[];
332
+ };
333
+ /** 编辑模式:cell=单元格点击编辑(默认);row=行编辑 */
334
+ editMode: {
335
+ type: PropType<"cell" | "row">;
336
+ default: string;
337
+ };
338
+ /** 批量保存地址;为空时仅本地保存并 emit save */
339
+ saveApi: {
340
+ type: StringConstructor;
341
+ default: string;
342
+ };
343
+ saveMethod: {
344
+ type: PropType<"post" | "put">;
345
+ default: string;
346
+ };
347
+ /** 新增行默认值(对象或工厂函数) */
348
+ defaultRow: {
349
+ type: PropType<Record<string, any> | (() => Record<string, any>)>;
350
+ default: undefined;
351
+ };
352
+ api: {
353
+ type: StringConstructor;
354
+ default: string;
355
+ };
356
+ apiMethod: {
357
+ type: PropType<"get" | "post" | "put" | "delete">;
358
+ default: string;
359
+ };
360
+ apiParam: {
361
+ type: PropType<Record<string, any>>;
362
+ default: () => {};
363
+ };
364
+ active: {
365
+ type: BooleanConstructor;
366
+ default: boolean;
367
+ };
368
+ /** 静态数据(数组);不传时回退到 modelValue */
369
+ dataSource: {
370
+ type: PropType<any[] | any>;
371
+ default: undefined;
372
+ };
373
+ withPager: {
374
+ type: BooleanConstructor;
375
+ default: boolean;
376
+ };
377
+ withSearch: {
378
+ type: BooleanConstructor;
379
+ default: boolean;
380
+ };
381
+ modeSwitch: {
382
+ type: BooleanConstructor;
383
+ default: boolean;
384
+ };
385
+ dynamicColumn: {
386
+ type: BooleanConstructor;
387
+ default: boolean;
388
+ };
389
+ columnStorageKey: {
390
+ type: StringConstructor;
391
+ default: string;
392
+ };
393
+ fix: {
394
+ type: BooleanConstructor;
395
+ default: boolean;
396
+ };
397
+ border: {
398
+ type: BooleanConstructor;
399
+ default: boolean;
400
+ };
401
+ stripe: {
402
+ type: BooleanConstructor;
403
+ default: boolean;
404
+ };
405
+ height: {
406
+ type: PropType<string | number>;
407
+ default: undefined;
408
+ };
409
+ autoHeight: {
410
+ type: BooleanConstructor;
411
+ default: boolean;
412
+ };
413
+ rowKey: {
414
+ type: StringConstructor;
415
+ default: string;
416
+ };
417
+ tableSize: {
418
+ type: PropType<"large" | "default" | "small">;
419
+ default: string;
420
+ };
421
+ pagerStyle: {
422
+ type: PropType<"simple" | "normal" | "full">;
423
+ default: string;
424
+ };
425
+ withIndex: {
426
+ type: BooleanConstructor;
427
+ default: boolean;
428
+ };
429
+ withSelection: {
430
+ type: BooleanConstructor;
431
+ default: boolean;
432
+ };
433
+ rowspanKey: {
434
+ type: StringConstructor;
435
+ default: string;
436
+ };
437
+ rowspanColumn: {
438
+ type: PropType<string[]>;
439
+ default: () => never[];
440
+ };
441
+ treeProps: {
442
+ type: ObjectConstructor;
443
+ default: () => {
444
+ children: string;
445
+ hasChildren: string;
446
+ };
447
+ };
448
+ defaultExpandAll: {
449
+ type: BooleanConstructor;
450
+ default: boolean;
451
+ };
452
+ tools: {
453
+ type: PropType<{
454
+ refresh?: boolean;
455
+ columnSetting?: boolean;
456
+ modeSwitch?: boolean;
457
+ size?: boolean;
458
+ }>;
459
+ default: () => {};
460
+ };
461
+ /** 内置只读操作列配置(渲染行操作按钮,点击 emit row-action) */
462
+ rowActions: {
463
+ type: PropType<Array<{
464
+ text: string;
465
+ command?: string;
466
+ type?: string;
467
+ }>>;
468
+ default: () => never[];
469
+ };
470
+ withToolbar: {
471
+ type: BooleanConstructor;
472
+ default: boolean;
473
+ };
474
+ withAdd: {
475
+ type: BooleanConstructor;
476
+ default: boolean;
477
+ };
478
+ withSave: {
479
+ type: BooleanConstructor;
480
+ default: boolean;
481
+ };
482
+ withDelete: {
483
+ type: BooleanConstructor;
484
+ default: boolean;
485
+ };
486
+ withActions: {
487
+ type: BooleanConstructor;
488
+ default: boolean;
489
+ };
490
+ addButtonText: {
491
+ type: StringConstructor;
492
+ default: string;
493
+ };
494
+ saveButtonText: {
495
+ type: StringConstructor;
496
+ default: string;
497
+ };
498
+ actionWidth: {
499
+ type: (NumberConstructor | StringConstructor)[];
500
+ default: number;
501
+ };
502
+ headRefreshDatagrid: {
503
+ type: PropType<boolean | string>;
504
+ default: boolean;
505
+ };
506
+ filter: {
507
+ type: StringConstructor;
508
+ default: string;
509
+ };
510
+ }>> & Readonly<{
511
+ onApiBefore?: ((...args: any[]) => any) | undefined;
512
+ onApiSuccess?: ((...args: any[]) => any) | undefined;
513
+ onApiFail?: ((...args: any[]) => any) | undefined;
514
+ onApiException?: ((...args: any[]) => any) | undefined;
515
+ onApiAfter?: ((...args: any[]) => any) | undefined;
516
+ "onRow-action"?: ((...args: any[]) => any) | undefined;
517
+ "onPage-change"?: ((...args: any[]) => any) | undefined;
518
+ "onSelection-change"?: ((...args: any[]) => any) | undefined;
519
+ "onMode-change"?: ((...args: any[]) => any) | undefined;
520
+ onLoaded?: ((...args: any[]) => any) | undefined;
521
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
522
+ onChange?: ((...args: any[]) => any) | undefined;
523
+ onSave?: ((...args: any[]) => any) | undefined;
524
+ "onRow-add"?: ((...args: any[]) => any) | undefined;
525
+ "onRow-remove"?: ((...args: any[]) => any) | undefined;
526
+ "onValidate-fail"?: ((...args: any[]) => any) | undefined;
527
+ }>, {
528
+ filter: string;
529
+ api: string;
530
+ apiMethod: "post" | "delete" | "get" | "put";
531
+ apiParam: Record<string, any>;
532
+ active: boolean;
533
+ dataSource: any;
534
+ withPager: boolean;
535
+ withSearch: boolean;
536
+ modeSwitch: boolean;
537
+ dynamicColumn: boolean;
538
+ columnStorageKey: string;
539
+ fix: boolean;
540
+ border: boolean;
541
+ stripe: boolean;
542
+ height: string | number;
543
+ autoHeight: boolean;
544
+ rowKey: string;
545
+ tableSize: "default" | "small" | "large";
546
+ pagerStyle: "simple" | "normal" | "full";
547
+ withIndex: boolean;
548
+ withSelection: boolean;
549
+ rowspanKey: string;
550
+ rowspanColumn: string[];
551
+ treeProps: Record<string, any>;
552
+ defaultExpandAll: boolean;
553
+ modelValue: Record<string, any>[];
554
+ tools: {
555
+ refresh?: boolean;
556
+ columnSetting?: boolean;
557
+ modeSwitch?: boolean;
558
+ size?: boolean;
559
+ };
560
+ rowActions: {
561
+ text: string;
562
+ command?: string;
563
+ type?: string;
564
+ }[];
565
+ columns: EditableColumn[];
566
+ editMode: "row" | "cell";
567
+ saveApi: string;
568
+ saveMethod: "post" | "put";
569
+ defaultRow: Record<string, any> | (() => Record<string, any>);
570
+ withToolbar: boolean;
571
+ withAdd: boolean;
572
+ withSave: boolean;
573
+ withDelete: boolean;
574
+ withActions: boolean;
575
+ addButtonText: string;
576
+ saveButtonText: string;
577
+ actionWidth: string | number;
578
+ headRefreshDatagrid: string | boolean;
579
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
580
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
581
+ export default _default;
582
+ type __VLS_WithSlots<T, S> = T & {
583
+ new (): {
584
+ $slots: S;
585
+ };
586
+ };