@web-utils/form-ui 1.0.0-beta4 → 1.0.0-beta41

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 (189) hide show
  1. package/api/index.d.ts +60 -0
  2. package/api/index.mjs +42 -0
  3. package/awesome-button/index.d.ts +60 -0
  4. package/awesome-button/index.mjs +49 -0
  5. package/base.css +1 -0
  6. package/chunks/4GMuTlFS.mjs +25 -0
  7. package/chunks/B-YO6Py8.mjs +145 -0
  8. package/chunks/B1MSrc6f.mjs +8 -0
  9. package/chunks/B40JZqF5.mjs +60 -0
  10. package/chunks/BLNpMvUQ.mjs +95 -0
  11. package/chunks/BNQD6fKI.mjs +40 -0
  12. package/chunks/BROfNO6c.mjs +17 -0
  13. package/chunks/BiF8cEVB.mjs +102 -0
  14. package/chunks/Bm5eiSmT.mjs +79 -0
  15. package/chunks/C5BjmbyR.mjs +91 -0
  16. package/chunks/CBHZpxPE.mjs +108 -0
  17. package/chunks/CD2WYSl1.mjs +188 -0
  18. package/chunks/CE0MejA6.mjs +200 -0
  19. package/chunks/CSf0Lu3w.mjs +102 -0
  20. package/chunks/CXSIP67a.mjs +234 -0
  21. package/chunks/ChmDDqoZ2.mjs +478 -0
  22. package/chunks/ClpNoMQe.mjs +37 -0
  23. package/chunks/Csa9EgOO.mjs +152 -0
  24. package/chunks/CuBH-6_y.mjs +25 -0
  25. package/chunks/CybmpSN8.mjs +664 -0
  26. package/chunks/CzvmkGvn.mjs +89 -0
  27. package/chunks/DASUt7ot.mjs +166 -0
  28. package/chunks/DBNqhkDl.mjs +174 -0
  29. package/chunks/DMcUruCK2.mjs +207 -0
  30. package/chunks/DUjgfS7g.mjs +95 -0
  31. package/chunks/DWLv8UUC.mjs +612 -0
  32. package/chunks/Ds_Tpa_M.mjs +83 -0
  33. package/chunks/MeM8FGzA.mjs +200 -0
  34. package/chunks/_90XRi0U.mjs +105 -0
  35. package/chunks/_Uzl3uMy.mjs +109 -0
  36. package/chunks/b5HOxD60.mjs +1369 -0
  37. package/chunks/cmuHpsX6.mjs +109 -0
  38. package/chunks/ePSxkHli.mjs +95 -0
  39. package/chunks/jHrYQI1Q.mjs +320 -0
  40. package/chunks/kKoMKOYH.mjs +180 -0
  41. package/chunks/lPLJkGiz.mjs +25 -0
  42. package/chunks/mbLUSXcZ.mjs +56 -0
  43. package/chunks/y-DmM31a.mjs +168 -0
  44. package/confirm-button/index.d.ts +113 -0
  45. package/confirm-button/index.mjs +35 -0
  46. package/confirmable/index.d.ts +84 -0
  47. package/confirmable/index.mjs +8 -0
  48. package/constants/index.d.ts +53 -0
  49. package/constants/index.mjs +4 -0
  50. package/editable-tree/index.d.ts +254 -0
  51. package/editable-tree/index.mjs +2 -0
  52. package/editable-tree/style.css +1 -0
  53. package/element-dialog/index.d.ts +337 -16
  54. package/element-dialog/index.mjs +2 -91
  55. package/empty-view/index.d.ts +2 -2
  56. package/empty-view/index.mjs +1 -1
  57. package/flex-scroll-area/index.d.ts +1 -1
  58. package/flex-scroll-area/index.mjs +1 -1
  59. package/form-advice/index.mjs +13 -12
  60. package/form-button/index.d.ts +114 -0
  61. package/form-button/index.mjs +36 -0
  62. package/form-card/index.d.ts +14 -0
  63. package/form-card/index.mjs +18 -0
  64. package/form-cascader/index.d.ts +472 -0
  65. package/form-cascader/index.mjs +2 -0
  66. package/form-check-box-group/index.d.ts +289 -18
  67. package/form-check-box-group/index.mjs +1 -1
  68. package/form-check-box-group/style.css +1 -0
  69. package/form-checkbox/index.d.ts +236 -16
  70. package/form-checkbox/index.mjs +1 -1
  71. package/form-date-picker/index.d.ts +390 -19
  72. package/form-date-picker/index.mjs +1 -1
  73. package/form-holder/index.d.ts +87 -20
  74. package/form-holder/index.mjs +1 -1
  75. package/form-holder/style.css +1 -1
  76. package/form-image/index.d.ts +145 -13
  77. package/form-image/index.mjs +1 -1
  78. package/form-input/index.d.ts +301 -20
  79. package/form-input/index.mjs +1 -1
  80. package/form-input/style.css +1 -0
  81. package/form-input-cron-expression/index.d.ts +217 -0
  82. package/form-input-cron-expression/index.mjs +2 -0
  83. package/form-input-cron-expression/style.css +1 -0
  84. package/form-input-email/index.d.ts +307 -16
  85. package/form-input-email/index.mjs +1 -1
  86. package/form-input-id-card/index.d.ts +307 -16
  87. package/form-input-id-card/index.mjs +1 -1
  88. package/form-input-number/index.d.ts +246 -18
  89. package/form-input-number/index.mjs +1 -1
  90. package/form-input-phone-number/index.d.ts +307 -16
  91. package/form-input-phone-number/index.mjs +1 -1
  92. package/form-input-tag/index.d.ts +263 -1
  93. package/form-input-tag/index.mjs +1 -3
  94. package/form-input-time/index.d.ts +434 -1
  95. package/form-input-time/index.mjs +1 -3
  96. package/form-item-config-provider/index.d.ts +22 -0
  97. package/form-item-config-provider/index.mjs +24 -0
  98. package/form-item-group/index.d.ts +91 -17
  99. package/form-item-group/index.mjs +2 -78
  100. package/form-item-group/style.css +1 -1
  101. package/form-item-x/index.d.ts +141 -11
  102. package/form-item-x/index.mjs +1 -1
  103. package/form-item-x/style.css +1 -0
  104. package/form-radio-group/index.d.ts +303 -16
  105. package/form-radio-group/index.mjs +1 -1
  106. package/form-rate/index.d.ts +254 -14
  107. package/form-rate/index.mjs +1 -1
  108. package/form-red-table/index.mjs +27 -26
  109. package/form-row/index.d.ts +2 -2
  110. package/form-row/index.mjs +1 -1
  111. package/form-select/index.d.ts +537 -18
  112. package/form-select/index.mjs +1 -1
  113. package/form-slider/index.d.ts +283 -16
  114. package/form-slider/index.mjs +1 -1
  115. package/form-switch/index.d.ts +272 -14
  116. package/form-switch/index.mjs +1 -1
  117. package/form-text/index.d.ts +165 -13
  118. package/form-text/index.mjs +1 -1
  119. package/form-textarea/index.d.ts +351 -0
  120. package/form-textarea/index.mjs +2 -0
  121. package/form-time-select/index.d.ts +319 -0
  122. package/form-time-select/index.mjs +2 -0
  123. package/form-view/index.mjs +1 -1
  124. package/helper/dictionary.d.ts +15 -0
  125. package/helper/dictionary.mjs +97 -0
  126. package/hook/useDictionary.d.ts +60 -0
  127. package/hook/useDictionary.mjs +15 -0
  128. package/hook/useVisibilityChange.d.ts +4 -0
  129. package/hook/useVisibilityChange.mjs +14 -0
  130. package/iframe-window/index.d.ts +9 -0
  131. package/iframe-window/index.mjs +37 -0
  132. package/iframe-window/style.css +1 -0
  133. package/index.d.ts +52 -36
  134. package/index.mjs +54 -61
  135. package/package.json +10 -5
  136. package/pageable-table/index.d.ts +398 -0
  137. package/pageable-table/index.mjs +2 -0
  138. package/pageable-table/style.css +1 -0
  139. package/resize-observer/index.d.ts +8 -0
  140. package/resize-observer/index.mjs +40 -0
  141. package/resize-observer/style.css +1 -0
  142. package/resolver/index.mjs +29 -0
  143. package/table-column/index.d.ts +160 -0
  144. package/table-column/index.mjs +2 -0
  145. package/table-column/style.css +1 -0
  146. package/table-column-def/index.d.ts +85 -0
  147. package/table-column-def/index.mjs +11 -0
  148. package/table-view/index.d.ts +340 -1
  149. package/table-view/index.mjs +459 -6
  150. package/table-view/style.css +1 -0
  151. package/toolbar/index.d.ts +128 -1
  152. package/toolbar/index.mjs +1 -8
  153. package/toolbar/style.css +1 -0
  154. package/toolbar-button/index.d.ts +188 -1
  155. package/toolbar-button/index.mjs +1 -8
  156. package/vue-cron/index.d.ts +191 -0
  157. package/vue-cron/index.mjs +2 -0
  158. package/vue-cron/style.css +1 -0
  159. package/web-types.json +1 -1
  160. package/x-input-tag/index.d.ts +2 -0
  161. package/x-input-tag/index.mjs +232 -0
  162. package/x-input-tag/style.css +1 -0
  163. package/year-calendar/index.d.ts +99 -0
  164. package/year-calendar/index.mjs +2 -0
  165. package/year-calendar/style.css +1 -0
  166. package/chunks/B4M_TFeR.mjs +0 -152
  167. package/chunks/B5BIQCcK.mjs +0 -149
  168. package/chunks/BHNKrW1j.mjs +0 -61
  169. package/chunks/BO9jWhBl.mjs +0 -46
  170. package/chunks/BZ8aOa78.mjs +0 -35
  171. package/chunks/Bsz7y4Xp.mjs +0 -73
  172. package/chunks/Bxj372sF.mjs +0 -53
  173. package/chunks/C33EmJN8.mjs +0 -32
  174. package/chunks/C6Li3-l7.mjs +0 -28
  175. package/chunks/CBcdalMX.mjs +0 -35
  176. package/chunks/CdRsyF0n.mjs +0 -43
  177. package/chunks/ClNahmiU.mjs +0 -23
  178. package/chunks/CstztYMu.mjs +0 -28
  179. package/chunks/DC9b53M6.mjs +0 -32
  180. package/chunks/DDVAgRED.mjs +0 -36
  181. package/chunks/DpJQABVD.mjs +0 -91
  182. package/chunks/ZsLNWI9x.mjs +0 -46
  183. package/chunks/jn_iQrVZ.mjs +0 -28
  184. package/constants.d.ts +0 -1
  185. package/constants.mjs +0 -4
  186. package/input/style.css +0 -1
  187. package/resolver.mjs +0 -79
  188. package/utils/style.css +0 -1
  189. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -0,0 +1,319 @@
