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
package/package.json CHANGED
@@ -1,68 +1,199 @@
1
- {
2
- "name": "workdesktop-ai",
3
- "version": "1.0.2",
4
- "description": "WorkDesktop 企业级 Vue3 组件库(基于 ElementPlus,HTML 模板渲染友好、AI 编码友好)",
5
- "type": "module",
6
- "main": "dist/index.umd.js",
7
- "module": "dist/index.esm.js",
8
- "types": "dist/types/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/types/index.d.ts",
12
- "import": "./dist/index.esm.js",
13
- "require": "./dist/index.umd.js"
14
- },
15
- "./style.css": "./dist/style.css"
16
- },
17
- "files": [
18
- "dist",
19
- "README.md",
20
- "CHANGELOG.md",
21
- "LICENSE"
22
- ],
23
- "scripts": {
24
- "dev": "vite",
25
- "build": "vite build && npm run build:types",
26
- "build:lib": "vite build",
27
- "build:types": "vue-tsc --declaration --emitDeclarationOnly --outDir dist/types",
28
- "typecheck": "vue-tsc --noEmit",
29
- "preview": "vite preview",
30
- "docs:dev": "vite --config docs/vite.config.ts",
31
- "docs:build": "vite build --config docs/vite.config.ts",
32
- "test": "vitest run",
33
- "test:watch": "vitest",
34
- "test:coverage": "vitest run --coverage"
35
- },
36
- "keywords": [
37
- "vue3",
38
- "element-plus",
39
- "component-library",
40
- "workdesktop",
41
- "datagrid",
42
- "dataform"
43
- ],
44
- "license": "MIT",
45
- "peerDependencies": {
46
- "@element-plus/icons-vue": "^2.0.0",
47
- "element-plus": "^2.5.0",
48
- "vue": "^3.3.0"
49
- },
50
- "dependencies": {
51
- "axios": "^1.7.7"
52
- },
53
- "devDependencies": {
54
- "@element-plus/icons-vue": "^2.3.1",
55
- "@types/node": "^22.7.0",
56
- "@vitejs/plugin-vue": "^5.1.4",
57
- "@vitest/coverage-v8": "^2.1.9",
58
- "@vue/test-utils": "^2.5.0",
59
- "element-plus": "^2.8.4",
60
- "happy-dom": "^20.14.0",
61
- "typescript": "~5.6.2",
62
- "vite": "^5.4.8",
63
- "vitest": "^2.1.9",
64
- "vue": "^3.5.10",
65
- "vue-router": "^4.6.4",
66
- "vue-tsc": "^2.1.6"
67
- }
68
- }
1
+ {
2
+ "name": "workdesktop-ai",
3
+ "version": "1.1.0",
4
+ "description": "WorkDesktop 一个企业级 Vue3 组件库(基于 ElementPlus,HTML 模板渲染友好、AI 编码友好)",
5
+ "type": "module",
6
+ "main": "dist/index.umd.js",
7
+ "module": "dist/index.esm.js",
8
+ "types": "dist/types/src/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/src/index.d.ts",
12
+ "import": "./dist/index.esm.js",
13
+ "require": "./dist/index.umd.js"
14
+ },
15
+ "./style.css": "./dist/style.css",
16
+ "./base.css": "./dist/base.css",
17
+ "./api-button": {
18
+ "types": "./dist/types/src/entries/api-button.d.ts",
19
+ "import": "./dist/api-button/index.mjs"
20
+ },
21
+ "./auto-complete": {
22
+ "types": "./dist/types/src/entries/auto-complete.d.ts",
23
+ "import": "./dist/auto-complete/index.mjs"
24
+ },
25
+ "./auto-complete/style.css": "./dist/auto-complete/style.css",
26
+ "./checkbox-list": {
27
+ "types": "./dist/types/src/entries/checkbox-list.d.ts",
28
+ "import": "./dist/checkbox-list/index.mjs"
29
+ },
30
+ "./confirm-button": {
31
+ "types": "./dist/types/src/entries/confirm-button.d.ts",
32
+ "import": "./dist/confirm-button/index.mjs"
33
+ },
34
+ "./data-form": {
35
+ "types": "./dist/types/src/entries/data-form.d.ts",
36
+ "import": "./dist/data-form/index.mjs"
37
+ },
38
+ "./data-form/style.css": "./dist/data-form/style.css",
39
+ "./data-grid": {
40
+ "types": "./dist/types/src/entries/data-grid.d.ts",
41
+ "import": "./dist/data-grid/index.mjs"
42
+ },
43
+ "./data-grid/style.css": "./dist/data-grid/style.css",
44
+ "./dialog-button": {
45
+ "types": "./dist/types/src/entries/dialog-button.d.ts",
46
+ "import": "./dist/dialog-button/index.mjs"
47
+ },
48
+ "./drawer": {
49
+ "types": "./dist/types/src/entries/drawer.d.ts",
50
+ "import": "./dist/drawer/index.mjs"
51
+ },
52
+ "./drawer/style.css": "./dist/drawer/style.css",
53
+ "./drawer-button": {
54
+ "types": "./dist/types/src/entries/drawer-button.d.ts",
55
+ "import": "./dist/drawer-button/index.mjs"
56
+ },
57
+ "./editable-grid": {
58
+ "types": "./dist/types/src/entries/editable-grid.d.ts",
59
+ "import": "./dist/editable-grid/index.mjs"
60
+ },
61
+ "./editable-grid/style.css": "./dist/editable-grid/style.css",
62
+ "./form-item": {
63
+ "types": "./dist/types/src/entries/form-item.d.ts",
64
+ "import": "./dist/form-item/index.mjs"
65
+ },
66
+ "./form-item/style.css": "./dist/form-item/style.css",
67
+ "./iframe": {
68
+ "types": "./dist/types/src/entries/iframe.d.ts",
69
+ "import": "./dist/iframe/index.mjs"
70
+ },
71
+ "./iframe/style.css": "./dist/iframe/style.css",
72
+ "./image-upload": {
73
+ "types": "./dist/types/src/entries/image-upload.d.ts",
74
+ "import": "./dist/image-upload/index.mjs"
75
+ },
76
+ "./image-upload/style.css": "./dist/image-upload/style.css",
77
+ "./panel": {
78
+ "types": "./dist/types/src/entries/panel.d.ts",
79
+ "import": "./dist/panel/index.mjs"
80
+ },
81
+ "./panel/style.css": "./dist/panel/style.css",
82
+ "./prompt-button": {
83
+ "types": "./dist/types/src/entries/prompt-button.d.ts",
84
+ "import": "./dist/prompt-button/index.mjs"
85
+ },
86
+ "./radio-list": {
87
+ "types": "./dist/types/src/entries/radio-list.d.ts",
88
+ "import": "./dist/radio-list/index.mjs"
89
+ },
90
+ "./requester": {
91
+ "types": "./dist/types/src/entries/requester.d.ts",
92
+ "import": "./dist/requester/index.mjs"
93
+ },
94
+ "./route-button": {
95
+ "types": "./dist/types/src/entries/route-button.d.ts",
96
+ "import": "./dist/route-button/index.mjs"
97
+ },
98
+ "./search-item": {
99
+ "types": "./dist/types/src/entries/search-item.d.ts",
100
+ "import": "./dist/search-item/index.mjs"
101
+ },
102
+ "./search-item/style.css": "./dist/search-item/style.css",
103
+ "./search-panel": {
104
+ "types": "./dist/types/src/entries/search-panel.d.ts",
105
+ "import": "./dist/search-panel/index.mjs"
106
+ },
107
+ "./search-panel/style.css": "./dist/search-panel/style.css",
108
+ "./select": {
109
+ "types": "./dist/types/src/entries/select.d.ts",
110
+ "import": "./dist/select/index.mjs"
111
+ },
112
+ "./station": {
113
+ "types": "./dist/types/src/entries/station.d.ts",
114
+ "import": "./dist/station/index.mjs"
115
+ },
116
+ "./station/style.css": "./dist/station/style.css",
117
+ "./switch": {
118
+ "types": "./dist/types/src/entries/switch.d.ts",
119
+ "import": "./dist/switch/index.mjs"
120
+ },
121
+ "./tips": {
122
+ "types": "./dist/types/src/entries/tips.d.ts",
123
+ "import": "./dist/tips/index.mjs"
124
+ },
125
+ "./tips/style.css": "./dist/tips/style.css",
126
+ "./tips-button": {
127
+ "types": "./dist/types/src/entries/tips-button.d.ts",
128
+ "import": "./dist/tips-button/index.mjs"
129
+ },
130
+ "./upload": {
131
+ "types": "./dist/types/src/entries/upload.d.ts",
132
+ "import": "./dist/upload/index.mjs"
133
+ },
134
+ "./viewer": {
135
+ "types": "./dist/types/src/entries/viewer.d.ts",
136
+ "import": "./dist/viewer/index.mjs"
137
+ },
138
+ "./viewer/style.css": "./dist/viewer/style.css",
139
+ "./package.json": "./package.json"
140
+ },
141
+ "sideEffects": [
142
+ "*.css",
143
+ "**/*.css"
144
+ ],
145
+ "files": [
146
+ "dist",
147
+ "README.md",
148
+ "CHANGELOG.md",
149
+ "LICENSE"
150
+ ],
151
+ "scripts": {
152
+ "dev": "vite",
153
+ "build": "npm run build:esm && npm run build:umd && npm run build:types",
154
+ "build:lib": "npm run build:esm && npm run build:umd",
155
+ "build:esm": "vite build",
156
+ "build:umd": "vite build --mode umd",
157
+ "build:types": "vue-tsc --declaration --emitDeclarationOnly --outDir dist/types",
158
+ "typecheck": "vue-tsc --noEmit",
159
+ "preview": "vite preview",
160
+ "docs:dev": "vite --config docs/vite.config.ts",
161
+ "docs:build": "vite build --config docs/vite.config.ts",
162
+ "test": "vitest run",
163
+ "test:watch": "vitest",
164
+ "test:coverage": "vitest run --coverage"
165
+ },
166
+ "keywords": [
167
+ "vue3",
168
+ "element-plus",
169
+ "component-library",
170
+ "workdesktop",
171
+ "datagrid",
172
+ "dataform"
173
+ ],
174
+ "license": "MIT",
175
+ "peerDependencies": {
176
+ "@element-plus/icons-vue": "^2.0.0",
177
+ "element-plus": "^2.5.0",
178
+ "vue": "^3.3.0"
179
+ },
180
+ "dependencies": {
181
+ "async-validator": "^4.2.5",
182
+ "axios": "^1.7.7"
183
+ },
184
+ "devDependencies": {
185
+ "@element-plus/icons-vue": "^2.3.1",
186
+ "@types/node": "^22.7.0",
187
+ "@vitejs/plugin-vue": "^5.1.4",
188
+ "@vitest/coverage-v8": "^2.1.9",
189
+ "@vue/test-utils": "^2.5.0",
190
+ "element-plus": "^2.8.4",
191
+ "happy-dom": "^20.14.0",
192
+ "typescript": "~5.6.2",
193
+ "vite": "^5.4.8",
194
+ "vitest": "^2.1.9",
195
+ "vue": "^3.5.10",
196
+ "vue-router": "^4.6.4",
197
+ "vue-tsc": "^2.1.6"
198
+ }
199
+ }
@@ -1,112 +0,0 @@
1
- import { type PropType } from 'vue';
2
- declare var __VLS_10: {}, __VLS_12: {
3
- close: (reason?: string) => Promise<void>;
4
- };
5
- type __VLS_Slots = {} & {
6
- default?: (props: typeof __VLS_10) => any;
7
- } & {
8
- footer?: (props: typeof __VLS_12) => any;
9
- };
10
- declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
- modelValue: {
12
- type: BooleanConstructor;
13
- default: undefined;
14
- };
15
- title: {
16
- type: StringConstructor;
17
- default: string;
18
- };
19
- /** iframe 地址(设置后容器内以 iframe 加载) */
20
- url: {
21
- type: StringConstructor;
22
- default: string;
23
- };
24
- /** 宽度 */
25
- size: {
26
- type: (NumberConstructor | StringConstructor)[];
27
- default: string;
28
- };
29
- /** 关闭前确认文案(设置后关闭弹确认) */
30
- confirmMessage: {
31
- type: StringConstructor;
32
- default: string;
33
- };
34
- /** 容器携带数据(传给内部表单) */
35
- data: {
36
- type: PropType<Record<string, any>>;
37
- default: undefined;
38
- };
39
- headRefreshDatagrid: {
40
- type: PropType<boolean | string>;
41
- default: boolean;
42
- };
43
- filter: {
44
- type: StringConstructor;
45
- default: string;
46
- };
47
- }>, {
48
- open: () => boolean;
49
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
50
- close: (...args: any[]) => void;
51
- "update:modelValue": (...args: any[]) => void;
52
- confirm: (...args: any[]) => void;
53
- open: (...args: any[]) => void;
54
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
55
- modelValue: {
56
- type: BooleanConstructor;
57
- default: undefined;
58
- };
59
- title: {
60
- type: StringConstructor;
61
- default: string;
62
- };
63
- /** iframe 地址(设置后容器内以 iframe 加载) */
64
- url: {
65
- type: StringConstructor;
66
- default: string;
67
- };
68
- /** 宽度 */
69
- size: {
70
- type: (NumberConstructor | StringConstructor)[];
71
- default: string;
72
- };
73
- /** 关闭前确认文案(设置后关闭弹确认) */
74
- confirmMessage: {
75
- type: StringConstructor;
76
- default: string;
77
- };
78
- /** 容器携带数据(传给内部表单) */
79
- data: {
80
- type: PropType<Record<string, any>>;
81
- default: undefined;
82
- };
83
- headRefreshDatagrid: {
84
- type: PropType<boolean | string>;
85
- default: boolean;
86
- };
87
- filter: {
88
- type: StringConstructor;
89
- default: string;
90
- };
91
- }>> & Readonly<{
92
- onClose?: ((...args: any[]) => any) | undefined;
93
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
94
- onConfirm?: ((...args: any[]) => any) | undefined;
95
- onOpen?: ((...args: any[]) => any) | undefined;
96
- }>, {
97
- data: Record<string, any>;
98
- title: string;
99
- size: string | number;
100
- filter: string;
101
- url: string;
102
- modelValue: boolean;
103
- headRefreshDatagrid: string | boolean;
104
- confirmMessage: string;
105
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
106
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
107
- export default _default;
108
- type __VLS_WithSlots<T, S> = T & {
109
- new (): {
110
- $slots: S;
111
- };
112
- };
@@ -1,306 +0,0 @@
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
- formatter?: (row: Record<string, any>, col: EditableColumn) => string;
29
- }
30
- declare function addRow(): void;
31
- /** 批量保存:先校验,通过后提交脏行 */
32
- declare function saveAll(): Promise<void>;
33
- /** 外部命令式入口 */
34
- declare function validate(): boolean;
35
- declare function getDirtyRows(): Record<string, any>[];
36
- declare var __VLS_1: {
37
- dirtyRows: Record<string, any>[];
38
- rows: Record<string, any>[];
39
- }, __VLS_19: {
40
- dirtyRows: Record<string, any>[];
41
- rows: Record<string, any>[];
42
- }, __VLS_76: `edit-${string}`, __VLS_77: {
43
- row: any;
44
- index: any;
45
- column: EditableColumn;
46
- }, __VLS_127: `edit-${string}`, __VLS_128: {
47
- row: any;
48
- index: any;
49
- column: EditableColumn;
50
- }, __VLS_174: {
51
- row: any;
52
- index: any;
53
- }, __VLS_176: {};
54
- type __VLS_Slots = {} & {
55
- [K in NonNullable<typeof __VLS_76>]?: (props: typeof __VLS_77) => any;
56
- } & {
57
- [K in NonNullable<typeof __VLS_127>]?: (props: typeof __VLS_128) => any;
58
- } & {
59
- toolbar?: (props: typeof __VLS_1) => any;
60
- } & {
61
- actions?: (props: typeof __VLS_19) => any;
62
- } & {
63
- 'row-actions'?: (props: typeof __VLS_174) => any;
64
- } & {
65
- empty?: (props: typeof __VLS_176) => any;
66
- };
67
- declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
68
- /** 列配置 */
69
- columns: {
70
- type: PropType<EditableColumn[]>;
71
- default: () => never[];
72
- };
73
- /** 表格数据(v-model) */
74
- modelValue: {
75
- type: PropType<Record<string, any>[]>;
76
- default: () => never[];
77
- };
78
- /** 编辑模式:cell=单元格点击编辑(默认);row=行编辑 */
79
- editMode: {
80
- type: PropType<"cell" | "row">;
81
- default: string;
82
- };
83
- /** 批量保存地址;为空时仅本地保存并 emit save */
84
- saveApi: {
85
- type: StringConstructor;
86
- default: string;
87
- };
88
- saveMethod: {
89
- type: PropType<"post" | "put">;
90
- default: string;
91
- };
92
- /** 新增行默认值(对象或工厂函数) */
93
- defaultRow: {
94
- type: PropType<Record<string, any> | (() => Record<string, any>)>;
95
- default: undefined;
96
- };
97
- rowKey: {
98
- type: StringConstructor;
99
- default: string;
100
- };
101
- withToolbar: {
102
- type: BooleanConstructor;
103
- default: boolean;
104
- };
105
- withAdd: {
106
- type: BooleanConstructor;
107
- default: boolean;
108
- };
109
- withSave: {
110
- type: BooleanConstructor;
111
- default: boolean;
112
- };
113
- withDelete: {
114
- type: BooleanConstructor;
115
- default: boolean;
116
- };
117
- withIndex: {
118
- type: BooleanConstructor;
119
- default: boolean;
120
- };
121
- withActions: {
122
- type: BooleanConstructor;
123
- default: boolean;
124
- };
125
- addButtonText: {
126
- type: StringConstructor;
127
- default: string;
128
- };
129
- saveButtonText: {
130
- type: StringConstructor;
131
- default: string;
132
- };
133
- actionWidth: {
134
- type: (NumberConstructor | StringConstructor)[];
135
- default: number;
136
- };
137
- border: {
138
- type: BooleanConstructor;
139
- default: boolean;
140
- };
141
- stripe: {
142
- type: BooleanConstructor;
143
- default: boolean;
144
- };
145
- size: {
146
- type: PropType<"large" | "default" | "small">;
147
- default: string;
148
- };
149
- headRefreshDatagrid: {
150
- type: PropType<boolean | string>;
151
- default: boolean;
152
- };
153
- filter: {
154
- type: StringConstructor;
155
- default: string;
156
- };
157
- }>, {
158
- saveAll: typeof saveAll;
159
- validate: typeof validate;
160
- addRow: typeof addRow;
161
- getDirtyRows: typeof getDirtyRows;
162
- tableRef: import("vue").Ref<any, any>;
163
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
164
- apiBefore: (...args: any[]) => void;
165
- apiSuccess: (...args: any[]) => void;
166
- apiFail: (...args: any[]) => void;
167
- apiException: (...args: any[]) => void;
168
- apiAfter: (...args: any[]) => void;
169
- "update:modelValue": (...args: any[]) => void;
170
- change: (...args: any[]) => void;
171
- save: (...args: any[]) => void;
172
- "row-add": (...args: any[]) => void;
173
- "row-remove": (...args: any[]) => void;
174
- "validate-fail": (...args: any[]) => void;
175
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
176
- /** 列配置 */
177
- columns: {
178
- type: PropType<EditableColumn[]>;
179
- default: () => never[];
180
- };
181
- /** 表格数据(v-model) */
182
- modelValue: {
183
- type: PropType<Record<string, any>[]>;
184
- default: () => never[];
185
- };
186
- /** 编辑模式:cell=单元格点击编辑(默认);row=行编辑 */
187
- editMode: {
188
- type: PropType<"cell" | "row">;
189
- default: string;
190
- };
191
- /** 批量保存地址;为空时仅本地保存并 emit save */
192
- saveApi: {
193
- type: StringConstructor;
194
- default: string;
195
- };
196
- saveMethod: {
197
- type: PropType<"post" | "put">;
198
- default: string;
199
- };
200
- /** 新增行默认值(对象或工厂函数) */
201
- defaultRow: {
202
- type: PropType<Record<string, any> | (() => Record<string, any>)>;
203
- default: undefined;
204
- };
205
- rowKey: {
206
- type: StringConstructor;
207
- default: string;
208
- };
209
- withToolbar: {
210
- type: BooleanConstructor;
211
- default: boolean;
212
- };
213
- withAdd: {
214
- type: BooleanConstructor;
215
- default: boolean;
216
- };
217
- withSave: {
218
- type: BooleanConstructor;
219
- default: boolean;
220
- };
221
- withDelete: {
222
- type: BooleanConstructor;
223
- default: boolean;
224
- };
225
- withIndex: {
226
- type: BooleanConstructor;
227
- default: boolean;
228
- };
229
- withActions: {
230
- type: BooleanConstructor;
231
- default: boolean;
232
- };
233
- addButtonText: {
234
- type: StringConstructor;
235
- default: string;
236
- };
237
- saveButtonText: {
238
- type: StringConstructor;
239
- default: string;
240
- };
241
- actionWidth: {
242
- type: (NumberConstructor | StringConstructor)[];
243
- default: number;
244
- };
245
- border: {
246
- type: BooleanConstructor;
247
- default: boolean;
248
- };
249
- stripe: {
250
- type: BooleanConstructor;
251
- default: boolean;
252
- };
253
- size: {
254
- type: PropType<"large" | "default" | "small">;
255
- default: string;
256
- };
257
- headRefreshDatagrid: {
258
- type: PropType<boolean | string>;
259
- default: boolean;
260
- };
261
- filter: {
262
- type: StringConstructor;
263
- default: string;
264
- };
265
- }>> & Readonly<{
266
- onApiBefore?: ((...args: any[]) => any) | undefined;
267
- onApiSuccess?: ((...args: any[]) => any) | undefined;
268
- onApiFail?: ((...args: any[]) => any) | undefined;
269
- onApiException?: ((...args: any[]) => any) | undefined;
270
- onApiAfter?: ((...args: any[]) => any) | undefined;
271
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
272
- onChange?: ((...args: any[]) => any) | undefined;
273
- onSave?: ((...args: any[]) => any) | undefined;
274
- "onRow-add"?: ((...args: any[]) => any) | undefined;
275
- "onRow-remove"?: ((...args: any[]) => any) | undefined;
276
- "onValidate-fail"?: ((...args: any[]) => any) | undefined;
277
- }>, {
278
- size: "default" | "small" | "large";
279
- filter: string;
280
- border: boolean;
281
- stripe: boolean;
282
- rowKey: string;
283
- withIndex: boolean;
284
- columns: EditableColumn[];
285
- modelValue: Record<string, any>[];
286
- editMode: "row" | "cell";
287
- saveApi: string;
288
- saveMethod: "post" | "put";
289
- defaultRow: Record<string, any> | (() => Record<string, any>);
290
- withToolbar: boolean;
291
- withAdd: boolean;
292
- withSave: boolean;
293
- withDelete: boolean;
294
- withActions: boolean;
295
- addButtonText: string;
296
- saveButtonText: string;
297
- actionWidth: string | number;
298
- headRefreshDatagrid: string | boolean;
299
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
300
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
301
- export default _default;
302
- type __VLS_WithSlots<T, S> = T & {
303
- new (): {
304
- $slots: S;
305
- };
306
- };