workdesktop-ai 1.0.2 → 1.1.1

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 (224) 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-KKzJxwpV.mjs +80 -0
  14. package/dist/chunks/ApiButton.vue_vue_type_script_setup_true_lang-KKzJxwpV.mjs.map +1 -0
  15. package/dist/chunks/AutoComplete-CLV_PwcZ.mjs +80 -0
  16. package/dist/chunks/AutoComplete-CLV_PwcZ.mjs.map +1 -0
  17. package/dist/chunks/CheckboxList-Bx3Ce1q5.mjs +129 -0
  18. package/dist/chunks/CheckboxList-Bx3Ce1q5.mjs.map +1 -0
  19. package/dist/chunks/ConfirmButton.vue_vue_type_script_setup_true_lang-D4w6G2Kv.mjs +99 -0
  20. package/dist/chunks/ConfirmButton.vue_vue_type_script_setup_true_lang-D4w6G2Kv.mjs.map +1 -0
  21. package/dist/chunks/DataForm-C5MBVdei.mjs +305 -0
  22. package/dist/chunks/DataForm-C5MBVdei.mjs.map +1 -0
  23. package/dist/chunks/DataGrid-HUzKWuQx.mjs +1124 -0
  24. package/dist/chunks/DataGrid-HUzKWuQx.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-C8A-nJZv.mjs +1783 -0
  32. package/dist/chunks/EditableGrid-C8A-nJZv.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-DGehzaYa.mjs +193 -0
  38. package/dist/chunks/ImageUpload-DGehzaYa.mjs.map +1 -0
  39. package/dist/chunks/Panel-CrRqBTj6.mjs +115 -0
  40. package/dist/chunks/Panel-CrRqBTj6.mjs.map +1 -0
  41. package/dist/chunks/PromptButton.vue_vue_type_script_setup_true_lang-Gck1QAHc.mjs +118 -0
  42. package/dist/chunks/PromptButton.vue_vue_type_script_setup_true_lang-Gck1QAHc.mjs.map +1 -0
  43. package/dist/chunks/RadioList-vE8JOuST.mjs +129 -0
  44. package/dist/chunks/RadioList-vE8JOuST.mjs.map +1 -0
  45. package/dist/chunks/Requester.vue_vue_type_script_setup_true_lang-B8TwXbYR.mjs +80 -0
  46. package/dist/chunks/Requester.vue_vue_type_script_setup_true_lang-B8TwXbYR.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-DAGZDXvI.mjs +114 -0
  54. package/dist/chunks/Select-DAGZDXvI.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-CulPqp7M.mjs +71 -0
  58. package/dist/chunks/Switch.vue_vue_type_script_setup_true_lang-CulPqp7M.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-D07Bhllc.mjs +200 -0
  64. package/dist/chunks/Upload.vue_vue_type_script_setup_true_lang-D07Bhllc.mjs.map +1 -0
  65. package/dist/chunks/Viewer-iub6TjoD.mjs +381 -0
  66. package/dist/chunks/Viewer-iub6TjoD.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-Bs-dM076.mjs +2951 -0
  72. package/dist/chunks/http-Bs-dM076.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-6_vvf5Fd.mjs +30 -0
  78. package/dist/chunks/useApiAction-6_vvf5Fd.mjs.map +1 -0
  79. package/dist/chunks/useColumnSettings-BYDQdk4o.mjs +216 -0
  80. package/dist/chunks/useColumnSettings-BYDQdk4o.mjs.map +1 -0
  81. package/dist/chunks/useOptionsLoader-Bi8oqNbG.mjs +64 -0
  82. package/dist/chunks/useOptionsLoader-Bi8oqNbG.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 +58 -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/llms.txt +658 -0
  221. package/package.json +200 -68
  222. package/dist/types/src/components/containers/Dialog.vue.d.ts +0 -112
  223. package/dist/types/src/components/data/editable-table/EditableTable.vue.d.ts +0 -306
  224. package/dist/types/src/components/utils/Viewer.vue.d.ts +0 -131
@@ -1,7 +1,9 @@
1
1
  import { type PropType } from 'vue';