1
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
+ modelValue: StringConstructor;
3
+ disabled: {
4
+ type: BooleanConstructor;
5
+ default: boolean;
6
+ };
7
+ editable: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ clearable: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ includeEndTime: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ size: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ placeholder: StringConstructor;
24
+ name: StringConstructor;
25
+ effect: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ prefixIcon: (StringConstructor | ObjectConstructor)[];
30
+ clearIcon: (StringConstructor | ObjectConstructor)[];
31
+ start: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ end: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ step: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ minTime: StringConstructor;
44
+ maxTime: StringConstructor;
45
+ format: {
46
+ type: StringConstructor;
47
+ default: string;
48
+ };
49
+ emptyValues: ArrayConstructor;
50
+ valueOnClear: (StringConstructor | BooleanConstructor | FunctionConstructor | NumberConstructor)[];
51
+ popperClass: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ popperStyle: (StringConstructor | ObjectConstructor)[];
56
+ wrapFormItem: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ col: BooleanConstructor;
61
+ span: {
62
+ type: NumberConstructor;
63
+ default: number;
64
+ };
65
+ offset: {
66
+ type: NumberConstructor;
67
+ default: number;
68
+ };
69
+ push: {
70
+ type: NumberConstructor;
71
+ default: number;
72
+ };
73
+ pull: {
74
+ type: NumberConstructor;
75
+ default: number;
76
+ };
77
+ xs: {
78
+ type: (ObjectConstructor | NumberConstructor)[];
79
+ };
80
+ sm: {
81
+ type: (ObjectConstructor | NumberConstructor)[];
82
+ };
83
+ md: {
84
+ type: (ObjectConstructor | NumberConstructor)[];
85
+ };
86
+ lg: {
87
+ type: (ObjectConstructor | NumberConstructor)[];
88
+ };
89
+ xl: {
90
+ type: (ObjectConstructor | NumberConstructor)[];
91
+ };
92
+ tag: {
93
+ type: StringConstructor;
94
+ default: string;
95
+ };
96
+ prop: (StringConstructor | ArrayConstructor)[];
97
+ label: StringConstructor;
98
+ labelPosition: {
99
+ type: StringConstructor;
100
+ default: string;
101
+ };
102
+ labelWidth: (StringConstructor | NumberConstructor)[];
103
+ required: {
104
+ type: BooleanConstructor;
105
+ default: boolean;
106
+ };
107
+ rules: ObjectConstructor;
108
+ error: StringConstructor;
109
+ showMessage: {
110
+ type: BooleanConstructor;
111
+ default: boolean;
112
+ };
113
+ inlineMessage: {
114
+ type: BooleanConstructor;
115
+ default: boolean;
116
+ };
117
+ for: StringConstructor;
118
+ validateStatus: StringConstructor;
119
+ messagePrefix: StringConstructor;
120
+ message: StringConstructor;
121
+ wrapCol: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ fixedSpan: NumberConstructor;
126
+ block: BooleanConstructor;
127
+ unwrap: BooleanConstructor;
128
+ half: BooleanConstructor;
129
+ formItemClass: StringConstructor;
130
+ hideLabel: BooleanConstructor;
131
+ tips: {
132
+ type: StringConstructor;
133
+ };
134
+ tipsAfterLabel: {
135
+ type: BooleanConstructor;
136
+ default: boolean;
137
+ };
138
+ labelColspan: (StringConstructor | NumberConstructor)[];
139
+ inputColspan: (StringConstructor | NumberConstructor)[];
140
+ labelRowspan: (StringConstructor | NumberConstructor)[];
141
+ inputRowspan: (StringConstructor | NumberConstructor)[];
142
+ }>, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
143
+ [key: string]: any;
144
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
145
+ "update:modelValue": null;
146
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
147
+ modelValue: StringConstructor;
148
+ disabled: {
149
+ type: BooleanConstructor;
150
+ default: boolean;
151
+ };
152
+ editable: {
153
+ type: BooleanConstructor;
154
+ default: boolean;
155
+ };
156
+ clearable: {
157
+ type: BooleanConstructor;
158
+ default: boolean;
159
+ };
160
+ includeEndTime: {
161
+ type: BooleanConstructor;
162
+ default: boolean;
163
+ };
164
+ size: {
165
+ type: StringConstructor;
166
+ default: string;
167
+ };
168
+ placeholder: StringConstructor;
169
+ name: StringConstructor;
170
+ effect: {
171
+ type: StringConstructor;
172
+ default: string;
173
+ };
174
+ prefixIcon: (StringConstructor | ObjectConstructor)[];
175
+ clearIcon: (StringConstructor | ObjectConstructor)[];
176
+ start: {
177
+ type: StringConstructor;
178
+ default: string;
179
+ };
180
+ end: {
181
+ type: StringConstructor;
182
+ default: string;
183
+ };
184
+ step: {
185
+ type: StringConstructor;
186
+ default: string;
187
+ };
188
+ minTime: StringConstructor;
189
+ maxTime: StringConstructor;
190
+ format: {
191
+ type: StringConstructor;
192
+ default: string;
193
+ };
194
+ emptyValues: ArrayConstructor;
195
+ valueOnClear: (StringConstructor | BooleanConstructor | FunctionConstructor | NumberConstructor)[];
196
+ popperClass: {
197
+ type: StringConstructor;
198
+ default: string;
199
+ };
200
+ popperStyle: (StringConstructor | ObjectConstructor)[];
201
+ wrapFormItem: {
202
+ type: BooleanConstructor;
203
+ default: boolean;
204
+ };
205
+ col: BooleanConstructor;
206
+ span: {
207
+ type: NumberConstructor;
208
+ default: number;
209
+ };
210
+ offset: {
211
+ type: NumberConstructor;
212
+ default: number;
213
+ };
214
+ push: {
215
+ type: NumberConstructor;
216
+ default: number;
217
+ };
218
+ pull: {
219
+ type: NumberConstructor;
220
+ default: number;
221
+ };
222
+ xs: {
223
+ type: (ObjectConstructor | NumberConstructor)[];
224
+ };
225
+ sm: {
226
+ type: (ObjectConstructor | NumberConstructor)[];
227
+ };
228
+ md: {
229
+ type: (ObjectConstructor | NumberConstructor)[];
230
+ };
231
+ lg: {
232
+ type: (ObjectConstructor | NumberConstructor)[];
233
+ };
234
+ xl: {
235
+ type: (ObjectConstructor | NumberConstructor)[];
236
+ };
237
+ tag: {
238
+ type: StringConstructor;
239
+ default: string;
240
+ };
241
+ prop: (StringConstructor | ArrayConstructor)[];
242
+ label: StringConstructor;
243
+ labelPosition: {
244
+ type: StringConstructor;
245
+ default: string;
246
+ };
247
+ labelWidth: (StringConstructor | NumberConstructor)[];
248
+ required: {
249
+ type: BooleanConstructor;
250
+ default: boolean;
251
+ };
252
+ rules: ObjectConstructor;
253
+ error: StringConstructor;
254
+ showMessage: {
255
+ type: BooleanConstructor;
256
+ default: boolean;
257
+ };
258
+ inlineMessage: {
259
+ type: BooleanConstructor;
260
+ default: boolean;
261
+ };
262
+ for: StringConstructor;
263
+ validateStatus: StringConstructor;
264
+ messagePrefix: StringConstructor;
265
+ message: StringConstructor;
266
+ wrapCol: {
267
+ type: BooleanConstructor;
268
+ default: boolean;
269
+ };
270
+ fixedSpan: NumberConstructor;
271
+ block: BooleanConstructor;
272
+ unwrap: BooleanConstructor;
273
+ half: BooleanConstructor;
274
+ formItemClass: StringConstructor;
275
+ hideLabel: BooleanConstructor;
276
+ tips: {
277
+ type: StringConstructor;
278
+ };
279
+ tipsAfterLabel: {
280
+ type: BooleanConstructor;
281
+ default: boolean;
282
+ };
283
+ labelColspan: (StringConstructor | NumberConstructor)[];
284
+ inputColspan: (StringConstructor | NumberConstructor)[];
285
+ labelRowspan: (StringConstructor | NumberConstructor)[];
286
+ inputRowspan: (StringConstructor | NumberConstructor)[];
287
+ }>> & Readonly<{
288
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
289
+ }>, {
290
+ size: string;
291
+ disabled: boolean;
292
+ push: number;
293
+ col: boolean;
294
+ span: number;
295
+ tag: string;
296
+ offset: number;
297
+ required: boolean;
298
+ wrapCol: boolean;
299
+ block: boolean;
300
+ unwrap: boolean;
301
+ half: boolean;
302
+ hideLabel: boolean;
303
+ tipsAfterLabel: boolean;
304
+ labelPosition: string;
305
+ showMessage: boolean;
306
+ inlineMessage: boolean;
307
+ pull: number;
308
+ wrapFormItem: boolean;
309
+ clearable: boolean;
310
+ popperClass: string;
311
+ effect: string;
312
+ editable: boolean;
313
+ format: string;
314
+ start: string;
315
+ end: string;
316
+ step: string;
317
+ includeEndTime: boolean;
318
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
319
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../chunks/DUjgfS7g.mjs";
2
+ export { e as default };
@@ -2,7 +2,7 @@
2
2
  var e = /* @__PURE__ */ Object.assign({ name: "FormView" }, {
3
3
  __name: "FormView",
4
4
  setup(e) {
5
- return (e, t) => null;
5
+ return () => {};
6
6
  }
7
7
  });
8
8
  //#endregion
@@ -0,0 +1,15 @@
1
+ import { DictItem } from '../api';
2
+ export declare const clearDictCache: () => void;
3
+ export type DictOption = {
4
+ options?: any;
5
+ treeDict?: boolean;
6
+ idAsValue?: boolean;
7
+ labelAsValue?: boolean;
8
+ };
9
+ export declare const getDictData: (type: string, cache?: boolean, { options, treeDict, idAsValue, labelAsValue }?: DictOption) => DictItem[] | readonly DictItem[] | Promise<DictItem[] | readonly DictItem[] | null>;
10
+ export declare const getDictItem: (type: string, value: any, cache?: boolean, { treeDict, idAsValue, labelAsValue }?: DictOption) => Promise<any>;
11
+ export declare const getDictLabel: (type: string, value: any, cache?: boolean, { treeDict, idAsValue, labelAsValue }?: DictOption) => Promise<any>;
12
+ export declare const confirmOptions: readonly {
13
+ label: string;
14
+ value: string;
15
+ }[];
@@ -0,0 +1,97 @@
1
+ import { l as e, s as t } from "../chunks/cmuHpsX6.mjs";
2
+ import { getDictTreeByType as n, remote as r } from "../api/index.mjs";
3
+ //#region src/helper/dictionary.ts
4
+ var i = {}, a = {}, o = {}, s = () => {
5
+ for (let e in i) delete i[e];
6
+ for (let e in a) delete a[e];
7
+ }, c = (e, t = !0, { options: n, treeDict: r, idAsValue: a, labelAsValue: o } = {}) => {
8
+ let s = e;
9
+ r && (s = `${e}-${a}-${o}${n ? "-options" : ""}`);
10
+ let c = i[s];
11
+ return t && c ? c : r ? u(e, t, {
12
+ idAsValue: a,
13
+ labelAsValue: o
14
+ }) : l(e, t);
15
+ }, l = (e, t = !0) => {
16
+ if (o[e]) return o[e];
17
+ let n = new Promise((n, s) => {
18
+ if (t && i[e]) n(i[e]);
19
+ else {
20
+ var c;
21
+ (c = r(e)) == null || c.then((r) => {
22
+ let s = r.data.data;
23
+ if (t) {
24
+ let t = {};
25
+ s.forEach(({ label: e, value: n }) => {
26
+ t[n] = Object.freeze({
27
+ label: e,
28
+ value: n
29
+ });
30
+ }), a[e] = t, s = Object.freeze(s), i[e] = s;
31
+ }
32
+ o[e] = null, n(s);
33
+ }).catch((t) => {
34
+ o[e] = null, s(t);
35
+ });
36
+ }
37
+ });
38
+ return o[e] = n, n;
39
+ }, u = (r, s = !0, { idAsValue: c, labelAsValue: l } = {}) => {
40
+ let u = `${r}-${c}-${l}`;
41
+ if (o[u]) return o[u];
42
+ let d = new Promise((d, f) => {
43
+ if (s && i[u]) d(i[u]);
44
+ else {
45
+ var p;
46
+ (p = n(r, {
47
+ idAsValue: c,
48
+ labelAsValue: l
49
+ })) == null || p.then((n) => {
50
+ let r = n.data.data;
51
+ s && (i[u] = r, i[`${u}-options`] = e(r), a[u] = t(r)), o[u] = null, d(r);
52
+ }).catch((e) => {
53
+ o[u] = null, f(e);
54
+ });
55
+ }
56
+ });
57
+ return o[u] = d, d;
58
+ }, d = async (t, n, r = !0, { treeDict: i, idAsValue: o, labelAsValue: s } = {}) => {
59
+ let l = t;
60
+ i && (l = `${t}-${o}-${s}`);
61
+ let u = a[l], d;
62
+ if (r && u) d = u[n];
63
+ else {
64
+ let u = await c(t, r, {
65
+ treeDict: i,
66
+ idAsValue: o,
67
+ labelAsValue: s
68
+ });
69
+ if (r) d = a[l][n];
70
+ else {
71
+ if (i && (u = e(u)), !u) return d;
72
+ for (let e = 0; e < u.length; e++) {
73
+ let t = u[e];
74
+ if (t.value === n) {
75
+ d = t;
76
+ break;
77
+ }
78
+ }
79
+ }
80
+ }
81
+ return d;
82
+ }, f = async (e, t, n = !0, { treeDict: r, idAsValue: i, labelAsValue: a } = {}) => {
83
+ var o;
84
+ return ((o = await d(e, t, n, {
85
+ treeDict: r,
86
+ idAsValue: i,
87
+ labelAsValue: a
88
+ })) == null ? void 0 : o.label) || t || "";
89
+ }, p = Object.freeze([{
90
+ label: "是",
91
+ value: "1"
92
+ }, {
93
+ label: "否",
94
+ value: "0"
95
+ }]);
96
+ //#endregion
97
+ export { s as clearDictCache, p as confirmOptions, c as getDictData, d as getDictItem, f as getDictLabel };
@@ -0,0 +1,60 @@
1
+ import { DictItem } from '../api';
2
+ export declare const useDictionary: (props: Record<string, any>) => {
3
+ dictItems: globalThis.Ref<{
4
+ id: string;
5
+ dictId: string;
6
+ label: string;
7
+ dictType: string;
8
+ description: string;
9
+ sortOrder: number;
10
+ createBy: string;
11
+ updateBy: string;
12
+ createTime: string;
13
+ updateTime: string;
14
+ remarks: null;
15
+ delFlag: string;
16
+ value: string;
17
+ }[] | readonly {
18
+ id: string;
19
+ dictId: string;
20
+ label: string;
21
+ dictType: string;
22
+ description: string;
23
+ sortOrder: number;
24
+ createBy: string;
25
+ updateBy: string;
26
+ createTime: string;
27
+ updateTime: string;
28
+ remarks: null;
29
+ delFlag: string;
30
+ value: string;
31
+ }[] | null, DictItem[] | readonly DictItem[] | {
32
+ id: string;
33
+ dictId: string;
34
+ label: string;
35
+ dictType: string;
36
+ description: string;
37
+ sortOrder: number;
38
+ createBy: string;
39
+ updateBy: string;
40
+ createTime: string;
41
+ updateTime: string;
42
+ remarks: null;
43
+ delFlag: string;
44
+ value: string;
45
+ }[] | readonly {
46
+ id: string;
47
+ dictId: string;
48
+ label: string;
49
+ dictType: string;
50
+ description: string;
51
+ sortOrder: number;
52
+ createBy: string;
53
+ updateBy: string;
54
+ createTime: string;
55
+ updateTime: string;
56
+ remarks: null;
57
+ delFlag: string;
58
+ value: string;
59
+ }[] | null>;
60
+ };
@@ -0,0 +1,15 @@
1
+ import { getDictData as e } from "../helper/dictionary.mjs";
2
+ import { ref as t, watchEffect as n } from "vue";
3
+ //#region src/hook/useDictionary.ts
4
+ var r = (r) => {
5
+ let i = t([]);
6
+ return n(async () => {
7
+ r.dictType ? i.value = await e(r.dictType, !0, {
8
+ treeDict: r.treeDict,
9
+ idAsValue: r.idAsValue,
10
+ labelAsValue: r.labelAsValue
11
+ }) : i.value = [];
12
+ }), { dictItems: i };
13
+ };
14
+ //#endregion
15
+ export { r as useDictionary };
@@ -0,0 +1,4 @@
1
+ export declare const useVisibilityChange: ({ onPageHidden, onPageVisible }?: {
2
+ onPageHidden?: () => void;
3
+ onPageVisible?: () => void;
4
+ }) => void;
@@ -0,0 +1,14 @@
1
+ import { onBeforeMount as e, onBeforeUnmount as t } from "vue";
2
+ //#region src/hook/useVisibilityChange.ts
3
+ var n = ({ onPageHidden: n, onPageVisible: r } = {}) => {
4
+ let i = () => {
5
+ document.hidden ? n == null || n() : r == null || r();
6
+ };
7
+ e(() => {
8
+ document.addEventListener("visibilitychange", i);
9
+ }), t(() => {
10
+ document.removeEventListener("visibilitychange", i);
11
+ });
12
+ };
13
+ //#endregion
14
+ export { n as useVisibilityChange };
@@ -0,0 +1,9 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {
2
+ title?: string | undefined;
3
+ url?: string | undefined;
4
+ $props: {
5
+ readonly title?: string | undefined;
6
+ readonly url?: string | undefined;
7
+ };
8
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
9
+ export default _default;
@@ -0,0 +1,37 @@
1
+ import { t as e } from "../chunks/DASUt7ot.mjs";
2
+ import { createBlock as t, createElementVNode as n, mergeModels as r, mergeProps as i, openBlock as a, useModel as o, withCtx as s } from "vue";
3
+ //#region src/components/iframe-window/IframeWindow.vue
4
+ var c = ["src"], l = /* @__PURE__ */ Object.assign({ name: "IframeWindow" }, {
5
+ __name: "IframeWindow",
6
+ props: /* @__PURE__ */ r({
7
+ title: String,
8
+ url: String
9
+ }, {
10
+ modelValue: { type: Boolean },
11
+ modelModifiers: {}
12
+ }),
13
+ emits: ["update:modelValue"],
14
+ setup(r) {
15
+ let l = o(r, "modelValue");
16
+ return (o, u) => {
17
+ let d = e;
18
+ return a(), t(d, i(o.$attrs, {
19
+ modelValue: l.value,
20
+ "onUpdate:modelValue": u[0] || (u[0] = (e) => l.value = e),
21
+ "destroy-on-close": "",
22
+ class: "iframe-window",
23
+ height: "60vh",
24
+ title: r.title,
25
+ "show-fullscreen": ""
26
+ }), {
27
+ default: s(() => [n("iframe", {
28
+ class: "iframe-window-iframe",
29
+ src: r.url
30
+ }, null, 8, c)]),
31
+ _: 1
32
+ }, 16, ["modelValue", "title"]);
33
+ };
34
+ }
35
+ });
36
+ //#endregion
37
+ export { l as default };
@@ -0,0 +1 @@
1
+ .iframe-window.el-dialog .el-dialog__body{position:relative}.iframe-window .iframe-window-iframe{border:none;width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0}