@pungfe/element 0.0.1-alpha.18 → 0.0.1-alpha.21

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 (190) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +20 -1
  3. package/dist/cjs/Button-Dkqk8lXH.cjs +2 -0
  4. package/dist/cjs/Button-Dkqk8lXH.cjs.map +1 -0
  5. package/dist/cjs/Button.cjs +1 -0
  6. package/dist/cjs/ButtonPopconfirm.cjs +1 -0
  7. package/dist/cjs/ConfigProvider-lII820wO.cjs +2 -0
  8. package/dist/cjs/ConfigProvider-lII820wO.cjs.map +1 -0
  9. package/dist/cjs/ConfigProvider.cjs +1 -0
  10. package/dist/cjs/DatePicker-DvW11A5y.cjs +2 -0
  11. package/dist/cjs/DatePicker-DvW11A5y.cjs.map +1 -0
  12. package/dist/cjs/DatePicker.cjs +1 -0
  13. package/dist/cjs/Dialog-C3uo50Lk.cjs +2 -0
  14. package/dist/cjs/Dialog-C3uo50Lk.cjs.map +1 -0
  15. package/dist/cjs/Dialog.cjs +1 -0
  16. package/dist/cjs/Form-269B6UNo.cjs +2 -0
  17. package/dist/cjs/Form-269B6UNo.cjs.map +1 -0
  18. package/dist/cjs/Form.cjs +1 -0
  19. package/dist/cjs/FormItem-Dr0G-5Q4.cjs +2 -0
  20. package/dist/cjs/FormItem-Dr0G-5Q4.cjs.map +1 -0
  21. package/dist/cjs/FormItem.cjs +1 -0
  22. package/dist/cjs/Input-DuZALrON.cjs +2 -0
  23. package/dist/cjs/Input-DuZALrON.cjs.map +1 -0
  24. package/dist/cjs/Input.cjs +1 -0
  25. package/dist/cjs/InputNumber-DPd4h9mJ.cjs +2 -0
  26. package/dist/cjs/InputNumber-DPd4h9mJ.cjs.map +1 -0
  27. package/dist/cjs/InputNumber.cjs +1 -0
  28. package/dist/cjs/Pagination-C6JSioze.cjs +2 -0
  29. package/dist/cjs/Pagination-C6JSioze.cjs.map +1 -0
  30. package/dist/cjs/Pagination.cjs +1 -0
  31. package/dist/cjs/Select-C-b-Biw3.cjs +2 -0
  32. package/dist/cjs/Select-C-b-Biw3.cjs.map +1 -0
  33. package/dist/cjs/Select.cjs +1 -0
  34. package/dist/cjs/TabPane-6xH7oG0B.cjs +2 -0
  35. package/dist/cjs/TabPane-6xH7oG0B.cjs.map +1 -0
  36. package/dist/cjs/TabPane.cjs +1 -0
  37. package/dist/cjs/Table-DpQglHP2.cjs +2 -0
  38. package/dist/cjs/Table-DpQglHP2.cjs.map +1 -0
  39. package/dist/cjs/Table.cjs +1 -0
  40. package/dist/cjs/Tabs-BjfrK6HM.cjs +2 -0
  41. package/dist/cjs/Tabs-BjfrK6HM.cjs.map +1 -0
  42. package/dist/cjs/Tabs.cjs +1 -0
  43. package/dist/cjs/Upload-CXRSAOCS.cjs +2 -0
  44. package/dist/cjs/Upload-CXRSAOCS.cjs.map +1 -0
  45. package/dist/cjs/Upload.cjs +1 -0
  46. package/dist/cjs/components-Xete52W-.cjs +2 -0
  47. package/dist/cjs/components-Xete52W-.cjs.map +1 -0
  48. package/dist/cjs/constants-C1UtNKNR.cjs +2 -0
  49. package/dist/cjs/constants-C1UtNKNR.cjs.map +1 -0
  50. package/dist/cjs/dist-jkU1Ff2x.cjs +2 -0
  51. package/dist/cjs/dist-jkU1Ff2x.cjs.map +1 -0
  52. package/dist/cjs/en-B0d-nlXX.cjs +2 -0
  53. package/dist/cjs/en-B0d-nlXX.cjs.map +1 -0
  54. package/dist/cjs/en.cjs +1 -0
  55. package/dist/cjs/index.cjs +2 -0
  56. package/dist/cjs/index.cjs.map +1 -0
  57. package/dist/cjs/index2.cjs +1 -0
  58. package/dist/cjs/resolver.cjs +2 -0
  59. package/dist/cjs/resolver.cjs.map +1 -0
  60. package/dist/cjs/zh-cn-DsaoBOfv.cjs +2 -0
  61. package/dist/cjs/zh-cn-DsaoBOfv.cjs.map +1 -0
  62. package/dist/cjs/zh-cn.cjs +1 -0
  63. package/dist/es/Button-BgxatYKq.js +37 -0
  64. package/dist/es/Button-BgxatYKq.js.map +1 -0
  65. package/dist/es/Button.js +2 -0
  66. package/dist/es/ButtonPopconfirm.js +18 -0
  67. package/dist/es/ConfigProvider-BlRc251T.js +16 -0
  68. package/dist/es/ConfigProvider-BlRc251T.js.map +1 -0
  69. package/dist/es/ConfigProvider.js +4 -0
  70. package/dist/es/DatePicker-BDjnMA3B.js +69 -0
  71. package/dist/es/DatePicker-BDjnMA3B.js.map +1 -0
  72. package/dist/es/DatePicker.js +2 -0
  73. package/dist/es/Dialog-BahbAebJ.js +54 -0
  74. package/dist/es/Dialog-BahbAebJ.js.map +1 -0
  75. package/dist/es/Dialog.js +2 -0
  76. package/dist/es/Form-wBMmnwZj.js +44 -0
  77. package/dist/es/Form-wBMmnwZj.js.map +1 -0
  78. package/dist/es/Form.js +2 -0
  79. package/dist/es/FormItem--C1bP0wY.js +37 -0
  80. package/dist/es/FormItem--C1bP0wY.js.map +1 -0
  81. package/dist/es/FormItem.js +2 -0
  82. package/dist/es/Input-JT0g3gkf.js +86 -0
  83. package/dist/es/Input-JT0g3gkf.js.map +1 -0
  84. package/dist/es/Input.js +2 -0
  85. package/dist/es/InputNumber-CFTLdulD.js +70 -0
  86. package/dist/es/InputNumber-CFTLdulD.js.map +1 -0
  87. package/dist/es/InputNumber.js +2 -0
  88. package/dist/es/Pagination-CGeelxQR.js +44 -0
  89. package/dist/es/Pagination-CGeelxQR.js.map +1 -0
  90. package/dist/es/Pagination.js +2 -0
  91. package/dist/es/Select-BKdDBeJC.js +110 -0
  92. package/dist/es/Select-BKdDBeJC.js.map +1 -0
  93. package/dist/es/Select.js +2 -0
  94. package/dist/es/TabPane-CzInYf67.js +34 -0
  95. package/dist/es/TabPane-CzInYf67.js.map +1 -0
  96. package/dist/es/TabPane.js +2 -0
  97. package/dist/es/Table-Cm_Dki-c.js +104 -0
  98. package/dist/es/Table-Cm_Dki-c.js.map +1 -0
  99. package/dist/es/Table.js +2 -0
  100. package/dist/es/Tabs-CKIkuQ81.js +40 -0
  101. package/dist/es/Tabs-CKIkuQ81.js.map +1 -0
  102. package/dist/es/Tabs.js +2 -0
  103. package/dist/es/Upload-DCnEcRkL.js +52 -0
  104. package/dist/es/Upload-DCnEcRkL.js.map +1 -0
  105. package/dist/es/Upload.js +2 -0
  106. package/dist/es/components-DKoUIsFy.js +91 -0
  107. package/dist/es/components-DKoUIsFy.js.map +1 -0
  108. package/dist/es/constants-TVJ7auaC.js +6 -0
  109. package/dist/es/constants-TVJ7auaC.js.map +1 -0
  110. package/dist/es/dist-BPi3_vgC.js +30 -0
  111. package/dist/es/dist-BPi3_vgC.js.map +1 -0
  112. package/dist/es/en-BAY1fB2Q.js +197 -0
  113. package/dist/es/en-BAY1fB2Q.js.map +1 -0
  114. package/dist/es/en.js +2 -0
  115. package/dist/es/index.js +28 -0
  116. package/dist/es/index.js.map +1 -0
  117. package/dist/es/index2.js +3 -0
  118. package/dist/es/resolver.js +39 -0
  119. package/dist/es/resolver.js.map +1 -0
  120. package/dist/es/zh-cn-UaM4b5St.js +197 -0
  121. package/dist/es/zh-cn-UaM4b5St.js.map +1 -0
  122. package/dist/es/zh-cn.js +2 -0
  123. package/dist/{basic/XButton.vue.d.ts → types/components/Button.vue.d.ts} +10 -5
  124. package/dist/{basic/XReconfirm.vue.d.ts → types/components/ButtonPopconfirm.vue.d.ts} +4 -3
  125. package/dist/types/components/ConfigProvider.vue.d.ts +21 -0
  126. package/dist/{basic/XDatePicker.vue.d.ts → types/components/DatePicker.vue.d.ts} +13 -5
  127. package/dist/{basic/XDialog.vue.d.ts → types/components/Dialog.vue.d.ts} +17 -9
  128. package/dist/types/components/Form.vue.d.ts +29 -0
  129. package/dist/types/components/FormItem.vue.d.ts +33 -0
  130. package/dist/types/components/Input.vue.d.ts +44 -0
  131. package/dist/types/components/InputNumber.vue.d.ts +48 -0
  132. package/dist/types/components/Pagination.vue.d.ts +40 -0
  133. package/dist/types/components/Select.vue.d.ts +45 -0
  134. package/dist/types/components/TabPane.vue.d.ts +32 -0
  135. package/dist/types/components/Table.vue.d.ts +89 -0
  136. package/dist/{basic/XTabs.vue.d.ts → types/components/Tabs.vue.d.ts} +4 -12
  137. package/dist/types/components/Upload.vue.d.ts +40 -0
  138. package/dist/types/components/index.d.ts +50 -0
  139. package/dist/types/constants/index.d.ts +15 -0
  140. package/dist/types/index.d.ts +5 -0
  141. package/dist/types/install.d.ts +2 -0
  142. package/dist/types/locales/en.d.ts +2 -0
  143. package/dist/types/locales/index.d.ts +2 -0
  144. package/dist/types/locales/zh-cn.d.ts +2 -0
  145. package/dist/{resolver.d.ts → types/resolver.d.ts} +1 -1
  146. package/dist/types/src/components/Button.vue.d.ts +31 -0
  147. package/dist/types/src/components/ButtonPopconfirm.vue.d.ts +27 -0
  148. package/dist/types/src/components/ConfigProvider.vue.d.ts +21 -0
  149. package/dist/types/src/components/DatePicker.vue.d.ts +34 -0
  150. package/dist/types/src/components/Dialog.vue.d.ts +44 -0
  151. package/dist/{basic/XForm.vue.d.ts → types/src/components/Form.vue.d.ts} +9 -27
  152. package/dist/types/src/components/FormItem.vue.d.ts +33 -0
  153. package/dist/types/src/components/Input.vue.d.ts +44 -0
  154. package/dist/types/src/components/InputNumber.vue.d.ts +48 -0
  155. package/dist/types/src/components/Pagination.vue.d.ts +40 -0
  156. package/dist/{basic/XSelect.vue.d.ts → types/src/components/Select.vue.d.ts} +19 -5
  157. package/dist/types/src/components/TabPane.vue.d.ts +32 -0
  158. package/dist/types/src/components/Table.vue.d.ts +89 -0
  159. package/dist/types/src/components/Tabs.vue.d.ts +26 -0
  160. package/dist/types/src/components/Upload.vue.d.ts +27 -0
  161. package/dist/types/src/components/index.d.ts +15 -0
  162. package/dist/types/src/constants/index.d.ts +15 -0
  163. package/dist/types/src/index.d.ts +2 -0
  164. package/dist/types/src/locales/en.d.ts +2 -0
  165. package/dist/types/src/locales/index.d.ts +2 -0
  166. package/dist/types/src/locales/zh-cn.d.ts +2 -0
  167. package/dist/types/src/resolver.d.ts +3 -0
  168. package/dist/types/test/table.test.d.ts +1 -0
  169. package/package.json +32 -26
  170. package/dist/basic/XCascader.vue.d.ts +0 -26
  171. package/dist/basic/XCheckbox.vue.d.ts +0 -28
  172. package/dist/basic/XColorPicker.vue.d.ts +0 -21
  173. package/dist/basic/XDivider.vue.d.ts +0 -20
  174. package/dist/basic/XImage.vue.d.ts +0 -5
  175. package/dist/basic/XInput.vue.d.ts +0 -30
  176. package/dist/basic/XInputNumber.vue.d.ts +0 -38
  177. package/dist/basic/XPagination.vue.d.ts +0 -21
  178. package/dist/basic/XRate.vue.d.ts +0 -20
  179. package/dist/basic/XScrollbar.vue.d.ts +0 -553
  180. package/dist/basic/XSpace.vue.d.ts +0 -20
  181. package/dist/basic/XTable.vue.d.ts +0 -57
  182. package/dist/basic/XTag.vue.d.ts +0 -28
  183. package/dist/basic/XText.vue.d.ts +0 -23
  184. package/dist/basic/XUpload.vue.d.ts +0 -41
  185. package/dist/components.d.ts +0 -43
  186. package/dist/constants.d.ts +0 -12
  187. package/dist/index.d.ts +0 -7
  188. package/dist/index.mjs +0 -1297
  189. package/dist/resolver.mjs +0 -42
  190. package/dist/vendor-pRyQDb6F.js +0 -102