2
- declare var __VLS_10: {};
2
+ declare var __VLS_14: {}, __VLS_25: {};
3
3
  type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_10) => any;
4
+ default?: (props: typeof __VLS_14) => any;
5
+ } & {
6
+ default?: (props: typeof __VLS_25) => any;
5
7
  };
6
8
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
9
  /** 路由 name(与 routePath 二选一) */
@@ -29,7 +31,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
29
31
  type: PropType<"_self" | "_blank">;
30
32
  default: string;
31
33
  };
32
- text: {
34
+ tips: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ tipsType: {
39
+ type: PropType<"dark" | "light">;
40
+ default: string;
41
+ };
42
+ placement: {
43
+ type: PropType<"top" | "bottom" | "left" | "right" | string>;
44
+ default: string;
45
+ };
46
+ label: {
33
47
  type: StringConstructor;
34
48
  default: string;
35
49
  };
@@ -65,7 +79,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
65
79
  type: PropType<"_self" | "_blank">;
66
80
  default: string;
67
81
  };
68
- text: {
82
+ tips: {
83
+ type: StringConstructor;
84
+ default: string;
85
+ };
86
+ tipsType: {
87
+ type: PropType<"dark" | "light">;
88
+ default: string;
89
+ };
90
+ placement: {
91
+ type: PropType<"top" | "bottom" | "left" | "right" | string>;
92
+ default: string;
93
+ };
94
+ label: {
69
95
  type: StringConstructor;
70
96
  default: string;
71
97
  };
@@ -76,11 +102,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
76
102
  }>> & Readonly<{
77
103
  onClick?: ((...args: any[]) => any) | undefined;
78
104
  }>, {
79
- text: string;
105
+ label: string;
106
+ placement: string;
80
107
  filter: string;
81
108
  target: "_self" | "_blank";
82
109
  query: Record<string, any>;
83
110
  params: Record<string, any>;
111
+ tips: string;
112
+ tipsType: "dark" | "light";
84
113
  routeName: string;
85
114
  routePath: string;
86
115
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,3 @@
1
- import type { PropType } from 'vue';
2
1
  declare var __VLS_14: {}, __VLS_25: {};
3
2
  type __VLS_Slots = {} & {
4
3
  default?: (props: typeof __VLS_14) => any;
@@ -6,22 +5,19 @@ type __VLS_Slots = {} & {
6
5
  default?: (props: typeof __VLS_25) => any;
7
6
  };
8
7
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
9
- /** 悬停提示内容 */
10
8
  tips: {
11
9
  type: StringConstructor;
12
10
  default: string;
13
11
  };
14
- /** tooltip 主题:dark/light */
15
12
  tipsType: {
16
- type: PropType<"dark" | "light">;
13
+ type: import("vue").PropType<"dark" | "light">;
17
14
  default: string;
18
15
  };
19
- /** 弹出位置 */
20
16
  placement: {
21
- type: PropType<"top" | "bottom" | "left" | "right" | string>;
17
+ type: import("vue").PropType<"top" | "bottom" | "left" | "right" | string>;
22
18
  default: string;
23
19
  };
24
- text: {
20
+ label: {
25
21
  type: StringConstructor;
26
22
  default: string;
27
23
  };
@@ -32,22 +28,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
32
28
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
29
  click: (...args: any[]) => void;
34
30
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
35
- /** 悬停提示内容 */
36
31
  tips: {
37
32
  type: StringConstructor;
38
33
  default: string;
39
34
  };
40
- /** tooltip 主题:dark/light */
41
35
  tipsType: {
42
- type: PropType<"dark" | "light">;
36
+ type: import("vue").PropType<"dark" | "light">;
43
37
  default: string;
44
38
  };
45
- /** 弹出位置 */
46
39
  placement: {
47
- type: PropType<"top" | "bottom" | "left" | "right" | string>;
40
+ type: import("vue").PropType<"top" | "bottom" | "left" | "right" | string>;
48
41
  default: string;
49
42
  };
50
- text: {
43
+ label: {
51
44
  type: StringConstructor;
52
45
  default: string;
53
46
  };
@@ -58,11 +51,11 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
58
51
  }>> & Readonly<{
59
52
  onClick?: ((...args: any[]) => any) | undefined;
60
53
  }>, {
61
- text: string;
54
+ label: string;
62
55
  placement: string;
63
- tipsType: "dark" | "light";
64
56
  filter: string;
65
57
  tips: string;
58
+ tipsType: "dark" | "light";
66
59
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
67
60
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
68
61
  export default _default;
@@ -16,13 +16,38 @@ export declare const headRefreshDatagridProp: {
16
16
  default: boolean;
17
17
  };
18
18
  };
19
- /** 按钮文字(属性式写法,也可用默认插槽覆盖;声明后不再透传给 el-button 的布尔 text) */
19
+ /**
20
+ * 按钮文字属性(属性式写法,也可用默认插槽覆盖)。
21
+ * 命名用 label 而非 text:el-button 的 text 是「文字按钮」布尔开关,通过 $attrs 透传支持,
22
+ * 组件不再截获该名,避免同名冲突(文字按钮样式直接写 text 属性即可)。
23
+ */
20
24
  export declare const buttonTextProp: {
21
- text: {
25
+ label: {
22
26
  type: StringConstructor;
23
27
  default: string;
24
28
  };
25
29
  };
30
+ /**
31
+ * 悬停提示共享 props,所有按钮都支持基于 el-tooltip 的悬停提示。
32
+ * 仅当设置非空 tips 时显示 tooltip。
33
+ */
34
+ export declare const tipsProp: {
35
+ /** 悬停提示内容 */
36
+ tips: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ /** tooltip 主题:dark/light */
41
+ tipsType: {
42
+ type: PropType<"dark" | "light">;
43
+ default: string;
44
+ };
45
+ /** 弹出位置 */
46
+ placement: {
47
+ type: PropType<"top" | "bottom" | "left" | "right" | string>;
48
+ default: string;
49
+ };
50
+ };
26
51
  /** API 类共享 props(按钮组 / 输入选择组 / 上传组等能力组件) */
27
52
  export declare const apiProps: {
28
53
  /** 请求地址(无则不请求) */
@@ -67,6 +92,11 @@ export declare const optionsProps: {
67
92
  type: StringConstructor;
68
93
  default: string;
69
94
  };
95
+ /** 选项悬停提示字段:数据项该字段非空时,鼠标悬停选项显示 tooltip(默认 tips) */
96
+ tipsProp: {
97
+ type: StringConstructor;
98
+ default: string;
99
+ };
70
100
  /** 选项前插固定项 */
71
101
  addData: {
72
102
  type: PropType<any[]>;
@@ -1,11 +1,17 @@
1
1
  import { type PropType } from 'vue';
2
2
  declare var __VLS_10: {}, __VLS_12: {
3
3
  close: (reason?: string) => Promise<void>;
4
+ }, __VLS_23: {}, __VLS_25: {
5
+ close: (reason?: string) => Promise<void>;
4
6
  };
5
7
  type __VLS_Slots = {} & {
6
8
  default?: (props: typeof __VLS_10) => any;
7
9
  } & {
8
10
  footer?: (props: typeof __VLS_12) => any;
11
+ } & {
12
+ default?: (props: typeof __VLS_23) => any;
13
+ } & {
14
+ footer?: (props: typeof __VLS_25) => any;
9
15
  };
10
16
  declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
17
  modelValue: {
@@ -16,29 +22,46 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
16
22
  type: StringConstructor;
17
23
  default: string;
18
24
  };
19
- /** iframe 地址 */
25
+ /** iframe 地址(设置后容器内以 iframe 加载) */
20
26
  url: {
21
27
  type: StringConstructor;
22
28
  default: string;
23
29
  };
24
- /** 抽屉尺寸(宽度/高度) */
30
+ /** 安全校验:允许的消息来源 origin */
31
+ origin: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ /** 弹出形式:drawer 抽屉(默认)/ dialog 对话框 */
36
+ mode: {
37
+ type: PropType<"drawer" | "dialog">;
38
+ default: string;
39
+ };
40
+ /** 尺寸(抽屉宽度/高度,对话框宽度;数字按 px) */
25
41
  size: {
26
42
  type: (NumberConstructor | StringConstructor)[];
27
43
  default: string;
28
44
  };
29
- /** 弹出方向 rtl/ltr/ttb/btt */
45
+ /** 抽屉弹出方向 rtl/ltr/ttb/btt(仅 mode=drawer 生效) */
30
46
  direction: {
31
47
  type: PropType<"rtl" | "ltr" | "ttb" | "btt">;
32
48
  default: string;
33
49
  };
50
+ /** 关闭前确认文案(设置后关闭弹确认) */
34
51
  confirmMessage: {
35
52
  type: StringConstructor;
36
53
  default: string;
37
54
  };
55
+ /** 容器携带数据(传给内部表单) */
38
56
  data: {
39
57
  type: PropType<Record<string, any>>;
40
58
  default: undefined;
41
59
  };
60
+ /** 每次打开时重新加载 iframe 内容(url 模式生效;默认 false 保留上次内容) */
61
+ reloadOnOpen: {
62
+ type: BooleanConstructor;
63
+ default: boolean;
64
+ };
42
65
  headRefreshDatagrid: {
43
66
  type: PropType<boolean | string>;
44
67
  default: boolean;
@@ -49,11 +72,17 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
49
72
  };
50
73
  }>, {
51
74
  open: () => boolean;
75
+ /** 向 iframe 内发送指令(如 wd-container:submit 触发表单提交) */
76
+ sendToIframe: (type: string, payload?: any) => void;
52
77
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
78
+ confirm: (...args: any[]) => void;
53
79
  close: (...args: any[]) => void;
54
80
  "update:modelValue": (...args: any[]) => void;
55
- confirm: (...args: any[]) => void;
56
81
  open: (...args: any[]) => void;
82
+ "iframe-message": (...args: any[]) => void;
83
+ "iframe-submit-success": (...args: any[]) => void;
84
+ "iframe-dirty": (...args: any[]) => void;
85
+ "iframe-ready": (...args: any[]) => void;
57
86
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
58
87
  modelValue: {
59
88
  type: BooleanConstructor;
@@ -63,29 +92,46 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
63
92
  type: StringConstructor;
64
93
  default: string;
65
94
  };
66
- /** iframe 地址 */
95
+ /** iframe 地址(设置后容器内以 iframe 加载) */
67
96
  url: {
68
97
  type: StringConstructor;
69
98
  default: string;
70
99
  };
71
- /** 抽屉尺寸(宽度/高度) */
100
+ /** 安全校验:允许的消息来源 origin */
101
+ origin: {
102
+ type: StringConstructor;
103
+ default: string;
104
+ };
105
+ /** 弹出形式:drawer 抽屉(默认)/ dialog 对话框 */
106
+ mode: {
107
+ type: PropType<"drawer" | "dialog">;
108
+ default: string;
109
+ };
110
+ /** 尺寸(抽屉宽度/高度,对话框宽度;数字按 px) */
72
111
  size: {
73
112
  type: (NumberConstructor | StringConstructor)[];
74
113
  default: string;
75
114
  };
76
- /** 弹出方向 rtl/ltr/ttb/btt */
115
+ /** 抽屉弹出方向 rtl/ltr/ttb/btt(仅 mode=drawer 生效) */
77
116
  direction: {
78
117
  type: PropType<"rtl" | "ltr" | "ttb" | "btt">;
79
118
  default: string;
80
119
  };
120
+ /** 关闭前确认文案(设置后关闭弹确认) */
81
121
  confirmMessage: {
82
122
  type: StringConstructor;
83
123
  default: string;
84
124
  };
125
+ /** 容器携带数据(传给内部表单) */
85
126
  data: {
86
127
  type: PropType<Record<string, any>>;
87
128
  default: undefined;
88
129
  };
130
+ /** 每次打开时重新加载 iframe 内容(url 模式生效;默认 false 保留上次内容) */
131
+ reloadOnOpen: {
132
+ type: BooleanConstructor;
133
+ default: boolean;
134
+ };
89
135
  headRefreshDatagrid: {
90
136
  type: PropType<boolean | string>;
91
137
  default: boolean;
@@ -95,20 +141,27 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
95
141
  default: string;
96
142
  };
97
143
  }>> & Readonly<{
144
+ onConfirm?: ((...args: any[]) => any) | undefined;
98
145
  onClose?: ((...args: any[]) => any) | undefined;
99
146
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
100
- onConfirm?: ((...args: any[]) => any) | undefined;
101
147
  onOpen?: ((...args: any[]) => any) | undefined;
148
+ "onIframe-message"?: ((...args: any[]) => any) | undefined;
149
+ "onIframe-submit-success"?: ((...args: any[]) => any) | undefined;
150
+ "onIframe-dirty"?: ((...args: any[]) => any) | undefined;
151
+ "onIframe-ready"?: ((...args: any[]) => any) | undefined;
102
152
  }>, {
103
153
  data: Record<string, any>;
104
154
  title: string;
105
155
  size: string | number;
106
156
  filter: string;
157
+ mode: "dialog" | "drawer";
107
158
  url: string;
108
159
  modelValue: boolean;
109
160
  headRefreshDatagrid: string | boolean;
110
161
  confirmMessage: string;
162
+ origin: string;
111
163
  direction: "rtl" | "ltr" | "ttb" | "btt";
164
+ reloadOnOpen: boolean;
112
165
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
113
166
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
114
167
  export default _default;
@@ -1,3 +1,9 @@
1
+ /**
2
+ * 父 → 子:向 iframe 内页面发送消息(子页通过 window.addEventListener('message') 接收)
3
+ */
4
+ declare function send(message: any): void;
5
+ /** 强制重新加载 iframe 内容(重建 iframe 元素) */
6
+ declare function refresh(): void;
1
7
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
8
  /** iframe 地址 */
3
9
  src: {
@@ -14,7 +20,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
14
20
  type: BooleanConstructor;
15
21
  default: boolean;
16
22
  };
17
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
23
+ /** 发送消息时使用的 targetOrigin(默认同源;跨域时需显式指定子页面 origin) */
24
+ origin: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ /**
29
+ * 刷新信号:值变化时强制重新加载 iframe 内容。
30
+ * 常用于「每次显示时刷新」:父级在显示时机自增该值即可(例如 v-if 重建时不需此 prop,仅当 iframe 常驻 DOM 时才需要)。
31
+ */
32
+ refreshKey: {
33
+ type: (NumberConstructor | StringConstructor)[];
34
+ default: number;
35
+ };
36
+ }>, {
37
+ send: typeof send;
38
+ refresh: typeof refresh;
39
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
40
  message: (...args: any[]) => void;
19
41
  load: (...args: any[]) => void;
20
42
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -33,12 +55,27 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
33
55
  type: BooleanConstructor;
34
56
  default: boolean;
35
57
  };
58
+ /** 发送消息时使用的 targetOrigin(默认同源;跨域时需显式指定子页面 origin) */
59
+ origin: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ /**
64
+ * 刷新信号:值变化时强制重新加载 iframe 内容。
65
+ * 常用于「每次显示时刷新」:父级在显示时机自增该值即可(例如 v-if 重建时不需此 prop,仅当 iframe 常驻 DOM 时才需要)。
66
+ */
67
+ refreshKey: {
68
+ type: (NumberConstructor | StringConstructor)[];
69
+ default: number;
70
+ };
36
71
  }>> & Readonly<{
37
72
  onMessage?: ((...args: any[]) => any) | undefined;
38
73
  onLoad?: ((...args: any[]) => any) | undefined;
39
74
  }>, {
40
- autoHeight: boolean;
41
75
  height: string | number;
76
+ autoHeight: boolean;
77
+ origin: string;
42
78
  src: string;
79
+ refreshKey: string | number;
43
80
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
44
81
  export default _default;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { type InjectionKey } from 'vue';
5
5
  export interface ContainerContext {
6
- /** 容器携带的数据(DrawerButton drawerData 等,供内部表单回填) */
6
+ /** 容器携带的数据(DrawerButton data 等,供内部表单回填) */
7
7
  data?: Record<string, any>;
8
8
  /** 请求关闭容器(DataForm headCloseDrawer 提交成功后调用) */
9
9
  requestClose: (reason?: string) => void;
@@ -6,6 +6,8 @@ export declare function useContainerController(options: {
6
6
  confirmMessage?: string;
7
7
  headRefreshDatagrid?: boolean | string;
8
8
  filter?: string;
9
+ data?: Record<string, any>;
10
+ origin?: string;
9
11
  [key: string]: any;
10
12
  };
11
13
  emit: (event: any, ...args: any[]) => void;
@@ -16,4 +18,7 @@ export declare function useContainerController(options: {
16
18
  addBeforeClose: (guard: () => Promise<boolean>) => () => boolean;
17
19
  handleBeforeClose: (done: () => void) => Promise<void>;
18
20
  onClosed: () => void;
21
+ setIframeRef: (el: HTMLIFrameElement | null) => void;
22
+ sendToIframe: (type: string, payload?: any) => void;
23
+ targetOrigin: import("vue").ComputedRef<string>;
19
24
  };
@@ -0,0 +1,20 @@
1
+ export interface IframeContainerApi {
2
+ /** 通知父容器:表单提交成功 → 请求关闭抽屉并刷新表格 */
3
+ notifySubmitSuccess: () => void;
4
+ /** 通知父容器:当前表单脏状态变更 → 注册/注销未保存确认守卫 */
5
+ notifyDirty: (dirty: boolean) => void;
6
+ /**
7
+ * 就绪后与父容器握手:父容器会下发初始化数据(Drawer 的 data prop)
8
+ * 同时自动响应父容器的「关闭前脏状态确认」:调用方需在收到确认时给出 allowClose
9
+ */
10
+ connect: (options?: {
11
+ onInit?: (data?: Record<string, any>) => void;
12
+ /** 关闭前询问是否允许关闭(返回 false 阻止关闭) */
13
+ onAskClose?: () => boolean | Promise<boolean>;
14
+ }) => void;
15
+ }
16
+ /**
17
+ * 提供给 iframe 内页面,拿到与父容器通信的方法。
18
+ * 注意:iframe 与父容器同源时无需配置;跨域时必须传父容器的 origin。
19
+ */
20
+ export declare function useIframeContainer(origin?: string): IframeContainerApi;
@@ -0,0 +1,41 @@
1
+ import { type ApiResult } from '../../lib/core/http';
2
+ import type { Method } from 'axios';
3
+ import type { ReqOptions } from '../../types/config';
4
+ interface Props {
5
+ /** v-model 触发开关:true 则发起请求,完成后自动变 false */
6
+ modelValue: boolean;
7
+ /** 请求 URL */
8
+ url: string;
9
+ /** 请求方法,默认 post(可通过全局配置 page.componentDefault.WdRequester.method 覆盖) */
10
+ method?: Method;
11
+ /** 请求参数(get/delete 放 query,post/put 放 body) */
12
+ params?: any;
13
+ /** 请求选项(透传给 http):showLoading/showTips/tipsConfig/axiosConfig/signal(可通过全局配置 page.componentDefault.WdRequester.reqOptions 覆盖) */
14
+ reqOptions?: ReqOptions;
15
+ }
16
+ declare var __VLS_1: {};
17
+ type __VLS_Slots = {} & {
18
+ default?: (props: typeof __VLS_1) => any;
19
+ };
20
+ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
21
+ "update:modelValue": (value: boolean) => any;
22
+ "api-before": (abort: () => void) => any;
23
+ "api-success": (result: ApiResult<any>) => any;
24
+ "api-fail": (result: ApiResult<any>) => any;
25
+ "api-exception": (error: any) => any;
26
+ "api-after": () => any;
27
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
28
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
29
+ "onApi-before"?: ((abort: () => void) => any) | undefined;
30
+ "onApi-success"?: ((result: ApiResult<any>) => any) | undefined;
31
+ "onApi-fail"?: ((result: ApiResult<any>) => any) | undefined;
32
+ "onApi-exception"?: ((error: any) => any) | undefined;
33
+ "onApi-after"?: (() => any) | undefined;
34
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
36
+ export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };