@web-utils/form-ui 1.0.0-beta5 → 1.0.0-beta51

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 (208) 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 -1
  6. package/chunks/6yfBZFOB.mjs +56 -0
  7. package/chunks/B1IPSTA6.mjs +198 -0
  8. package/chunks/B9gA65rt2.mjs +38 -0
  9. package/chunks/BBERmTup.mjs +83 -0
  10. package/chunks/BG8z3V9d2.mjs +643 -0
  11. package/chunks/BQk3-Ppb2.mjs +146 -0
  12. package/chunks/BQyL45PF2.mjs +207 -0
  13. package/chunks/BWh6u1O0.mjs +660 -0
  14. package/chunks/BbSPWDDZ.mjs +100 -0
  15. package/chunks/BfxDxIg0.mjs +106 -0
  16. package/chunks/BqWvBF14.mjs +35 -0
  17. package/chunks/BsZgAJX_2.mjs +81 -0
  18. package/chunks/BtcjAHE6.mjs +317 -0
  19. package/chunks/Bwbtu2cp.mjs +194 -0
  20. package/chunks/ByHz4mmh.mjs +87 -0
  21. package/chunks/C2zgFLYO.mjs +185 -0
  22. package/chunks/C7G-cAoI.mjs +1361 -0
  23. package/chunks/CAd1zK9Q.mjs +25 -0
  24. package/chunks/CJdkjadi.mjs +17 -0
  25. package/chunks/CXsoKP22.mjs +86 -0
  26. package/chunks/CabldOLo.mjs +157 -0
  27. package/chunks/CkOD-_VV.mjs +8 -0
  28. package/chunks/CqVd8D222.mjs +89 -0
  29. package/chunks/CuAoMR3n.mjs +105 -0
  30. package/chunks/DA7oGHSX.mjs +141 -0
  31. package/chunks/DKwp6AMl.mjs +168 -0
  32. package/chunks/DOP3aBxf.mjs +93 -0
  33. package/chunks/DOZRzqlo.mjs +37 -0
  34. package/chunks/D_Fs3bkZ.mjs +57 -0
  35. package/chunks/D_qiRmiE.mjs +230 -0
  36. package/chunks/DcTVYqeJ.mjs +113 -0
  37. package/chunks/Dt3lfDnL.mjs +166 -0
  38. package/chunks/GI8krYU82.mjs +478 -0
  39. package/chunks/V2p-PCpL.mjs +176 -0
  40. package/chunks/YFiU0ngn.mjs +622 -0
  41. package/chunks/bFbPPcdq.mjs +25 -0
  42. package/chunks/eae6huQB.mjs +25 -0
  43. package/chunks/gCeDFHo1.mjs +32 -0
  44. package/chunks/gLPy4Sus.mjs +164 -0
  45. package/chunks/hlha6Bhc.mjs +107 -0
  46. package/chunks/pIzhYsBe.mjs +93 -0
  47. package/chunks/wDS9KBFw.mjs +67 -0
  48. package/chunks/wXeqV-_7.mjs +89 -0
  49. package/confirm-button/index.d.ts +122 -0
  50. package/confirm-button/index.mjs +35 -0
  51. package/confirmable/index.d.ts +93 -0
  52. package/confirmable/index.mjs +8 -0
  53. package/constants/index.d.ts +54 -0
  54. package/constants/index.mjs +4 -0
  55. package/dict-render/index.d.ts +28 -0
  56. package/dict-render/index.mjs +2 -0
  57. package/editable-tree/index.d.ts +254 -0
  58. package/editable-tree/index.mjs +2 -0
  59. package/editable-tree/style.css +1 -0
  60. package/element-dialog/index.d.ts +337 -16
  61. package/element-dialog/index.mjs +2 -91
  62. package/element-resize-observer/index.d.ts +8 -0
  63. package/element-resize-observer/index.mjs +40 -0
  64. package/element-resize-observer/style.css +1 -0
  65. package/empty-view/index.d.ts +2 -2
  66. package/empty-view/index.mjs +1 -1
  67. package/flex-scroll-area/index.d.ts +1 -1
  68. package/flex-scroll-area/index.mjs +1 -1
  69. package/form-advice/index.mjs +13 -12
  70. package/form-button/index.d.ts +123 -0
  71. package/form-button/index.mjs +36 -0
  72. package/form-card/index.d.ts +14 -0
  73. package/form-card/index.mjs +18 -0
  74. package/form-cascader/index.d.ts +472 -0
  75. package/form-cascader/index.mjs +2 -0
  76. package/form-checkbox/index.d.ts +236 -16
  77. package/form-checkbox/index.mjs +1 -1
  78. package/form-checkbox-group/index.d.ts +364 -0
  79. package/form-checkbox-group/index.mjs +2 -0
  80. package/form-checkbox-group/style.css +1 -0
  81. package/form-date-picker/index.d.ts +390 -19
  82. package/form-date-picker/index.mjs +1 -1
  83. package/form-holder/index.d.ts +87 -20
  84. package/form-holder/index.mjs +1 -1
  85. package/form-holder/style.css +1 -1
  86. package/form-image/index.d.ts +145 -13
  87. package/form-image/index.mjs +1 -1
  88. package/form-input/index.d.ts +301 -20
  89. package/form-input/index.mjs +1 -1
  90. package/form-input/style.css +1 -0
  91. package/form-input-cron-expression/index.d.ts +217 -0
  92. package/form-input-cron-expression/index.mjs +2 -0
  93. package/form-input-cron-expression/style.css +1 -0
  94. package/form-input-email/index.d.ts +307 -16
  95. package/form-input-email/index.mjs +1 -1
  96. package/form-input-id-card/index.d.ts +307 -16
  97. package/form-input-id-card/index.mjs +1 -1
  98. package/form-input-number/index.d.ts +246 -18
  99. package/form-input-number/index.mjs +1 -1
  100. package/form-input-phone-number/index.d.ts +307 -16
  101. package/form-input-phone-number/index.mjs +1 -1
  102. package/form-input-tag/index.d.ts +263 -1
  103. package/form-input-tag/index.mjs +1 -3
  104. package/form-input-time/index.d.ts +434 -1
  105. package/form-input-time/index.mjs +1 -3
  106. package/form-item-config-provider/index.d.ts +22 -0
  107. package/form-item-config-provider/index.mjs +24 -0
  108. package/form-item-group/index.d.ts +91 -17
  109. package/form-item-group/index.mjs +2 -78
  110. package/form-item-group/style.css +1 -1
  111. package/form-item-x/index.d.ts +141 -11
  112. package/form-item-x/index.mjs +1 -1
  113. package/form-item-x/style.css +1 -0
  114. package/form-radio-group/index.d.ts +303 -16
  115. package/form-radio-group/index.mjs +1 -1
  116. package/form-rate/index.d.ts +254 -14
  117. package/form-rate/index.mjs +1 -1
  118. package/form-red-table/index.mjs +27 -26
  119. package/form-row/index.d.ts +2 -2
  120. package/form-row/index.mjs +1 -1
  121. package/form-select/index.d.ts +537 -18
  122. package/form-select/index.mjs +1 -1
  123. package/form-slider/index.d.ts +283 -16
  124. package/form-slider/index.mjs +1 -1
  125. package/form-switch/index.d.ts +272 -14
  126. package/form-switch/index.mjs +1 -1
  127. package/form-table/index.d.ts +269 -0
  128. package/form-table/index.mjs +2 -0
  129. package/form-table-plus/index.d.ts +266 -0
  130. package/form-table-plus/index.mjs +2 -0
  131. package/form-text/index.d.ts +165 -13
  132. package/form-text/index.mjs +1 -1
  133. package/form-textarea/index.d.ts +351 -0
  134. package/form-textarea/index.mjs +2 -0
  135. package/form-time-select/index.d.ts +319 -0
  136. package/form-time-select/index.mjs +2 -0
  137. package/form-view/index.mjs +1 -1
  138. package/helper/dictionary.d.ts +15 -0
  139. package/helper/dictionary.mjs +97 -0
  140. package/hook/useDictionary.d.ts +60 -0
  141. package/hook/useDictionary.mjs +15 -0
  142. package/hook/useVisibilityChange.d.ts +4 -0
  143. package/hook/useVisibilityChange.mjs +14 -0
  144. package/iframe-window/index.d.ts +9 -0
  145. package/iframe-window/index.mjs +37 -0
  146. package/iframe-window/style.css +1 -0
  147. package/index.css +2 -0
  148. package/index.d.ts +57 -36
  149. package/index.mjs +59 -61
  150. package/package.json +10 -5
  151. package/pageable-table/index.d.ts +400 -0
  152. package/pageable-table/index.mjs +2 -0
  153. package/pageable-table/style.css +1 -0
  154. package/resolver/index.mjs +29 -0
  155. package/sub-table/index.d.ts +100 -0
  156. package/sub-table/index.mjs +537 -0
  157. package/sub-table/style.css +1 -0
  158. package/sub-table-plus/index.d.ts +100 -0
  159. package/sub-table-plus/index.mjs +2 -0
  160. package/sub-table-plus/style.css +1 -0
  161. package/table-column/index.d.ts +160 -0
  162. package/table-column/index.mjs +2 -0
  163. package/table-column/style.css +1 -0
  164. package/table-column-def/index.d.ts +95 -0
  165. package/table-column-def/index.mjs +11 -0
  166. package/table-view/index.d.ts +341 -1
  167. package/table-view/index.mjs +457 -6
  168. package/table-view/style.css +1 -0
  169. package/toolbar/index.d.ts +128 -1
  170. package/toolbar/index.mjs +1 -8
  171. package/toolbar/style.css +1 -0
  172. package/toolbar-button/index.d.ts +188 -1
  173. package/toolbar-button/index.mjs +1 -8
  174. package/vue-cron/index.d.ts +191 -0
  175. package/vue-cron/index.mjs +2 -0
  176. package/vue-cron/style.css +1 -0
  177. package/web-types.json +1 -1
  178. package/x-input-tag/index.d.ts +2 -0
  179. package/x-input-tag/index.mjs +228 -0
  180. package/x-input-tag/style.css +1 -0
  181. package/year-calendar/index.d.ts +99 -0
  182. package/year-calendar/index.mjs +2 -0
  183. package/year-calendar/style.css +1 -0
  184. package/chunks/B4M_TFeR.mjs +0 -152
  185. package/chunks/B5BIQCcK.mjs +0 -149
  186. package/chunks/BHNKrW1j.mjs +0 -61
  187. package/chunks/BO9jWhBl.mjs +0 -46
  188. package/chunks/BZ8aOa78.mjs +0 -35
  189. package/chunks/Bsz7y4Xp.mjs +0 -73
  190. package/chunks/Bxj372sF.mjs +0 -53
  191. package/chunks/C33EmJN8.mjs +0 -32
  192. package/chunks/C6Li3-l7.mjs +0 -28
  193. package/chunks/CBcdalMX.mjs +0 -35
  194. package/chunks/CdRsyF0n.mjs +0 -43
  195. package/chunks/ClNahmiU.mjs +0 -23
  196. package/chunks/CstztYMu.mjs +0 -28
  197. package/chunks/DC9b53M6.mjs +0 -32
  198. package/chunks/DDVAgRED.mjs +0 -36
  199. package/chunks/DpJQABVD.mjs +0 -91
  200. package/chunks/ZsLNWI9x.mjs +0 -46
  201. package/chunks/jn_iQrVZ.mjs +0 -28
  202. package/constants.d.ts +0 -1
  203. package/constants.mjs +0 -4
  204. package/form-check-box-group/index.d.ts +0 -93
  205. package/form-check-box-group/index.mjs +0 -2
  206. package/input/style.css +0 -1
  207. package/resolver.mjs +0 -79
  208. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -0,0 +1,622 @@