package/dist/index.mjs DELETED
@@ -1,1297 +0,0 @@
1
- import { defineComponent as b, openBlock as p, createBlock as g, unref as B, mergeProps as C, withCtx as v, renderSlot as T, useModel as E, inject as f, mergeModels as X, computed as x, createElementBlock as H, Fragment as N, renderList as j, useSlots as _, createSlots as q, normalizeProps as A, guardReactiveProps as O, ref as R, provide as z, createVNode as I, resolveComponent as ee, createTextVNode as F, useTemplateRef as Q, watch as te, toDisplayString as ae, normalizeClass as le } from "vue";
2
- import { ElButton as oe, ElCascader as ne, ElCheckboxGroup as ie, ElCheckbox as re, ElColorPicker as de, ElDatePicker as ue, ElDialog as se, ElDivider as ce, ElForm as me, ElFormItem as fe, ElMessage as pe, ElImage as ye, ElInput as be, ElInputNumber as ve, ElPagination as ge, ElRate as Be, ElPopconfirm as he, ElScrollbar as Ve, ElSelect as Xe, ElOption as Te, ElSpace as Ce, ElTable as we, ElTableColumn as Ee, ElTabs as xe, ElTabPane as ke, ElTag as Se, ElText as Ie, ElUpload as Pe } from "element-plus";
3
- import { u as L, a as $e } from "./vendor-pRyQDb6F.js";
4
- const ze = /* @__PURE__ */ b({
5
- __name: "XButton",
6
- props: {
7
- size: {},
8
- disabled: { type: Boolean, default: void 0 },
9
- type: {},
10
- icon: {},
11
- nativeType: {},
12
- loading: { type: Boolean },
13
- loadingIcon: {},
14
- plain: { type: Boolean },
15
- text: { type: Boolean },
16
- link: { type: Boolean },
17
- bg: { type: Boolean },
18
- autofocus: { type: Boolean },
19
- round: { type: Boolean },
20
- circle: { type: Boolean },
21
- color: {},
22
- dark: { type: Boolean },
23
- autoInsertSpace: { type: Boolean },
24
- tag: {}
25
- },
26
- emits: ["click"],
27
- setup(e, { emit: i }) {
28
- const a = e, o = i;
29
- return (t, l) => (p(), g(B(oe), C(a, {
30
- onClick: l[0] || (l[0] = (n) => o("click", n))
31
- }), {
32
- default: v(() => [
33
- T(t.$slots, "default")
34
- ]),
35
- _: 3
36
- }, 16));
37
- }
38
- }), $ = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL"), K = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS"), S = /* @__PURE__ */ Symbol(
39
- "X_FORM_ITEM_VALIDATION"
40
- ), Ae = /* @__PURE__ */ Symbol(
41
- "X_FORM_TAB_UPDATE_HOOK"
42
- ), W = /* @__PURE__ */ Symbol("X_TAB_PANES"), Y = /* @__PURE__ */ Symbol("X_TAB_PANE"), M = /* @__PURE__ */ Symbol(
43
- "X_TABLE_QUERY_UPDATE_HOOK"
44
- ), D = /* @__PURE__ */ Symbol(
45
- "X_TABLE_QUERY_EXECUTE_HOOK"
46
- ), Oe = /* @__PURE__ */ b({
47
- __name: "XCascader",
48
- props: /* @__PURE__ */ X({
49
- clearable: {
50
- type: Boolean
51
- },
52
- placeholder: {
53
- default: "请选择"
54
- },
55
- disabled: {
56
- type: Boolean,
57
- default: void 0
58
- },
59
- props: {}
60
- }, {
61
- modelValue: {},
62
- modelModifiers: {}
63
- }),
64
- emits: /* @__PURE__ */ X(["blur", "change"], ["update:modelValue"]),
65
- setup(e, {
66
- emit: i
67
- }) {
68
- const a = e, o = i, t = E(e, "modelValue"), l = f(S, void 0);
69
- if (l?.required) {
70
- const {
71
- validator: s,
72
- label: u
73
- } = l;
74
- l.validator = () => t.value ? s?.() : `请输入${u}`;
75
- }
76
- const n = f($, void 0), r = f(M, void 0), c = f(D, void 0);
77
- r?.on(([s, u]) => n === s && u === void 0 && (t.value = void 0)), c?.on(() => n && r?.trigger([n, t.value]));
78
- const d = () => {
79
- l?.validate(), o("blur");
80
- };
81
- return (s, u) => (p(), g(B(ne), C(a, {
82
- modelValue: t.value,
83
- "onUpdate:modelValue": u[0] || (u[0] = (w) => t.value = w),
84
- onBlur: d
85
- }), null, 16, ["modelValue"]));
86
- }
87
- }), Me = /* @__PURE__ */ b({
88
- __name: "XCheckbox",
89
- props: /* @__PURE__ */ X({
90
- data: {},
91
- factory: {
92
- type: Function
93
- },
94
- identify: {
95
- type: Function
96
- },
97
- label: {
98
- type: [String, Boolean, Number, Object]
99
- },
100
- value: {
101
- type: [String, Boolean, Number, Object]
102
- },
103
- indeterminate: {
104
- type: Boolean
105
- },
106
- disabled: {
107
- type: Boolean
108
- },
109
- checked: {
110
- type: Boolean
111
- },
112
- name: {},
113
- trueValue: {},
114
- falseValue: {},
115
- trueLabel: {},
116
- falseLabel: {},
117
- id: {},
118
- border: {
119
- type: Boolean
120
- },
121
- size: {},
122
- tabindex: {},
123
- validateEvent: {
124
- type: Boolean
125
- },
126
- ariaLabel: {},
127
- ariaControls: {}
128
- }, {
129
- modelValue: {},
130
- modelModifiers: {}
131
- }),
132
- emits: ["update:modelValue"],
133
- setup(e) {
134
- const i = E(e, "modelValue"), a = L(() => e.data, e.factory), o = x(() => [...a.value]), t = (d) => {
135
- if (typeof d == "object") {
136
- if (e.identify)
137
- return e.identify(d);
138
- throw new Error("`identify` is required when value's type extends `object` or `object[]`");
139
- } else
140
- return d;
141
- }, l = (d) => o.value.map((s) => s.value).find((s) => t(s) === d), n = x(() => o.value.map((d) => {
142
- const s = t(d.value);
143
- return {
144
- ...d,
145
- key: s,
146
- value: s
147
- };
148
- })), r = x({
149
- get: () => i.value && i.value.map(t),
150
- set: (d) => i.value = Array.isArray(d) ? d.map((s) => l(s)) : []
151
- }), c = f(S, void 0);
152
- if (c?.required) {
153
- const {
154
- validator: d,
155
- label: s
156
- } = c;
157
- c.validator = () => !i.value || Array.isArray(i.value) && i.value.length === 0 ? `请选择${s}` : d?.();
158
- }
159
- return (d, s) => (p(), g(B(ie), C({
160
- modelValue: r.value,
161
- "onUpdate:modelValue": s[0] || (s[0] = (u) => r.value = u)
162
- }, {
163
- disabled: e.disabled,
164
- size: e.size
165
- }), {
166
- default: v(() => [(p(!0), H(N, null, j(n.value, (u) => (p(), g(B(re), {
167
- key: u.key,
168
- disabled: u.disabled,
169
- label: u.label,
170
- value: u.value
171
- }, null, 8, ["disabled", "label", "value"]))), 128))]),
172
- _: 1
173
- }, 16, ["modelValue"]));
174
- }
175
- }), De = /* @__PURE__ */ b({
176
- __name: "XColorPicker",
177
- props: /* @__PURE__ */ X({
178
- clearable: {
179
- type: Boolean
180
- },
181
- disabled: {
182
- type: Boolean,
183
- default: void 0
184
- }
185
- }, {
186
- modelValue: {},
187
- modelModifiers: {}
188
- }),
189
- emits: ["update:modelValue"],
190
- setup(e) {
191
- const i = e, a = E(e, "modelValue"), o = f(S, void 0);
192
- if (o?.required) {
193
- const {
194
- validator: r,
195
- label: c
196
- } = o;
197
- o.validator = () => a.value ? r?.() : `请输入${c}`;
198
- }
199
- const t = f($, void 0), l = f(M, void 0), n = f(D, void 0);
200
- return l?.on(([r, c]) => t === r && c === void 0 && (a.value = void 0)), n?.on(() => t && l?.trigger([t, a.value])), (r, c) => (p(), g(B(de), C(i, {
201
- modelValue: a.value,
202
- "onUpdate:modelValue": c[0] || (c[0] = (d) => a.value = d)
203
- }), null, 16, ["modelValue"]));
204
- }
205
- }), Re = /* @__PURE__ */ b({
206
- __name: "XDatePicker",
207
- props: /* @__PURE__ */ X({
208
- type: {
209
- default: "date"
210
- },
211
- showNow: {
212
- type: Boolean
213
- },
214
- showConfirm: {
215
- type: Boolean
216
- },
217
- showFooter: {
218
- type: Boolean
219
- },
220
- showWeekNumber: {
221
- type: Boolean
222
- },
223
- ariaLabel: {},
224
- emptyValues: {},
225
- valueOnClear: {},
226
- disabledDate: {},
227
- cellClassName: {},
228
- shortcuts: {},
229
- arrowControl: {
230
- type: Boolean
231
- },
232
- tabindex: {},
233
- validateEvent: {
234
- type: Boolean
235
- },
236
- unlinkPanels: {
237
- type: Boolean
238
- },
239
- placement: {},
240
- fallbackPlacements: {},
241
- disabledHours: {},
242
- disabledMinutes: {},
243
- disabledSeconds: {},
244
- automaticDropdown: {
245
- type: Boolean
246
- },
247
- id: {},
248
- name: {},
249
- popperClass: {},
250
- popperStyle: {},
251
- format: {},
252
- valueFormat: {},
253
- dateFormat: {},
254
- timeFormat: {},
255
- clearable: {
256
- type: Boolean
257
- },
258
- clearIcon: {},
259
- editable: {
260
- type: Boolean
261
- },
262
- prefixIcon: {},
263
- size: {},
264
- readonly: {
265
- type: Boolean
266
- },
267
- disabled: {
268
- type: Boolean
269
- },
270
- placeholder: {
271
- default: "请选择"
272
- },
273
- popperOptions: {},
274
- modelValue: {},
275
- rangeSeparator: {},
276
- startPlaceholder: {
277
- default: "开始日期"
278
- },
279
- endPlaceholder: {
280
- default: "结束日期"
281
- },
282
- defaultValue: {},
283
- defaultTime: {},
284
- isRange: {
285
- type: Boolean
286
- }
287
- }, {
288
- modelValue: {},
289
- modelModifiers: {},
290
- start: {},
291
- startModifiers: {},
292
- end: {},
293
- endModifiers: {}
294
- }),
295
- emits: /* @__PURE__ */ X(["blur", "change"], ["update:modelValue", "update:start", "update:end"]),
296
- setup(e, {
297
- emit: i
298
- }) {
299
- const a = i, o = E(e, "modelValue"), t = E(e, "start"), l = E(e, "end"), n = x({
300
- get: () => {
301
- if (e.type.includes("range") && t.value && l.value)
302
- return [t.value, l.value];
303
- if (!e.type.includes("range"))
304
- return o.value;
305
- },
306
- set: (m) => {
307
- e.type.includes("range") ? (t.value = m?.[0], l.value = m?.[1]) : o.value = m;
308
- }
309
- }), r = x(() => e.type.includes("range") ? [{
310
- text: "最近一周",
311
- value: () => {
312
- const m = /* @__PURE__ */ new Date(), h = /* @__PURE__ */ new Date();
313
- return h.setTime(h.getTime() - 3600 * 1e3 * 24 * 7), [h, m];
314
- }
315
- }, {
316
- text: "最近一月",
317
- value: () => {
318
- const m = /* @__PURE__ */ new Date(), h = /* @__PURE__ */ new Date();
319
- return h.setTime(h.getTime() - 3600 * 1e3 * 24 * 30), [h, m];
320
- }
321
- }, {
322
- text: "最近三月",
323
- value: () => {
324
- const m = /* @__PURE__ */ new Date(), h = /* @__PURE__ */ new Date();
325
- return h.setTime(h.getTime() - 3600 * 1e3 * 24 * 90), [h, m];
326
- }
327
- }] : [{
328
- text: "昨天",
329
- value: /* @__PURE__ */ new Date()
330
- }, {
331
- text: "一周前",
332
- value: () => {
333
- const m = /* @__PURE__ */ new Date();
334
- return m.setTime(m.getTime() - 3600 * 1e3 * 24 * 7), m;
335
- }
336
- }, {
337
- text: "一月前",
338
- value: () => {
339
- const m = /* @__PURE__ */ new Date();
340
- return m.setTime(m.getTime() - 3600 * 1e3 * 24 * 30), m;
341
- }
342
- }]), c = f(S, void 0);
343
- if (c?.required) {
344
- const {
345
- validator: m,
346
- label: h
347
- } = c;
348
- c.validator = () => !n.value || e.type.includes("range") && !n.value?.length ? `请选择${h}` : m?.();
349
- }
350
- const d = f($, void 0), s = f(M, void 0), u = f(D, void 0);
351
- s?.on(([m, h]) => d === m && h === void 0 && (n.value = void 0)), u?.on(() => d && s?.trigger([d, n.value === void 0 ? void 0 : Array.isArray(n.value) ? `${n.value[0]} 至 ${n.value[1]}` : n.value]));
352
- const w = (m) => a("change", m), P = () => {
353
- c?.validate?.(), a("blur");
354
- };
355
- return (m, h) => (p(), g(B(ue), C({
356
- type: e.type,
357
- placeholder: e.placeholder,
358
- startPlaceholder: e.startPlaceholder,
359
- endPlaceholder: e.endPlaceholder,
360
- shortcuts: r.value,
361
- valueFormat: e.valueFormat
362
- }, {
363
- modelValue: n.value,
364
- "onUpdate:modelValue": h[0] || (h[0] = (U) => n.value = U),
365
- onBlur: P,
366
- onChange: w
367
- }), null, 16, ["modelValue"]));
368
- }
369
- }), Ue = /* @__PURE__ */ b({
370
- __name: "XDialog",
371
- props: /* @__PURE__ */ X({
372
- title: {},
373
- bodyClass: {}
374
- }, {
375
- modelValue: {
376
- type: Boolean
377
- },
378
- modelModifiers: {}
379
- }),
380
- emits: ["update:modelValue"],
381
- setup(e) {
382
- const {
383
- header: i,
384
- footer: a
385
- } = _(), o = E(e, "modelValue");
386
- return (t, l) => (p(), g(B(se), {
387
- modelValue: o.value,
388
- "onUpdate:modelValue": l[0] || (l[0] = (n) => o.value = n),
389
- title: e.title,
390
- "body-class": `flex flex-col ${e.bodyClass}`
391
- }, q({
392
- default: v(() => [T(t.$slots, "default")]),
393
- _: 2
394
- }, [i ? {
395
- name: "header",
396
- fn: v(() => [T(t.$slots, "header")]),
397
- key: "0"
398
- } : void 0, a ? {
399
- name: "footer",
400
- fn: v(() => [T(t.$slots, "footer")]),
401
- key: "1"
402
- } : void 0]), 1032, ["modelValue", "title", "body-class"]));
403
- }
404
- }), Fe = /* @__PURE__ */ b({
405
- __name: "XDivider",
406
- props: {
407
- direction: {},
408
- contentPosition: {},
409
- borderStyle: {}
410
- },
411
- setup(e) {
412
- const i = e;
413
- return (a, o) => (p(), g(B(ce), A(O(i)), {
414
- default: v(() => [
415
- T(a.$slots, "default")
416
- ]),
417
- _: 3
418
- }, 16));
419
- }
420
- }), Le = /* @__PURE__ */ b((e, {
421
- expose: i
422
- }) => {
423
- const a = f(Y, void 0), o = f(Ae, void 0), t = R(), l = {
424
- label: e.label,
425
- required: e.required,
426
- clearValidate() {
427
- t.value = void 0;
428
- },
429
- validate() {
430
- return t.value = l.validator?.() ?? void 0, t.value && a?.name && (pe({
431
- plain: !0,
432
- type: "warning",
433
- message: t.value
434
- }), o?.trigger(a.name)), !t.value;
435
- }
436
- };
437
- return f(K, void 0)?.push(l), z(S, l), i({
438
- ...l
439
- }), z($, e.label), () => I(fe, C({
440
- label: e.label,
441
- labelPosition: e.labelPosition,
442
- labelWidth: e.labelWidth,
443
- required: e.required
444
- }, {
445
- error: t.value
446
- }), {
447
- label: () => e.label,
448
- default: () => e.content?.()
449
- });
450
- }, {
451
- props: ["label", "required", "content", "tooltip"]
452
- }), He = /* @__PURE__ */ b({
453
- __name: "XForm",
454
- props: {
455
- content: {
456
- type: Function
457
- },
458
- data: {
459
- default: () => () => {
460
- }
461
- },
462
- disabled: {
463
- type: Boolean
464
- },
465
- inline: {
466
- type: Boolean
467
- },
468
- labelWidth: {},
469
- labelPosition: {},
470
- statusIcon: {
471
- type: Boolean,
472
- default: !0
473
- }
474
- },
475
- setup(e, {
476
- expose: i
477
- }) {
478
- const a = R(), o = [];
479
- z(K, o);
480
- const t = () => o.every((r) => r.validate()), l = () => {
481
- a.value?.resetFields(), o.forEach((r) => r.clearValidate());
482
- };
483
- i({
484
- data: e.data,
485
- validate: t,
486
- resetFields: l
487
- });
488
- const n = () => e.content?.({
489
- data: e.data
490
- });
491
- return (r, c) => (p(), g(B(me), C({
492
- ref_key: "form",
493
- ref: a
494
- }, {
495
- inline: e.inline,
496
- disabled: e.disabled,
497
- labelWidth: e.labelWidth,
498
- model: e.data,
499
- labelPosition: e.labelPosition,
500
- statusIcon: e.statusIcon
501
- }), {
502
- default: v(() => [I(n)]),
503
- _: 1
504
- }, 16));
505
- }
506
- }), Ne = /* @__PURE__ */ b({
507
- __name: "XImage",
508
- props: {
509
- hideOnClickModal: { type: Boolean },
510
- src: {},
511
- fit: {},
512
- loading: {},
513
- lazy: { type: Boolean },
514
- scrollContainer: {},
515
- previewSrcList: {},
516
- previewTeleported: { type: Boolean },
517
- zIndex: {},
518
- initialIndex: {},
519
- infinite: { type: Boolean },
520
- closeOnPressEscape: { type: Boolean },
521
- zoomRate: {},
522
- scale: {},
523
- minScale: {},
524
- maxScale: {},
525
- showProgress: { type: Boolean },
526
- crossorigin: {}
527
- },
528
- setup(e) {
529
- const i = e;
530
- return (a, o) => (p(), g(B(ye), A(O(i)), null, 16));
531
- }
532
- }), je = /* @__PURE__ */ b({
533
- __name: "XInput",
534
- props: /* @__PURE__ */ X({
535
- clearable: {
536
- type: Boolean
537
- },
538
- placeholder: {
539
- default: "请输入"
540
- },
541
- disabled: {
542
- type: Boolean,
543
- default: void 0
544
- },
545
- size: {},
546
- type: {},
547
- showPassword: {
548
- type: Boolean
549
- },
550
- autocomplete: {},
551
- autosize: {
552
- type: [Object, Boolean]
553
- }
554
- }, {
555
- modelValue: {},
556
- modelModifiers: {}
557
- }),
558
- emits: /* @__PURE__ */ X(["blur", "change"], ["update:modelValue"]),
559
- setup(e, {
560
- emit: i
561
- }) {
562
- const a = e, o = i, t = E(e, "modelValue"), l = f(S, void 0);
563
- if (l?.required) {
564
- const {
565
- validator: u,
566
- label: w
567
- } = l;
568
- l.validator = () => t.value ? u?.() : `请输入${w}`;
569
- }
570
- const n = f($, void 0), r = f(M, void 0), c = f(D, void 0);
571
- r?.on(([u, w]) => n === u && w === void 0 && (t.value = void 0)), c?.on(() => n && r?.trigger([n, t.value]));
572
- const d = (u) => o("change", u), s = () => {
573
- l?.validate(), o("blur");
574
- };
575
- return (u, w) => (p(), g(B(be), C(a, {
576
- modelValue: t.value,
577
- "onUpdate:modelValue": w[0] || (w[0] = (P) => t.value = P),
578
- onBlur: s,
579
- onChange: d
580
- }), null, 16, ["modelValue"]));
581
- }
582
- }), qe = /* @__PURE__ */ b({
583
- __name: "XInputNumber",
584
- props: /* @__PURE__ */ X({
585
- placeholder: {
586
- default: "请输入"
587
- },
588
- disabled: {
589
- type: Boolean,
590
- default: void 0
591
- },
592
- align: {
593
- default: "left"
594
- },
595
- size: {},
596
- step: {},
597
- max: {},
598
- min: {},
599
- controls: {
600
- type: Boolean
601
- },
602
- precision: {},
603
- stepStrictly: {
604
- type: Boolean
605
- }
606
- }, {
607
- modelValue: {},
608
- modelModifiers: {}
609
- }),
610
- emits: /* @__PURE__ */ X(["blur"], ["update:modelValue"]),
611
- setup(e, {
612
- emit: i
613
- }) {
614
- const a = e, o = i, t = E(e, "modelValue"), l = f(S, void 0);
615
- if (l?.required) {
616
- const {
617
- validator: r,
618
- label: c
619
- } = l;
620
- l.validator = () => t.value === void 0 ? `请输入${c}` : r?.();
621
- }
622
- const n = () => {
623
- l?.validate(), o("blur");
624
- };
625
- return (r, c) => (p(), g(B(ve), C(a, {
626
- modelValue: t.value,
627
- "onUpdate:modelValue": c[0] || (c[0] = (d) => t.value = d),
628
- onBlur: n
629
- }), q({
630
- _: 2
631
- }, [r.$slots.prefix ? {
632
- name: "prefix",
633
- fn: v(() => [T(r.$slots, "prefix")]),
634
- key: "0"
635
- } : void 0, r.$slots.suffix ? {
636
- name: "suffix",
637
- fn: v(() => [T(r.$slots, "suffix")]),
638
- key: "1"
639
- } : void 0]), 1040, ["modelValue"]));
640
- }
641
- }), Qe = /* @__PURE__ */ b({
642
- __name: "XPagination",
643
- props: /* @__PURE__ */ X({
644
- sizes: { default: () => [20, 50, 100] },
645
- pageSize: {},
646
- defaultPageSize: {},
647
- total: {},
648
- pageCount: {},
649
- pagerCount: {},
650
- currentPage: {},
651
- defaultCurrentPage: {},
652
- layout: { default: "prev, pager, next, jumper, ->, total" },
653
- popperClass: {},
654
- popperStyle: {},
655
- prevText: {},
656
- prevIcon: {},
657
- nextText: {},
658
- nextIcon: {},
659
- teleported: { type: Boolean },
660
- small: { type: Boolean },
661
- size: {},
662
- background: { type: Boolean, default: !0 },
663
- disabled: { type: Boolean },
664
- hideOnSinglePage: { type: Boolean },
665
- appendSizeTo: {}
666
- }, {
667
- size: {},
668
- sizeModifiers: {},
669
- current: {},
670
- currentModifiers: {}
671
- }),
672
- emits: /* @__PURE__ */ X(["sizeChange", "currentChange"], ["update:size", "update:current"]),
673
- setup(e, { emit: i }) {
674
- const a = i, o = E(e, "size"), t = E(e, "current");
675
- return (l, n) => (p(), g(B(ge), C({ background: e.background, pageSizes: e.sizes, layout: e.layout, total: e.total }, {
676
- "current-page": t.value,
677
- "onUpdate:currentPage": n[0] || (n[0] = (r) => t.value = r),
678
- "page-size": o.value,
679
- "onUpdate:pageSize": n[1] || (n[1] = (r) => o.value = r),
680
- onSizeChange: n[2] || (n[2] = (r) => a("sizeChange", r)),
681
- onCurrentChange: n[3] || (n[3] = (r) => a("currentChange", r))
682
- }), null, 16, ["current-page", "page-size"]));
683
- }
684
- }), Ke = /* @__PURE__ */ b({
685
- __name: "XRate",
686
- props: /* @__PURE__ */ X({
687
- id: {},
688
- lowThreshold: {},
689
- highThreshold: {},
690
- max: {},
691
- colors: {},
692
- voidColor: {},
693
- disabledVoidColor: {},
694
- icons: {},
695
- voidIcon: {},
696
- disabledVoidIcon: {},
697
- disabled: {
698
- type: Boolean,
699
- default: void 0
700
- },
701
- allowHalf: {
702
- type: Boolean
703
- },
704
- showText: {
705
- type: Boolean
706
- },
707
- showScore: {
708
- type: Boolean
709
- },
710
- textColor: {},
711
- texts: {},
712
- scoreTemplate: {},
713
- size: {},
714
- clearable: {
715
- type: Boolean
716
- },
717
- ariaLabel: {}
718
- }, {
719
- modelValue: {},
720
- modelModifiers: {}
721
- }),
722
- emits: ["update:modelValue"],
723
- setup(e) {
724
- const i = e, a = E(e, "modelValue");
725
- return (o, t) => (p(), g(B(Be), C(i, {
726
- modelValue: a.value,
727
- "onUpdate:modelValue": t[0] || (t[0] = (l) => a.value = l)
728
- }), null, 16, ["modelValue"]));
729
- }
730
- }), We = /* @__PURE__ */ b({
731
- __name: "XReconfirm",
732
- props: {
733
- title: { default: "是否执行?" }
734
- },
735
- emits: ["cancel", "confirm"],
736
- setup(e, { emit: i }) {
737
- const a = i;
738
- return (o, t) => {
739
- const l = ee("XButton");
740
- return p(), g(B(he), {
741
- title: e.title,
742
- onCancel: t[0] || (t[0] = () => a("cancel")),
743
- onConfirm: t[1] || (t[1] = () => a("confirm"))
744
- }, {
745
- reference: v(() => [
746
- T(o.$slots, "default")
747
- ]),
748
- actions: v(({ confirm: n, cancel: r }) => [
749
- I(l, {
750
- size: "small",
751
- onClick: r
752
- }, {
753
- default: v(() => [...t[2] || (t[2] = [
754
- F(" 取消 ", -1)
755
- ])]),
756
- _: 1
757
- }, 8, ["onClick"]),
758
- I(l, {
759
- type: "danger",
760
- size: "small",
761
- onClick: n
762
- }, {
763
- default: v(() => [...t[3] || (t[3] = [
764
- F(" 确定 ", -1)
765
- ])]),
766
- _: 1
767
- }, 8, ["onClick"])
768
- ]),
769
- _: 3
770
- }, 8, ["title"]);
771
- };
772
- }
773
- }), Ye = /* @__PURE__ */ b({
774
- __name: "XScrollbar",
775
- props: {
776
- distance: {},
777
- height: {},
778
- maxHeight: {},
779
- native: {
780
- type: Boolean
781
- },
782
- wrapStyle: {
783
- type: [Boolean, null, String, Object, Array]
784
- },
785
- wrapClass: {},
786
- viewClass: {},
787
- viewStyle: {
788
- type: [Boolean, null, String, Object, Array]
789
- },
790
- noresize: {
791
- type: Boolean
792
- },
793
- tag: {},
794
- always: {
795
- type: Boolean
796
- },
797
- minSize: {},
798
- tabindex: {},
799
- id: {},
800
- role: {},
801
- ariaLabel: {},
802
- ariaOrientation: {}
803
- },
804
- setup(e, {
805
- expose: i
806
- }) {
807
- const a = e, o = Q("scrollbar"), t = x(() => o.value?.wrapRef), l = x(() => t.value?.firstElementChild);
808
- return i({
809
- wrapRef: t,
810
- viewRef: l
811
- }), (n, r) => (p(), g(B(Ve), C({
812
- ref: "scrollbar"
813
- }, a), {
814
- default: v(() => [T(n.$slots, "default")]),
815
- _: 3
816
- }, 16));
817
- }
818
- }), Ge = /* @__PURE__ */ b({
819
- __name: "XSelect",
820
- props: /* @__PURE__ */ X({
821
- data: {},
822
- factory: {
823
- type: Function
824
- },
825
- identify: {
826
- type: Function
827
- },
828
- supplement: {
829
- type: Function
830
- },
831
- ariaLabel: {},
832
- emptyValues: {},
833
- valueOnClear: {},
834
- name: {},
835
- id: {},
836
- autocomplete: {},
837
- automaticDropdown: {
838
- type: Boolean
839
- },
840
- size: {},
841
- effect: {},
842
- disabled: {
843
- type: Boolean,
844
- default: () => {
845
- }
846
- },
847
- clearable: {
848
- type: Boolean
849
- },
850
- filterable: {
851
- type: Boolean
852
- },
853
- allowCreate: {
854
- type: Boolean
855
- },
856
- loading: {
857
- type: Boolean
858
- },
859
- popperClass: {},
860
- popperStyle: {},
861
- popperOptions: {},
862
- remote: {
863
- type: Boolean
864
- },
865
- debounce: {},
866
- loadingText: {},
867
- noMatchText: {},
868
- noDataText: {},
869
- remoteMethod: {},
870
- filterMethod: {},
871
- multiple: {
872
- type: Boolean
873
- },
874
- multipleLimit: {},
875
- placeholder: {
876
- default: "请选择"
877
- },
878
- defaultFirstOption: {
879
- type: Boolean
880
- },
881
- reserveKeyword: {
882
- type: Boolean
883
- },
884
- valueKey: {},
885
- collapseTags: {
886
- type: Boolean
887
- },
888
- collapseTagsTooltip: {
889
- type: Boolean
890
- },
891
- maxCollapseTags: {},
892
- teleported: {
893
- type: Boolean
894
- },
895
- persistent: {
896
- type: Boolean
897
- },
898
- clearIcon: {},
899
- fitInputWidth: {
900
- type: Boolean
901
- },
902
- suffixIcon: {},
903
- tagType: {},
904
- tagEffect: {},
905
- validateEvent: {
906
- type: Boolean
907
- },
908
- remoteShowSuffix: {
909
- type: Boolean
910
- },
911
- showArrow: {
912
- type: Boolean
913
- },
914
- offset: {},
915
- placement: {},
916
- fallbackPlacements: {},
917
- tabindex: {},
918
- appendTo: {},
919
- options: {},
920
- props: {}
921
- }, {
922
- modelValue: {},
923
- modelModifiers: {}
924
- }),
925
- emits: /* @__PURE__ */ X(["blur", "change"], ["update:modelValue"]),
926
- setup(e, {
927
- emit: i
928
- }) {
929
- const a = i, o = E(e, "modelValue"), t = R([]), l = L(() => e.data, e.factory), n = x(() => [...L(t, e.factory).value, ...l.value]), r = (y) => {
930
- if (typeof y == "object") {
931
- if (e.identify)
932
- return e.identify(y);
933
- throw new Error("`identify` is required when value's type extends `object` or `object[]`");
934
- } else
935
- return y;
936
- }, c = (y) => n.value.map((V) => V.value).find((V) => r(V) === y);
937
- let d = 0;
938
- te([o, l], async () => {
939
- if (d++, o.value) {
940
- const y = [].concat(o.value).filter((J) => !l.value.map((Z) => r(Z.value)).includes(r(J))), V = d, k = await e.supplement?.(y);
941
- V === d && k && (t.value = k);
942
- } else
943
- t.value = [];
944
- }, {
945
- immediate: !0
946
- });
947
- const s = x(() => n.value.map((y) => {
948
- const V = r(y.value);
949
- return {
950
- ...y,
951
- key: V,
952
- value: V
953
- };
954
- })), u = x({
955
- get: () => o.value && (Array.isArray(o.value) ? o.value.map(r) : r(o.value)),
956
- set: (y) => {
957
- Array.isArray(y) ? o.value = y.map((V) => c(V)) : o.value = y === void 0 ? void 0 : c(y) || (e.allowCreate ? y : void 0);
958
- }
959
- }), w = f(S, void 0);
960
- if (w?.required) {
961
- const {
962
- validator: y,
963
- label: V
964
- } = w;
965
- w.validator = () => !o.value || Array.isArray(o.value) && o.value.length === 0 ? `请选择${V}` : y?.();
966
- }
967
- const P = f($, void 0), m = f(M, void 0), h = f(D, void 0);
968
- m?.on(([y, V]) => P === y && V === void 0 && (u.value = void 0)), h?.on(() => P && m?.trigger([P, u.value === void 0 ? void 0 : [].concat(u.value).map((y) => s.value.find((V) => V.value === y).label).join(",")]));
969
- const U = (y) => a("change", y), G = () => {
970
- w?.validate(), a("blur");
971
- };
972
- return (y, V) => (p(), g(B(Xe), C({
973
- allowCreate: e.allowCreate,
974
- clearable: e.clearable,
975
- filterable: e.filterable,
976
- remote: e.remote,
977
- remoteMethod: e.remoteMethod,
978
- placeholder: e.placeholder,
979
- disabled: e.disabled,
980
- size: e.size,
981
- loading: e.loading,
982
- multiple: e.multiple,
983
- collapseTags: e.collapseTags,
984
- collapseTagsTooltip: e.collapseTags
985
- }, {
986
- modelValue: u.value,
987
- "onUpdate:modelValue": V[0] || (V[0] = (k) => u.value = k),
988
- onBlur: G,
989
- onChange: U
990
- }), {
991
- default: v(() => [(p(!0), H(N, null, j(s.value, (k) => (p(), g(B(Te), {
992
- key: k.key,
993
- label: k.label,
994
- value: k.value
995
- }, {
996
- default: v(() => [F(ae(k.label), 1)]),
997
- _: 2
998
- }, 1032, ["label", "value"]))), 128))]),
999
- _: 1
1000
- }, 16, ["modelValue"]));
1001
- }
1002
- }), Je = /* @__PURE__ */ b({
1003
- __name: "XSpace",
1004
- props: {
1005
- direction: {},
1006
- class: {},
1007
- style: {},
1008
- alignment: {},
1009
- prefixCls: {},
1010
- spacer: {},
1011
- wrap: {
1012
- type: Boolean
1013
- },
1014
- fill: {
1015
- type: Boolean
1016
- },
1017
- fillRatio: {},
1018
- size: {}
1019
- },
1020
- setup(e) {
1021
- const i = e;
1022
- return (a, o) => (p(), g(B(Ce), A(O(i)), {
1023
- default: v(() => [T(a.$slots, "default")]),
1024
- _: 3
1025
- }, 16));
1026
- }
1027
- }), Ze = /* @__PURE__ */ b({
1028
- __name: "XTable",
1029
- props: {
1030
- data: {},
1031
- height: {},
1032
- columns: {},
1033
- showOverflowTooltip: {
1034
- type: Boolean
1035
- },
1036
- border: {
1037
- type: Boolean
1038
- },
1039
- highlightCurrentRow: {
1040
- type: Boolean
1041
- },
1042
- spanMethod: {
1043
- type: Function
1044
- }
1045
- },
1046
- emits: ["rowClick", "selectionChange", "headerDragend"],
1047
- setup(e, {
1048
- expose: i,
1049
- emit: a
1050
- }) {
1051
- const o = a, t = Q("container"), l = R(), n = $e(t), r = x(() => e.height ?? n.height.value), c = () => I(we, C({
1052
- ref: l
1053
- }, {
1054
- data: e.data,
1055
- height: r.value,
1056
- showOverflowTooltip: e.showOverflowTooltip,
1057
- border: e.border,
1058
- highlightCurrentRow: e.highlightCurrentRow,
1059
- spanMethod: e.spanMethod
1060
- }, {
1061
- "onRow-click": (d) => o("rowClick", d),
1062
- "onSelection-change": (d) => o("selectionChange", d),
1063
- "onHeader-dragend": (d, s, u) => o("headerDragend", d, s, u)
1064
- }), {
1065
- default: () => e.columns.map((d) => I(Ee, d, {
1066
- default: ({
1067
- $index: s,
1068
- row: u
1069
- }) => d.content?.({
1070
- index: s,
1071
- row: u
1072
- }),
1073
- header: () => d.header?.({
1074
- column: d
1075
- }) ?? d.label
1076
- }))
1077
- });
1078
- return i({
1079
- toggleRowSelection: (d, s, u) => l.value?.toggleRowSelection(d, s, u)
1080
- }), (d, s) => (p(), H("div", {
1081
- ref_key: "container",
1082
- ref: t,
1083
- class: le([e.height === void 0 && "h-full"])
1084
- }, [I(c)], 2));
1085
- }
1086
- }), _e = /* @__PURE__ */ b((e, {
1087
- slots: i
1088
- }) => {
1089
- const a = {
1090
- ...e
1091
- };
1092
- return f(W, void 0)?.push(a), z(Y, a), () => I(ke, e, {
1093
- ...i
1094
- });
1095
- }, {
1096
- props: ["label", "name", "closable", "lazy", "disabled"]
1097
- }), et = /* @__PURE__ */ b({
1098
- __name: "XTabs",
1099
- props: /* @__PURE__ */ X({
1100
- type: {},
1101
- defaultValue: {},
1102
- addable: {
1103
- type: Boolean,
1104
- default: () => {
1105
- }
1106
- },
1107
- editable: {
1108
- type: Boolean,
1109
- default: () => {
1110
- }
1111
- },
1112
- tabPosition: {}
1113
- }, {
1114
- modelValue: {},
1115
- modelModifiers: {}
1116
- }),
1117
- emits: /* @__PURE__ */ X(["tabChange", "tabRemove"], ["update:modelValue"]),
1118
- setup(e, {
1119
- emit: i
1120
- }) {
1121
- const a = i, o = E(e, "modelValue");
1122
- return z(W, []), (l, n) => (p(), g(B(xe), C({
1123
- addable: e.addable,
1124
- editable: e.editable,
1125
- type: e.type,
1126
- defaultValue: e.defaultValue,
1127
- tabPosition: e.tabPosition
1128
- }, {
1129
- modelValue: o.value,
1130
- "onUpdate:modelValue": n[0] || (n[0] = (r) => o.value = r),
1131
- onTabChange: n[1] || (n[1] = (r) => a("tabChange", r)),
1132
- onTabRemove: n[2] || (n[2] = (r) => a("tabRemove", r))
1133
- }), {
1134
- default: v(() => [T(l.$slots, "default")]),
1135
- _: 3
1136
- }, 16, ["modelValue"]));
1137
- }
1138
- }), tt = /* @__PURE__ */ b({
1139
- __name: "XTag",
1140
- props: {
1141
- type: {},
1142
- color: {},
1143
- closable: { type: Boolean, default: () => {
1144
- } },
1145
- round: { type: Boolean, default: () => {
1146
- } }
1147
- },
1148
- emits: ["close"],
1149
- setup(e) {
1150
- return (i, a) => (p(), g(B(Se), C({ type: e.type, color: e.color, closable: e.closable, round: e.round }, {
1151
- onClose: a[0] || (a[0] = (o) => i.$emit("close"))
1152
- }), {
1153
- default: v(() => [
1154
- T(i.$slots, "default")
1155
- ]),
1156
- _: 3
1157
- }, 16));
1158
- }
1159
- }), at = /* @__PURE__ */ b({
1160
- __name: "XText",
1161
- props: {
1162
- type: {},
1163
- size: {},
1164
- truncated: { type: Boolean, default: () => {
1165
- } }
1166
- },
1167
- setup(e) {
1168
- return (i, a) => (p(), g(B(Ie), A(O({ type: e.type, size: e.size, truncated: e.truncated })), {
1169
- default: v(() => [
1170
- T(i.$slots, "default")
1171
- ]),
1172
- _: 3
1173
- }, 16));
1174
- }
1175
- }), lt = /* @__PURE__ */ b({
1176
- __name: "XUpload",
1177
- props: /* @__PURE__ */ X({
1178
- action: {},
1179
- data: {},
1180
- disabled: {
1181
- type: Boolean,
1182
- default: void 0
1183
- },
1184
- limit: {},
1185
- multiple: {
1186
- type: Boolean
1187
- },
1188
- showFileList: {
1189
- type: Boolean,
1190
- default: !0
1191
- },
1192
- drag: {
1193
- type: Boolean
1194
- },
1195
- accept: {},
1196
- listType: {},
1197
- beforeUpload: {},
1198
- onSuccess: {},
1199
- onPreview: {}
1200
- }, {
1201
- modelValue: {},
1202
- modelModifiers: {}
1203
- }),
1204
- emits: ["update:modelValue"],
1205
- setup(e) {
1206
- const i = e, a = E(e, "modelValue"), o = x(() => [].concat(a.value ?? []).reverse().map((l) => ({
1207
- name: l.split("/").findLast(() => !0),
1208
- url: l,
1209
- uid: Number(l.slice(0, l.lastIndexOf("/")).split("/").findLast(() => !0))
1210
- }))), t = f(S, void 0);
1211
- if (t?.required) {
1212
- const {
1213
- validator: l,
1214
- label: n
1215
- } = t;
1216
- t.validator = () => !a.value || Array.isArray(a.value) && a.value.length === 0 ? `请上传${n}` : l?.();
1217
- }
1218
- return (l, n) => (p(), g(B(Pe), A(O({
1219
- ...i,
1220
- fileList: o.value
1221
- })), {
1222
- file: v(({
1223
- file: r
1224
- }) => [T(l.$slots, "file", {
1225
- file: r
1226
- })]),
1227
- tip: v(() => [T(l.$slots, "tip")]),
1228
- default: v(() => [T(l.$slots, "default")]),
1229
- _: 3
1230
- }, 16));
1231
- }
1232
- }), ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1233
- __proto__: null,
1234
- XButton: ze,
1235
- XCascader: Oe,
1236
- XCheckbox: Me,
1237
- XColorPicker: De,
1238
- XDatePicker: Re,
1239
- XDialog: Ue,
1240
- XDivider: Fe,
1241
- XForm: He,
1242
- XFormItem: Le,
1243
- XImage: Ne,
1244
- XInput: je,
1245
- XInputNumber: qe,
1246
- XPagination: Qe,
1247
- XRate: Ke,
1248
- XReconfirm: We,
1249
- XScrollbar: Ye,
1250
- XSelect: Ge,
1251
- XSpace: Je,
1252
- XTabPane: _e,
1253
- XTable: Ze,
1254
- XTabs: et,
1255
- XTag: tt,
1256
- XText: at,
1257
- XUpload: lt
1258
- }, Symbol.toStringTag, { value: "Module" })), dt = {
1259
- install(e) {
1260
- Object.entries(ot).forEach(([i, a]) => e.component(i, a));
1261
- }
1262
- };
1263
- export {
1264
- ze as XButton,
1265
- Oe as XCascader,
1266
- Me as XCheckbox,
1267
- De as XColorPicker,
1268
- Re as XDatePicker,
1269
- Ue as XDialog,
1270
- Fe as XDivider,
1271
- He as XForm,
1272
- Le as XFormItem,
1273
- Ne as XImage,
1274
- je as XInput,
1275
- qe as XInputNumber,
1276
- Qe as XPagination,
1277
- Ke as XRate,
1278
- We as XReconfirm,
1279
- Ye as XScrollbar,
1280
- Ge as XSelect,
1281
- Je as XSpace,
1282
- _e as XTabPane,
1283
- Ze as XTable,
1284
- et as XTabs,
1285
- tt as XTag,
1286
- at as XText,
1287
- lt as XUpload,
1288
- $ as X_FORM_ITEM_LABEL,
1289
- S as X_FORM_ITEM_VALIDATION,
1290
- Ae as X_FORM_TAB_UPDATE_HOOK,
1291
- K as X_FORM_VALIDATIONS,
1292
- D as X_TABLE_QUERY_EXECUTE_HOOK,
1293
- M as X_TABLE_QUERY_UPDATE_HOOK,
1294
- Y as X_TAB_PANE,
1295
- W as X_TAB_PANES,
1296
- dt as default
1297
- };