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

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