1
+ import { d as e, n as t, r as n } from "./DcTVYqeJ.mjs";
2
+ import { getDictLabel as r } from "../helper/dictionary.mjs";
3
+ import { cellClickHandlerContextKey as i, pageableTableContextKey as a } from "../constants/index.mjs";
4
+ import { t as o } from "./Dt3lfDnL.mjs";
5
+ import s from "../element-resize-observer/index.mjs";
6
+ import { t as c } from "./wDS9KBFw.mjs";
7
+ import { useVisibilityChange as l } from "../hook/useVisibilityChange.mjs";
8
+ import { Fragment as ee, computed as u, createBlock as d, createTextVNode as f, createVNode as p, inject as m, isVNode as h, mergeModels as g, mergeProps as _, nextTick as v, onUpdated as te, openBlock as y, provide as b, reactive as x, ref as S, toDisplayString as C, useModel as w, useTemplateRef as T, watch as E, withCtx as D } from "vue";
9
+ import { ElMessage as ne } from "element-plus";
10
+ import { ElCheckbox as O, ElDrawer as k, ElEmpty as A, ElPagination as re, ElRadio as j, ElTable as M, ElTableColumn as N } from "element-plus/es";
11
+ import { useEventBus as ie } from "@web-utils/vue/hooks/useEventBus";
12
+ //#region src/components/table/components/TableColumnFilter.vue
13
+ var ae = /* @__PURE__ */ Object.assign({ name: "TableColumnFilter" }, {
14
+ __name: "TableColumnFilter",
15
+ props: /* @__PURE__ */ g({ columns: {
16
+ type: Array,
17
+ default: () => []
18
+ } }, {
19
+ modelValue: {
20
+ type: Boolean,
21
+ default: !1
22
+ },
23
+ modelModifiers: {}
24
+ }),
25
+ emits: ["update:modelValue"],
26
+ setup(e, { expose: t }) {
27
+ let n = w(e, "modelValue"), r = x({}), i = x({}), a = x({}), o = x({}), s = (e, t, n) => {
28
+ n === "hide" ? r[t.prop] = e : n === "fixed" ? i[t.prop] = e : n === "filterable" ? a[t.prop] = e : n === "sortable" && (o[t.prop] = e);
29
+ };
30
+ return t({
31
+ hideProps: r,
32
+ fixedProps: i,
33
+ filterableProps: a,
34
+ sortableProps: o
35
+ }), (t, r) => {
36
+ let i = N, a = O, o = M, c = k;
37
+ return y(), d(c, {
38
+ modelValue: n.value,
39
+ "onUpdate:modelValue": r[0] || (r[0] = (e) => n.value = e),
40
+ class: "table-column-filter",
41
+ title: "表格设置",
42
+ "append-to-body": ""
43
+ }, {
44
+ default: D(() => [p(o, {
45
+ data: e.columns,
46
+ border: ""
47
+ }, {
48
+ default: D(() => [
49
+ p(i, { label: "列名" }, {
50
+ default: D(({ row: e }) => [f(C(e.label), 1)]),
51
+ _: 1
52
+ }),
53
+ p(i, {
54
+ label: "隐藏",
55
+ align: "center"
56
+ }, {
57
+ default: D(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "hide") }, null, 8, ["onChange"])]),
58
+ _: 1
59
+ }),
60
+ p(i, {
61
+ label: "冻结",
62
+ align: "center"
63
+ }, {
64
+ default: D(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "fixed") }, null, 8, ["onChange"])]),
65
+ _: 1
66
+ }),
67
+ p(i, {
68
+ label: "过滤",
69
+ align: "center"
70
+ }, {
71
+ default: D(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "filterable") }, null, 8, ["onChange"])]),
72
+ _: 1
73
+ }),
74
+ p(i, {
75
+ label: "排序",
76
+ align: "center"
77
+ }, {
78
+ default: D(({ row: e }) => [p(a, {
79
+ title: e.allowSort ? null : "该列不支持排序!",
80
+ disabled: !e.allowSort,
81
+ onChange: (t) => s(t, e, "sortable")
82
+ }, null, 8, [
83
+ "title",
84
+ "disabled",
85
+ "onChange"
86
+ ])]),
87
+ _: 1
88
+ })
89
+ ]),
90
+ _: 1
91
+ }, 8, ["data"])]),
92
+ _: 1
93
+ }, 8, ["modelValue"]);
94
+ };
95
+ }
96
+ });
97
+ //#endregion
98
+ //#region src/components/table/components/TableColumnFilterable.vue?vue&type=script&lang.jsx
99
+ function P(e) {
100
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
101
+ }
102
+ //#endregion
103
+ //#region src/components/table/components/TableColumnFilterable.vue
104
+ var F = {
105
+ name: "TableColumnFilterable",
106
+ props: {
107
+ filterable: Boolean,
108
+ prop: String
109
+ },
110
+ setup(e, { attrs: t, slots: n }) {
111
+ let r = m(a, null), i = u(() => {
112
+ if (e.filterable && r) return (e, t, n) => t[n.property] === e;
113
+ }), o = u(() => {
114
+ if (e.filterable && r) return [...new Set(r.records.value.map((t) => t[e.prop]).filter((e) => e))].map((e) => ({
115
+ text: e,
116
+ value: e
117
+ }));
118
+ });
119
+ return () => p(c, _(t, {
120
+ prop: e.prop,
121
+ filterable: e.filterable,
122
+ filterMethod: i.value,
123
+ filters: o.value
124
+ }), P(n) ? n : { default: () => [n] });
125
+ }
126
+ }, I = {
127
+ data: {
128
+ type: Array,
129
+ default: () => []
130
+ },
131
+ height: [String, Number],
132
+ maxHeight: [String, Number],
133
+ stripe: {
134
+ type: Boolean,
135
+ default: !1
136
+ },
137
+ border: {
138
+ type: Boolean,
139
+ default: !0
140
+ },
141
+ size: String,
142
+ fit: {
143
+ type: Boolean,
144
+ default: !0
145
+ },
146
+ showHeader: {
147
+ type: Boolean,
148
+ default: !0
149
+ },
150
+ highlightCurrentRow: {
151
+ type: Boolean,
152
+ default: !1
153
+ },
154
+ currentRowKey: [String, Number],
155
+ rowClassName: [Function, String],
156
+ rowStyle: [Function, Object],
157
+ cellClassName: [Function, String],
158
+ cellStyle: [Function, Object],
159
+ headerRowClassName: [Function, String],
160
+ headerRowStyle: [Function, Object],
161
+ headerCellClassName: [Function, String],
162
+ headerCellStyle: [Function, Object],
163
+ rowKey: {
164
+ type: [Function, String],
165
+ default: "id"
166
+ },
167
+ emptyText: {
168
+ type: String,
169
+ default: "No Data"
170
+ },
171
+ defaultExpandAll: {
172
+ type: Boolean,
173
+ default: !1
174
+ },
175
+ expandRowKeys: {
176
+ type: Array,
177
+ default: () => []
178
+ },
179
+ defaultSort: Object,
180
+ tooltipEffect: {
181
+ type: String,
182
+ default: "dark"
183
+ },
184
+ tooltipOptions: {
185
+ type: Object,
186
+ default: () => ({})
187
+ },
188
+ appendFilterPanelTo: String,
189
+ showSummary: {
190
+ type: Boolean,
191
+ default: !1
192
+ },
193
+ sumText: {
194
+ type: String,
195
+ default: "Sum"
196
+ },
197
+ summaryMethod: Function,
198
+ spanMethod: Function,
199
+ selectOnIndeterminate: {
200
+ type: Boolean,
201
+ default: !0
202
+ },
203
+ indent: {
204
+ type: Number,
205
+ default: 16
206
+ },
207
+ lazy: {
208
+ type: Boolean,
209
+ default: !1
210
+ },
211
+ load: Function,
212
+ treeProps: {
213
+ type: Object,
214
+ default: () => ({})
215
+ },
216
+ tableLayout: {
217
+ type: String,
218
+ default: "fixed"
219
+ },
220
+ scrollbarAlwaysOn: {
221
+ type: Boolean,
222
+ default: !1
223
+ },
224
+ showOverflowTooltip: [Boolean, Object],
225
+ flexible: {
226
+ type: Boolean,
227
+ default: !1
228
+ },
229
+ scrollbarTabindex: [String, Number],
230
+ allowDragLastColumn: {
231
+ type: Boolean,
232
+ default: !0
233
+ },
234
+ tooltipFormatter: Function,
235
+ preserveExpandedContent: {
236
+ type: Boolean,
237
+ default: !1
238
+ },
239
+ nativeScrollbar: {
240
+ type: Boolean,
241
+ default: !1
242
+ },
243
+ rowExpandable: Function,
244
+ selectionWidth: {
245
+ type: String,
246
+ default: "45"
247
+ },
248
+ viewId: String,
249
+ url: String,
250
+ hideOnSinglePage: Boolean,
251
+ api: Function,
252
+ model: Object,
253
+ ascs: {
254
+ type: Array,
255
+ default: () => []
256
+ },
257
+ descs: {
258
+ type: Array,
259
+ default: () => []
260
+ },
261
+ headerBold: Boolean,
262
+ autoHeight: Boolean,
263
+ immediate: {
264
+ type: Boolean,
265
+ default: !0
266
+ },
267
+ index: {
268
+ type: Boolean,
269
+ default: !0
270
+ },
271
+ multiple: {
272
+ type: Boolean,
273
+ default: !0
274
+ },
275
+ selection: {
276
+ type: Boolean,
277
+ default: !0
278
+ },
279
+ reloadOnModelChange: {
280
+ type: Boolean,
281
+ default: !1
282
+ },
283
+ columns: Array,
284
+ pageSize: {
285
+ type: Number,
286
+ default: 25
287
+ },
288
+ dicOptions: {
289
+ type: Array,
290
+ default: () => []
291
+ },
292
+ paging: {
293
+ type: Boolean,
294
+ default: !0
295
+ },
296
+ clickRowSelect: Boolean,
297
+ payloadStyle: String,
298
+ disabledRowKeys: Array,
299
+ selectExport: Boolean,
300
+ useVisibilityChange: Boolean,
301
+ rowDbClick: Function
302
+ }, L = { data: !0 }, oe = (e) => L[e] !== !0;
303
+ //#endregion
304
+ //#region src/components/table/PageableTable.vue?vue&type=script&lang.jsx
305
+ function se(e) {
306
+ let t = "";
307
+ for (let n in e) t += `<TableColumnDef prop="${n}" label="${n}"/>\n`;
308
+ return t;
309
+ }
310
+ var R = {
311
+ loading: 1,
312
+ error: -1,
313
+ empty: 2,
314
+ success: 0
315
+ }, z = {
316
+ name: "PageableTable",
317
+ emits: { "page-loaded": null },
318
+ inheritAttrs: !1,
319
+ props: { ...I },
320
+ setup(c, { emit: d, attrs: m, slots: h, expose: g }) {
321
+ b(i, c.rowDbClick);
322
+ let y = T("table"), x = T("settingPanel"), C = S(R.empty), w = S([]), D = S(null), O = S(!1), k = S([]), P = S({
323
+ total: 0,
324
+ page: 1,
325
+ limit: c.pageSize,
326
+ ascs: c.ascs,
327
+ descs: c.descs
328
+ }), I = S(0), L = S(0), z = u(() => c.reloadOnModelChange ? {
329
+ asc: P.value.ascs,
330
+ desc: P.value.descs,
331
+ page: P.value.page,
332
+ limit: P.value.limit,
333
+ model: c.model
334
+ } : {
335
+ asc: P.value.ascs,
336
+ desc: P.value.descs,
337
+ page: P.value.page,
338
+ limit: P.value.limit
339
+ }), B = u(() => {
340
+ var e;
341
+ let t = `${(P.value.page - 1) * P.value.limit + (((e = w.value) == null ? void 0 : e.length) ?? 0)}`;
342
+ return t.length > 3 ? 60 + (t.length - 3) * 10 : 60;
343
+ }), V = () => {
344
+ U();
345
+ }, H = (e, t, n) => {
346
+ if (c.clickRowSelect && $(e)) {
347
+ var r;
348
+ if (k.value.find((t) => t[c.rowKey] === e[c.rowKey])) {
349
+ var i;
350
+ (i = y.value) == null || i.toggleRowSelection(e, !1);
351
+ return;
352
+ }
353
+ (r = y.value) == null || r.toggleRowSelection(e);
354
+ }
355
+ }, U = () => {
356
+ var e, t;
357
+ let n = (e = y.value) == null || (e = e.$children) == null ? void 0 : e.find((e) => {
358
+ var t;
359
+ return ((t = e.$options) == null ? void 0 : t.name) === "ElTableBody";
360
+ });
361
+ n == null || (t = n.$refs) == null || (t = t.tooltip) == null || t.hide();
362
+ }, W = ({ scrollLeft: e, scrollTop: t }) => {
363
+ I.value = t, L.value = e;
364
+ }, G = () => {
365
+ pe(I.value, L.value);
366
+ }, ce = (e) => t(se(e)), le = ({ prop: e, order: t }) => {
367
+ c.payloadStyle === "body" ? (P.value.ascs = t === "ascending" ? [e] : c.ascs, P.value.descs = t === "descending" ? [e] : c.descs) : (P.value.ascs = t === "ascending" ? e : "", P.value.descs = t === "descending" ? e : "");
368
+ }, ue = (e) => {
369
+ $(e) && (D.value = e);
370
+ }, de = (e) => {
371
+ k.value = e;
372
+ }, K = () => {
373
+ var e;
374
+ (e = y.value) == null || e.clearSelection();
375
+ }, fe = () => {
376
+ let e;
377
+ return e = c.payloadStyle === "body" ? {
378
+ page: {
379
+ ...P.value,
380
+ current: P.value.page,
381
+ size: P.value.limit
382
+ },
383
+ example: c.model || {}
384
+ } : {
385
+ ...P.value,
386
+ current: P.value.page,
387
+ size: P.value.limit,
388
+ ...c.model || {}
389
+ }, c.selectExport && (c.rowKey ? e.exportKeys = k.value.map((e) => e[c.rowKey]) : e.exportKeys = k.value.map((e) => w.value.indexOf(e))), e;
390
+ }, q = async (e = !0) => {
391
+ if (!c.api && c.data !== !1) {
392
+ var t;
393
+ w.value = c.data, P.value.page = 1, P.value.total = (t = w.value) == null ? void 0 : t.length, P.value.limit = P.value.total;
394
+ return;
395
+ }
396
+ e !== !1 && (w.value = []);
397
+ let n, r = fe();
398
+ if (c.api) {
399
+ e !== !1 && (C.value = R.loading);
400
+ try {
401
+ c.api && (n = await c.api(r));
402
+ } catch {
403
+ C.value = R.error;
404
+ return;
405
+ }
406
+ } else if (c.data) n = { data: { data: {
407
+ total: c.data.length,
408
+ records: c.data
409
+ } } };
410
+ else {
411
+ ne.warning({
412
+ title: "开发提示!",
413
+ message: "PageableTable api(Function) 属性"
414
+ });
415
+ return;
416
+ }
417
+ let { data: { data: i } = {} } = n || {}, { total: a, records: o } = i || {};
418
+ P.value.total = Number(a), w.value = await me(o), !o || !o.length ? C.value = R.empty : C.value = R.success, J(), d("page-loaded", i);
419
+ }, J = () => {
420
+ v(() => {
421
+ var e;
422
+ (e = y.value) == null || e.doLayout();
423
+ });
424
+ }, Y = async (e) => {
425
+ await q(e);
426
+ }, X = () => {
427
+ P.value = {
428
+ total: 0,
429
+ page: 1,
430
+ limit: c.pageSize,
431
+ ascs: c.ascs,
432
+ descs: c.descs
433
+ };
434
+ }, pe = (e, t) => {
435
+ y.value.setScrollTop(e), y.value.setScrollLeft(t);
436
+ }, Z = (e, t) => {
437
+ var n;
438
+ (n = y.value) == null || n.toggleRowSelection(e, t);
439
+ }, me = async (e) => {
440
+ if (!e) return [];
441
+ let t = [...e];
442
+ for (let e of t) for (let t of c.dicOptions) if (e[`$${t.prop}`] = e[t.prop], t.dicData) {
443
+ var n;
444
+ e[t.prop] = ((n = t.dicData.find((n) => n.modelValue === e[t.prop])) == null ? void 0 : n.label) || e[t.prop];
445
+ } else e[t.prop] = await r(t.dicType, e[t.prop]);
446
+ return t;
447
+ }, Q = () => {
448
+ O.value = !O.value;
449
+ }, $ = (e) => {
450
+ var t;
451
+ return !(e != null && e.disabled) && !((t = c.disabledRowKeys) != null && t.includes(e == null ? void 0 : e[c.rowKey]));
452
+ };
453
+ c.useVisibilityChange && l({ onPageVisible: () => {
454
+ Y(!1);
455
+ } }), ie("reloadTableView", (e) => {
456
+ e === c.viewId && q();
457
+ }), E(() => c.url, X), E(() => c.api, X), E(() => c.data, q), E(() => z.value, q, {
458
+ deep: !0,
459
+ immediate: c.immediate
460
+ }), te(() => {
461
+ G();
462
+ }), g({
463
+ records: w,
464
+ getPage: q,
465
+ refresh: Y,
466
+ reload: X,
467
+ doLayout: J,
468
+ clearSelection: K,
469
+ toggleRowSelection: Z,
470
+ toggleSettings: Q
471
+ }), b(a, {
472
+ records: w,
473
+ getPage: q,
474
+ refresh: Y,
475
+ reload: X,
476
+ doLayout: J,
477
+ clearSelection: K,
478
+ toggleRowSelection: Z,
479
+ toggleSettings: Q
480
+ });
481
+ let { autoBindProps: he, listeners: ge } = e(c, { predicate: oe });
482
+ return () => {
483
+ var e;
484
+ let t = D.value && D.value[m["row-key"] || c.rowKey || "id"] === (D.value && c.rowKey ? D.value[c.rowKey] : (e = D.value) == null ? void 0 : e.id), r = [];
485
+ if (h.default) {
486
+ var i;
487
+ let e = n((i = h.default) == null ? void 0 : i.call(h));
488
+ for (let t = 0; t < e.length; t++) {
489
+ let { props: n, children: i } = e[t];
490
+ if (!n) continue;
491
+ let { sortable: a, prop: o, fixed: s, ...c } = n, l = {
492
+ ...c,
493
+ prop: o,
494
+ allowSort: a !== !1
495
+ };
496
+ i && (l.headerSlot = i.header, l.defaultSlot = i.default, l.expandSlot = i.expand, l.iconSlot = i["filter-icon"]), r.push(l);
497
+ }
498
+ } else if (c.columns) for (let e = 0; e < c.columns.length; e++) {
499
+ let { prop: t, sortable: n, fixed: i, ...a } = c.columns[e], o = {
500
+ ...a,
501
+ prop: t,
502
+ allowSort: n !== !1
503
+ };
504
+ x.value && (o.hide = x.value.hideProps[t], o.filterable = x.value.filterableProps[t], o.sortable = x.value.sortableProps[t] === !0, o.fixed = i || x.value.fixedProps[t]), r.push(o);
505
+ }
506
+ return p("div", {
507
+ class: [
508
+ "pageable-table",
509
+ { "auto-height": c.autoHeight },
510
+ m.class
511
+ ],
512
+ style: m.style
513
+ }, [p("div", { class: "pageable-table-wrapper" }, [
514
+ h.toolbar && h.toolbar({ selectedRows: k.value }),
515
+ p(M, _(ge.value, he.value, {
516
+ ref: "table",
517
+ data: w.value,
518
+ class: ["flex-item", { "header-bold": c.headerBold }],
519
+ border: c.border,
520
+ stripe: !0,
521
+ size: "default",
522
+ height: c.autoHeight ? null : "auto",
523
+ onScroll: W,
524
+ onSortChange: le,
525
+ onRowDblclick: V,
526
+ onRowClick: H,
527
+ onCellClick: U,
528
+ onCurrentChange: ue,
529
+ onSelectionChange: de
530
+ }), {
531
+ default: () => {
532
+ let e = [];
533
+ if (c.multiple && c.selection && e.push(p(N, {
534
+ key: "selection",
535
+ type: "selection",
536
+ selectable: $,
537
+ width: c.selectionWidth,
538
+ align: "center"
539
+ }, null)), !c.multiple && c.selection && e.push(p(N, {
540
+ key: "single-selection",
541
+ type: "single-selection",
542
+ "class-name": "single-select-column",
543
+ width: c.selectionWidth,
544
+ align: "center"
545
+ }, {
546
+ header: () => p(j, {
547
+ modelValue: !!D.value,
548
+ label: !0
549
+ }, { default: () => [p("span", null, null)] }),
550
+ default: ({ row: e }) => p(j, {
551
+ label: !0,
552
+ disabled: !$(e),
553
+ modelValue: t
554
+ }, { default: () => [p("span", null, null)] })
555
+ })), c.index && e.push(p(N, {
556
+ key: "index",
557
+ type: "index",
558
+ label: "序号",
559
+ width: B.value,
560
+ align: "center"
561
+ }, { default: ({ $index: e }) => (P.value.page - 1) * P.value.limit + e + 1 || e + 1 })), r.length > 0) for (let t = 0; t < r.length; t++) {
562
+ let n = r[t];
563
+ if (n.hide) continue;
564
+ let { prop: i, headerSlot: a, defaultSlot: o, expandSlot: s, iconSlot: c, ...l } = n;
565
+ e.push(p(F, _(l, { prop: i }), {
566
+ default: h[i] ? ({ row: e }) => h[i]({ row: e }) : o,
567
+ header: a,
568
+ expand: s,
569
+ "filter-icon": c
570
+ }));
571
+ }
572
+ else e.push(p(N, {
573
+ key: "default",
574
+ label: "点击表格行复制模板"
575
+ }, { default: ({ row: e }) => p("pre", {
576
+ class: "pointer",
577
+ onClick: () => ce(e)
578
+ }, [JSON.stringify(e, null, " ")]) }));
579
+ return e;
580
+ },
581
+ empty: () => h.empty ? h.empty() : p(ee, null, [
582
+ C.value === R.loading && p("span", { class: "pageable-table-loading" }, [p("i", { class: "table-status-icon el-icon-loading" }, null), f("加载中...")]),
583
+ C.value === R.error && p(o, {
584
+ class: "pageable-table-error",
585
+ onClick: Y
586
+ }, { default: () => [p("i", { class: "table-status-icon el-icon-error" }, null), f("加载失败,点击重试!")] }),
587
+ C.value !== R.loading && C.value !== R.error && p(A, null, null)
588
+ ]),
589
+ append: h.append
590
+ }),
591
+ c.paging && p(re, {
592
+ "current-page": P.value.page,
593
+ "onUpdate:current-page": (e) => P.value.page = e,
594
+ "hide-on-single-page": c.hideOnSinglePage,
595
+ "page-size": P.value.limit,
596
+ "onUpdate:page-size": (e) => P.value.limit = e,
597
+ total: P.value.total,
598
+ "page-sizes": [
599
+ 10,
600
+ 25,
601
+ 50,
602
+ 100,
603
+ 500,
604
+ 1e3,
605
+ 2e3
606
+ ],
607
+ class: "flex-not-shrink",
608
+ background: !0,
609
+ layout: "total, sizes, prev, pager, next, jumper"
610
+ }, null),
611
+ p(ae, {
612
+ ref: "settingPanel",
613
+ modelValue: O.value,
614
+ "onUpdate:modelValue": (e) => O.value = e,
615
+ columns: r
616
+ }, null)
617
+ ]), p(s, { onNotify: J }, null)]);
618
+ };
619
+ }
620
+ };
621
+ //#endregion
622
+ export { z as t };
@@ -0,0 +1,25 @@
1
+ import { n as e } from "./D_qiRmiE.mjs";
2
+ import { n as t, t as n } from "./CabldOLo.mjs";
3
+ import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
4
+ //#region src/components/form/FormInputPhoneNumber.vue?vue&type=script&lang.jsx
5
+ function s(e) {
6
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !i(e);
7
+ }
8
+ //#endregion
9
+ //#region src/components/form/FormInputPhoneNumber.vue
10
+ var c = {
11
+ name: "FormInputPhoneNumber",
12
+ inheritAttrs: !1,
13
+ props: { ...t },
14
+ emits: { ...e },
15
+ setup(e, { slots: t, attrs: i }) {
16
+ let c = o(e, "modelValue");
17
+ return () => r(n, a(e, i, {
18
+ modelValue: c.value,
19
+ "onUpdate:modelValue": (e) => c.value = e,
20
+ type: "phone"
21
+ }), s(t) ? t : { default: () => [t] });
22
+ }
23
+ };
24
+ //#endregion
25
+ export { c as t };
@@ -0,0 +1,25 @@
1
+ import { n as e } from "./D_qiRmiE.mjs";
2
+ import { n as t, t as n } from "./CabldOLo.mjs";
3
+ import { createVNode as r, isVNode as i, mergeProps as a, useModel as o } from "vue";
4
+ //#region src/components/form/FormInputEmail.vue?vue&type=script&lang.jsx
5
+ function s(e) {
6
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !i(e);
7
+ }
8
+ //#endregion
9
+ //#region src/components/form/FormInputEmail.vue
10
+ var c = {
11
+ name: "FormInputEmail",
12
+ inheritAttrs: !1,
13
+ props: { ...t },
14
+ emits: { ...e },
15
+ setup(e, { slots: t, attrs: i }) {
16
+ let c = o(e, "modelValue");
17
+ return () => r(n, a(e, i, {
18
+ modelValue: c.value,
19
+ "onUpdate:modelValue": (e) => c.value = e,
20
+ type: "email"
21
+ }), s(t) ? t : { default: () => [t] });
22
+ }
23
+ };
24
+ //#endregion
25
+ export { c as t };
@@ -0,0 +1,32 @@
1
+ import { n as e, t } from "./CJdkjadi.mjs";
2
+ //#region src/components/table/form-table.ts
3
+ var n = {
4
+ ...e,
5
+ ...t,
6
+ modelValue: Array,
7
+ columns: Array,
8
+ allowEmpty: Boolean,
9
+ handleColumn: {
10
+ type: Boolean,
11
+ default: !0
12
+ },
13
+ block: {
14
+ type: Boolean,
15
+ default: !0
16
+ },
17
+ editable: Boolean,
18
+ showHandleColumnAddButton: {
19
+ type: Boolean,
20
+ default: !0
21
+ },
22
+ showEmptyAddButton: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ status: {
27
+ type: [Number, String],
28
+ default: ""
29
+ }
30
+ }, r = { readonly: !0 }, i = (t) => e[t] === void 0 && r[t] !== !0;
31
+ //#endregion
32
+ export { i as n, n as t };