@pungfe/element 0.0.1-alpha.10 → 0.0.1-alpha.12
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.
- package/dist/basic/XDatePicker.vue.d.ts +26 -0
- package/dist/basic/XUpload.vue.d.ts +4 -10
- package/dist/components.d.ts +42 -0
- package/dist/{constants/index.d.ts → constants.d.ts} +2 -2
- package/dist/index.d.ts +6 -41
- package/dist/index.js +530 -377
- package/dist/resolver.d.ts +1 -0
- package/dist/resolver.js +29 -27
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as b, openBlock as
|
|
2
|
-
import { ElButton as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as b, openBlock as v, createBlock as g, unref as w, mergeProps as V, withCtx as B, renderSlot as S, useModel as C, inject as m, mergeModels as T, computed as x, toValue as F, onMounted as G, nextTick as ie, getCurrentScope as re, onScopeDispose as ue, getCurrentInstance as Y, shallowRef as Q, watch as _, createElementBlock as K, Fragment as J, renderList as Z, useSlots as de, createSlots as se, normalizeProps as $, guardReactiveProps as O, ref as H, provide as L, createVNode as z, resolveComponent as U, createTextVNode as j, useTemplateRef as ee, toDisplayString as ce, normalizeClass as fe } from "vue";
|
|
2
|
+
import { ElButton as me, ElCascader as pe, ElCheckboxGroup as ve, ElCheckbox as ye, ElColorPicker as be, ElDatePicker as ge, ElDialog as he, ElDivider as Be, ElForm as we, ElFormItem as Xe, ElMessage as te, ElImage as Te, ElInput as xe, ElPagination as Ve, ElRate as Ce, ElPopconfirm as Ee, ElScrollbar as Se, ElSpace as ke, ElTable as Ie, ElTableColumn as ze, ElTabPane as Pe, ElTag as Ae, ElText as $e, ElUpload as Oe } from "element-plus";
|
|
3
|
+
const Me = /* @__PURE__ */ b({
|
|
4
4
|
__name: "XButton",
|
|
5
5
|
props: {
|
|
6
6
|
size: {},
|
|
@@ -24,27 +24,27 @@ const Ke = /* @__PURE__ */ b({
|
|
|
24
24
|
},
|
|
25
25
|
emits: ["click"],
|
|
26
26
|
setup(e, { emit: t }) {
|
|
27
|
-
const
|
|
28
|
-
return (
|
|
29
|
-
onClick:
|
|
27
|
+
const a = e, n = t;
|
|
28
|
+
return (l, r) => (v(), g(w(me), V(a, {
|
|
29
|
+
onClick: r[0] || (r[0] = (i) => n("click", i))
|
|
30
30
|
}), {
|
|
31
|
-
default:
|
|
32
|
-
|
|
31
|
+
default: B(() => [
|
|
32
|
+
S(l.$slots, "default")
|
|
33
33
|
]),
|
|
34
34
|
_: 3
|
|
35
35
|
}, 16));
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), A = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL"), ae = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS"), k = /* @__PURE__ */ Symbol(
|
|
38
38
|
"X_FORM_ITEM_VALIDATION"
|
|
39
39
|
), Re = /* @__PURE__ */ Symbol(
|
|
40
40
|
"X_FORM_TAB_UPDATE_HOOK"
|
|
41
|
-
),
|
|
41
|
+
), De = /* @__PURE__ */ Symbol("X_TAB_PANES"), le = /* @__PURE__ */ Symbol("X_TAB_PANE"), M = /* @__PURE__ */ Symbol(
|
|
42
42
|
"X_TABLE_QUERY_UPDATE_HOOK"
|
|
43
|
-
),
|
|
43
|
+
), R = /* @__PURE__ */ Symbol(
|
|
44
44
|
"X_TABLE_QUERY_EXECUTE_HOOK"
|
|
45
|
-
),
|
|
45
|
+
), Fe = /* @__PURE__ */ b({
|
|
46
46
|
__name: "XCascader",
|
|
47
|
-
props: /* @__PURE__ */
|
|
47
|
+
props: /* @__PURE__ */ T({
|
|
48
48
|
clearable: {
|
|
49
49
|
type: Boolean
|
|
50
50
|
},
|
|
@@ -60,26 +60,26 @@ const Ke = /* @__PURE__ */ b({
|
|
|
60
60
|
modelValue: {},
|
|
61
61
|
modelModifiers: {}
|
|
62
62
|
}),
|
|
63
|
-
emits: /* @__PURE__ */
|
|
63
|
+
emits: /* @__PURE__ */ T(["blur", "change"], ["update:modelValue"]),
|
|
64
64
|
setup(e, {
|
|
65
65
|
emit: t
|
|
66
66
|
}) {
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
67
|
+
const a = e, n = t, l = C(e, "modelValue"), r = m(k, void 0);
|
|
68
|
+
if (r?.required) {
|
|
69
69
|
const {
|
|
70
70
|
validator: c,
|
|
71
|
-
label:
|
|
72
|
-
} =
|
|
73
|
-
|
|
71
|
+
label: u
|
|
72
|
+
} = r;
|
|
73
|
+
r.validator = () => l.value ? c?.() : `请输入${u}`;
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
|
|
75
|
+
const i = m(A, void 0), o = m(M, void 0), d = m(R, void 0);
|
|
76
|
+
o?.on(([c, u]) => i === c && u === void 0 && (l.value = void 0)), d?.on(() => i && o?.trigger([i, l.value]));
|
|
77
77
|
const s = () => {
|
|
78
|
-
|
|
78
|
+
r?.validate(), n("blur");
|
|
79
79
|
};
|
|
80
|
-
return (c,
|
|
81
|
-
modelValue:
|
|
82
|
-
"onUpdate:modelValue":
|
|
80
|
+
return (c, u) => (v(), g(w(pe), V(a, {
|
|
81
|
+
modelValue: l.value,
|
|
82
|
+
"onUpdate:modelValue": u[0] || (u[0] = (X) => l.value = X),
|
|
83
83
|
onBlur: s
|
|
84
84
|
}), null, 16, ["modelValue"]));
|
|
85
85
|
}
|
|
@@ -89,101 +89,101 @@ function Le(e, t) {
|
|
|
89
89
|
}
|
|
90
90
|
const Ue = typeof window < "u" && typeof document < "u";
|
|
91
91
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
92
|
-
function
|
|
92
|
+
function He(e) {
|
|
93
93
|
return Array.isArray(e) ? e : [e];
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
95
|
+
function Ne(e) {
|
|
96
|
+
return Y();
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
98
|
+
function qe(e, t = !0, a) {
|
|
99
|
+
Ne() ? G(e, a) : t ? e() : ie(e);
|
|
100
100
|
}
|
|
101
101
|
// @__NO_SIDE_EFFECTS__
|
|
102
|
-
function
|
|
103
|
-
return
|
|
102
|
+
function W(e, t) {
|
|
103
|
+
return x(() => F(e).map((a) => F(a)).map(t));
|
|
104
104
|
}
|
|
105
105
|
const oe = Ue ? window : void 0;
|
|
106
|
-
function
|
|
106
|
+
function P(e) {
|
|
107
107
|
var t;
|
|
108
|
-
const
|
|
109
|
-
return (t =
|
|
108
|
+
const a = F(e);
|
|
109
|
+
return (t = a?.$el) !== null && t !== void 0 ? t : a;
|
|
110
110
|
}
|
|
111
111
|
// @__NO_SIDE_EFFECTS__
|
|
112
|
-
function
|
|
113
|
-
const e =
|
|
114
|
-
return t &&
|
|
112
|
+
function Qe() {
|
|
113
|
+
const e = Q(!1), t = Y();
|
|
114
|
+
return t && G(() => {
|
|
115
115
|
e.value = !0;
|
|
116
116
|
}, t), e;
|
|
117
117
|
}
|
|
118
118
|
// @__NO_SIDE_EFFECTS__
|
|
119
|
-
function
|
|
120
|
-
const t = /* @__PURE__ */
|
|
121
|
-
return
|
|
119
|
+
function je(e) {
|
|
120
|
+
const t = /* @__PURE__ */ Qe();
|
|
121
|
+
return x(() => (t.value, !!e()));
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
const { window: n = oe, ...
|
|
125
|
-
let
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
const c =
|
|
130
|
-
return Array.isArray(c) ? c.map((
|
|
123
|
+
function We(e, t, a = {}) {
|
|
124
|
+
const { window: n = oe, ...l } = a;
|
|
125
|
+
let r;
|
|
126
|
+
const i = /* @__PURE__ */ je(() => n && "ResizeObserver" in n), o = () => {
|
|
127
|
+
r && (r.disconnect(), r = void 0);
|
|
128
|
+
}, d = _(x(() => {
|
|
129
|
+
const c = F(e);
|
|
130
|
+
return Array.isArray(c) ? c.map((u) => P(u)) : [P(c)];
|
|
131
131
|
}), (c) => {
|
|
132
|
-
if (
|
|
133
|
-
|
|
134
|
-
for (const
|
|
132
|
+
if (o(), i.value && n) {
|
|
133
|
+
r = new ResizeObserver(t);
|
|
134
|
+
for (const u of c) u && r.observe(u, l);
|
|
135
135
|
}
|
|
136
136
|
}, {
|
|
137
137
|
immediate: !0,
|
|
138
138
|
flush: "post"
|
|
139
139
|
}), s = () => {
|
|
140
|
-
|
|
140
|
+
o(), d();
|
|
141
141
|
};
|
|
142
142
|
return Le(s), {
|
|
143
|
-
isSupported:
|
|
143
|
+
isSupported: i,
|
|
144
144
|
stop: s
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function _e(e, t = {
|
|
148
148
|
width: 0,
|
|
149
149
|
height: 0
|
|
150
|
-
},
|
|
151
|
-
const { window: n = oe, box:
|
|
152
|
-
var
|
|
153
|
-
return (
|
|
154
|
-
}),
|
|
155
|
-
const
|
|
156
|
-
if (n &&
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
159
|
-
const
|
|
160
|
-
|
|
150
|
+
}, a = {}) {
|
|
151
|
+
const { window: n = oe, box: l = "content-box" } = a, r = x(() => {
|
|
152
|
+
var u;
|
|
153
|
+
return (u = P(e)) === null || u === void 0 || (u = u.namespaceURI) === null || u === void 0 ? void 0 : u.includes("svg");
|
|
154
|
+
}), i = Q(t.width), o = Q(t.height), { stop: d } = We(e, ([u]) => {
|
|
155
|
+
const X = l === "border-box" ? u.borderBoxSize : l === "content-box" ? u.contentBoxSize : u.devicePixelContentBoxSize;
|
|
156
|
+
if (n && r.value) {
|
|
157
|
+
const E = P(e);
|
|
158
|
+
if (E) {
|
|
159
|
+
const f = E.getBoundingClientRect();
|
|
160
|
+
i.value = f.width, o.value = f.height;
|
|
161
161
|
}
|
|
162
|
-
} else if (
|
|
163
|
-
const
|
|
164
|
-
|
|
162
|
+
} else if (X) {
|
|
163
|
+
const E = He(X);
|
|
164
|
+
i.value = E.reduce((f, { inlineSize: y }) => f + y, 0), o.value = E.reduce((f, { blockSize: y }) => f + y, 0);
|
|
165
165
|
} else
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
|
|
166
|
+
i.value = u.contentRect.width, o.value = u.contentRect.height;
|
|
167
|
+
}, a);
|
|
168
|
+
qe(() => {
|
|
169
|
+
const u = P(e);
|
|
170
|
+
u && (i.value = "offsetWidth" in u ? u.offsetWidth : t.width, o.value = "offsetHeight" in u ? u.offsetHeight : t.height);
|
|
171
171
|
});
|
|
172
|
-
const s =
|
|
173
|
-
|
|
172
|
+
const s = _(() => P(e), (u) => {
|
|
173
|
+
i.value = u ? t.width : 0, o.value = u ? t.height : 0;
|
|
174
174
|
});
|
|
175
175
|
function c() {
|
|
176
|
-
|
|
176
|
+
d(), s();
|
|
177
177
|
}
|
|
178
178
|
return {
|
|
179
|
-
width:
|
|
180
|
-
height:
|
|
179
|
+
width: i,
|
|
180
|
+
height: o,
|
|
181
181
|
stop: c
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Ke = /* @__PURE__ */ b({
|
|
185
185
|
__name: "XCheckbox",
|
|
186
|
-
props: /* @__PURE__ */
|
|
186
|
+
props: /* @__PURE__ */ T({
|
|
187
187
|
data: {},
|
|
188
188
|
factory: {
|
|
189
189
|
type: Function
|
|
@@ -224,50 +224,50 @@ const Ye = /* @__PURE__ */ b({
|
|
|
224
224
|
}),
|
|
225
225
|
emits: ["update:modelValue"],
|
|
226
226
|
setup(e) {
|
|
227
|
-
const t =
|
|
227
|
+
const t = C(e, "modelValue"), a = /* @__PURE__ */ W(() => e.data, e.factory), n = x(() => [...a.value]), l = (s) => {
|
|
228
228
|
if (typeof s == "object") {
|
|
229
229
|
if (e.identify)
|
|
230
230
|
return e.identify(s);
|
|
231
231
|
throw new Error("`identify` is required when value's type extends `object` or `object[]`");
|
|
232
232
|
} else
|
|
233
233
|
return s;
|
|
234
|
-
},
|
|
235
|
-
const c =
|
|
234
|
+
}, r = (s) => n.value.map((c) => c.value).find((c) => l(c) === s), i = x(() => n.value.map((s) => {
|
|
235
|
+
const c = l(s.value);
|
|
236
236
|
return {
|
|
237
237
|
...s,
|
|
238
238
|
key: c,
|
|
239
239
|
value: c
|
|
240
240
|
};
|
|
241
|
-
})),
|
|
242
|
-
get: () => t.value && t.value.map(
|
|
243
|
-
set: (s) => t.value = Array.isArray(s) ? s.map((c) =>
|
|
244
|
-
}),
|
|
245
|
-
if (
|
|
241
|
+
})), o = x({
|
|
242
|
+
get: () => t.value && t.value.map(l),
|
|
243
|
+
set: (s) => t.value = Array.isArray(s) ? s.map((c) => r(c)) : []
|
|
244
|
+
}), d = m(k, void 0);
|
|
245
|
+
if (d?.required) {
|
|
246
246
|
const {
|
|
247
247
|
validator: s,
|
|
248
248
|
label: c
|
|
249
|
-
} =
|
|
250
|
-
|
|
249
|
+
} = d;
|
|
250
|
+
d.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请选择${c}` : s?.();
|
|
251
251
|
}
|
|
252
|
-
return (s, c) => (
|
|
253
|
-
modelValue:
|
|
254
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
252
|
+
return (s, c) => (v(), g(w(ve), V({
|
|
253
|
+
modelValue: o.value,
|
|
254
|
+
"onUpdate:modelValue": c[0] || (c[0] = (u) => o.value = u)
|
|
255
255
|
}, {
|
|
256
256
|
disabled: e.disabled,
|
|
257
257
|
size: e.size
|
|
258
258
|
}), {
|
|
259
|
-
default:
|
|
260
|
-
key:
|
|
261
|
-
disabled:
|
|
262
|
-
label:
|
|
263
|
-
value:
|
|
259
|
+
default: B(() => [(v(!0), K(J, null, Z(i.value, (u) => (v(), g(w(ye), {
|
|
260
|
+
key: u.key,
|
|
261
|
+
disabled: u.disabled,
|
|
262
|
+
label: u.label,
|
|
263
|
+
value: u.value
|
|
264
264
|
}, null, 8, ["disabled", "label", "value"]))), 128))]),
|
|
265
265
|
_: 1
|
|
266
266
|
}, 16, ["modelValue"]));
|
|
267
267
|
}
|
|
268
|
-
}),
|
|
268
|
+
}), Ge = /* @__PURE__ */ b({
|
|
269
269
|
__name: "XColorPicker",
|
|
270
|
-
props: /* @__PURE__ */
|
|
270
|
+
props: /* @__PURE__ */ T({
|
|
271
271
|
clearable: {
|
|
272
272
|
type: Boolean
|
|
273
273
|
},
|
|
@@ -281,23 +281,187 @@ const Ye = /* @__PURE__ */ b({
|
|
|
281
281
|
}),
|
|
282
282
|
emits: ["update:modelValue"],
|
|
283
283
|
setup(e) {
|
|
284
|
-
const t = e,
|
|
284
|
+
const t = e, a = C(e, "modelValue"), n = m(k, void 0);
|
|
285
285
|
if (n?.required) {
|
|
286
286
|
const {
|
|
287
|
-
validator:
|
|
288
|
-
label:
|
|
287
|
+
validator: o,
|
|
288
|
+
label: d
|
|
289
289
|
} = n;
|
|
290
|
-
n.validator = () =>
|
|
290
|
+
n.validator = () => a.value ? o?.() : `请输入${d}`;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
return
|
|
294
|
-
modelValue:
|
|
295
|
-
"onUpdate:modelValue":
|
|
292
|
+
const l = m(A, void 0), r = m(M, void 0), i = m(R, void 0);
|
|
293
|
+
return r?.on(([o, d]) => l === o && d === void 0 && (a.value = void 0)), i?.on(() => l && r?.trigger([l, a.value])), (o, d) => (v(), g(w(be), V(t, {
|
|
294
|
+
modelValue: a.value,
|
|
295
|
+
"onUpdate:modelValue": d[0] || (d[0] = (s) => a.value = s)
|
|
296
296
|
}), null, 16, ["modelValue"]));
|
|
297
297
|
}
|
|
298
|
-
}),
|
|
298
|
+
}), Ye = /* @__PURE__ */ b({
|
|
299
|
+
__name: "XDatePicker",
|
|
300
|
+
props: /* @__PURE__ */ T({
|
|
301
|
+
type: {
|
|
302
|
+
default: "date"
|
|
303
|
+
},
|
|
304
|
+
showNow: {
|
|
305
|
+
type: Boolean
|
|
306
|
+
},
|
|
307
|
+
showConfirm: {
|
|
308
|
+
type: Boolean
|
|
309
|
+
},
|
|
310
|
+
showFooter: {
|
|
311
|
+
type: Boolean
|
|
312
|
+
},
|
|
313
|
+
showWeekNumber: {
|
|
314
|
+
type: Boolean
|
|
315
|
+
},
|
|
316
|
+
ariaLabel: {},
|
|
317
|
+
emptyValues: {},
|
|
318
|
+
valueOnClear: {},
|
|
319
|
+
disabledDate: {},
|
|
320
|
+
cellClassName: {},
|
|
321
|
+
shortcuts: {},
|
|
322
|
+
arrowControl: {
|
|
323
|
+
type: Boolean
|
|
324
|
+
},
|
|
325
|
+
tabindex: {},
|
|
326
|
+
validateEvent: {
|
|
327
|
+
type: Boolean
|
|
328
|
+
},
|
|
329
|
+
unlinkPanels: {
|
|
330
|
+
type: Boolean
|
|
331
|
+
},
|
|
332
|
+
placement: {},
|
|
333
|
+
fallbackPlacements: {},
|
|
334
|
+
disabledHours: {},
|
|
335
|
+
disabledMinutes: {},
|
|
336
|
+
disabledSeconds: {},
|
|
337
|
+
automaticDropdown: {
|
|
338
|
+
type: Boolean
|
|
339
|
+
},
|
|
340
|
+
id: {},
|
|
341
|
+
name: {},
|
|
342
|
+
popperClass: {},
|
|
343
|
+
popperStyle: {},
|
|
344
|
+
format: {},
|
|
345
|
+
valueFormat: {},
|
|
346
|
+
dateFormat: {},
|
|
347
|
+
timeFormat: {},
|
|
348
|
+
clearable: {
|
|
349
|
+
type: Boolean
|
|
350
|
+
},
|
|
351
|
+
clearIcon: {},
|
|
352
|
+
editable: {
|
|
353
|
+
type: Boolean
|
|
354
|
+
},
|
|
355
|
+
prefixIcon: {},
|
|
356
|
+
size: {},
|
|
357
|
+
readonly: {
|
|
358
|
+
type: Boolean
|
|
359
|
+
},
|
|
360
|
+
disabled: {
|
|
361
|
+
type: Boolean
|
|
362
|
+
},
|
|
363
|
+
placeholder: {
|
|
364
|
+
default: "请选择"
|
|
365
|
+
},
|
|
366
|
+
popperOptions: {},
|
|
367
|
+
modelValue: {},
|
|
368
|
+
rangeSeparator: {},
|
|
369
|
+
startPlaceholder: {
|
|
370
|
+
default: "开始日期"
|
|
371
|
+
},
|
|
372
|
+
endPlaceholder: {
|
|
373
|
+
default: "结束日期"
|
|
374
|
+
},
|
|
375
|
+
defaultValue: {},
|
|
376
|
+
defaultTime: {},
|
|
377
|
+
isRange: {
|
|
378
|
+
type: Boolean
|
|
379
|
+
}
|
|
380
|
+
}, {
|
|
381
|
+
modelValue: {},
|
|
382
|
+
modelModifiers: {},
|
|
383
|
+
start: {},
|
|
384
|
+
startModifiers: {},
|
|
385
|
+
end: {},
|
|
386
|
+
endModifiers: {}
|
|
387
|
+
}),
|
|
388
|
+
emits: /* @__PURE__ */ T(["blur", "change"], ["update:modelValue", "update:start", "update:end"]),
|
|
389
|
+
setup(e, {
|
|
390
|
+
emit: t
|
|
391
|
+
}) {
|
|
392
|
+
const a = t, n = C(e, "modelValue"), l = C(e, "start"), r = C(e, "end"), i = x({
|
|
393
|
+
get: () => {
|
|
394
|
+
if (e.type.includes("range") && l.value && r.value)
|
|
395
|
+
return [l.value, r.value];
|
|
396
|
+
if (!e.type.includes("range"))
|
|
397
|
+
return n.value;
|
|
398
|
+
},
|
|
399
|
+
set: (f) => {
|
|
400
|
+
e.type.includes("range") ? (l.value = f?.[0], r.value = f?.[1]) : n.value = f;
|
|
401
|
+
}
|
|
402
|
+
}), o = x(() => e.type.includes("range") ? [{
|
|
403
|
+
text: "最近一周",
|
|
404
|
+
value: () => {
|
|
405
|
+
const f = /* @__PURE__ */ new Date(), y = /* @__PURE__ */ new Date();
|
|
406
|
+
return y.setTime(y.getTime() - 3600 * 1e3 * 24 * 7), [y, f];
|
|
407
|
+
}
|
|
408
|
+
}, {
|
|
409
|
+
text: "最近一月",
|
|
410
|
+
value: () => {
|
|
411
|
+
const f = /* @__PURE__ */ new Date(), y = /* @__PURE__ */ new Date();
|
|
412
|
+
return y.setTime(y.getTime() - 3600 * 1e3 * 24 * 30), [y, f];
|
|
413
|
+
}
|
|
414
|
+
}, {
|
|
415
|
+
text: "最近三月",
|
|
416
|
+
value: () => {
|
|
417
|
+
const f = /* @__PURE__ */ new Date(), y = /* @__PURE__ */ new Date();
|
|
418
|
+
return y.setTime(y.getTime() - 3600 * 1e3 * 24 * 90), [y, f];
|
|
419
|
+
}
|
|
420
|
+
}] : [{
|
|
421
|
+
text: "昨天",
|
|
422
|
+
value: /* @__PURE__ */ new Date()
|
|
423
|
+
}, {
|
|
424
|
+
text: "一周前",
|
|
425
|
+
value: () => {
|
|
426
|
+
const f = /* @__PURE__ */ new Date();
|
|
427
|
+
return f.setTime(f.getTime() - 3600 * 1e3 * 24 * 7), f;
|
|
428
|
+
}
|
|
429
|
+
}, {
|
|
430
|
+
text: "一月前",
|
|
431
|
+
value: () => {
|
|
432
|
+
const f = /* @__PURE__ */ new Date();
|
|
433
|
+
return f.setTime(f.getTime() - 3600 * 1e3 * 24 * 30), f;
|
|
434
|
+
}
|
|
435
|
+
}]), d = m(k, void 0);
|
|
436
|
+
if (d?.required) {
|
|
437
|
+
const {
|
|
438
|
+
validator: f,
|
|
439
|
+
label: y
|
|
440
|
+
} = d;
|
|
441
|
+
d.validator = () => !i.value || e.type.includes("range") && !i.value?.length ? `请选择${y}` : f?.();
|
|
442
|
+
}
|
|
443
|
+
const s = m(A, void 0), c = m(M, void 0), u = m(R, void 0);
|
|
444
|
+
c?.on(([f, y]) => s === f && y === void 0 && (i.value = void 0)), u?.on(() => s && c?.trigger([s, i.value === void 0 ? void 0 : Array.isArray(i.value) ? `${i.value[0]} 至 ${i.value[1]}` : i.value]));
|
|
445
|
+
const X = (f) => a("change", f), E = () => {
|
|
446
|
+
d?.validate?.(), a("blur");
|
|
447
|
+
};
|
|
448
|
+
return (f, y) => (v(), g(w(ge), V({
|
|
449
|
+
type: e.type,
|
|
450
|
+
placeholder: e.placeholder,
|
|
451
|
+
startPlaceholder: e.startPlaceholder,
|
|
452
|
+
endPlaceholder: e.endPlaceholder,
|
|
453
|
+
shortcuts: o.value,
|
|
454
|
+
valueFormat: e.valueFormat
|
|
455
|
+
}, {
|
|
456
|
+
modelValue: i.value,
|
|
457
|
+
"onUpdate:modelValue": y[0] || (y[0] = (N) => i.value = N),
|
|
458
|
+
onBlur: E,
|
|
459
|
+
onChange: X
|
|
460
|
+
}), null, 16, ["modelValue"]));
|
|
461
|
+
}
|
|
462
|
+
}), Je = /* @__PURE__ */ b({
|
|
299
463
|
__name: "XDialog",
|
|
300
|
-
props: /* @__PURE__ */
|
|
464
|
+
props: /* @__PURE__ */ T({
|
|
301
465
|
title: {},
|
|
302
466
|
bodyClass: {}
|
|
303
467
|
}, {
|
|
@@ -310,27 +474,27 @@ const Ye = /* @__PURE__ */ b({
|
|
|
310
474
|
setup(e) {
|
|
311
475
|
const {
|
|
312
476
|
header: t,
|
|
313
|
-
footer:
|
|
314
|
-
} =
|
|
315
|
-
return (
|
|
477
|
+
footer: a
|
|
478
|
+
} = de(), n = C(e, "modelValue");
|
|
479
|
+
return (l, r) => (v(), g(w(he), {
|
|
316
480
|
modelValue: n.value,
|
|
317
|
-
"onUpdate:modelValue":
|
|
481
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => n.value = i),
|
|
318
482
|
title: e.title,
|
|
319
483
|
"body-class": `flex flex-col ${e.bodyClass}`
|
|
320
|
-
},
|
|
321
|
-
default:
|
|
484
|
+
}, se({
|
|
485
|
+
default: B(() => [S(l.$slots, "default")]),
|
|
322
486
|
_: 2
|
|
323
487
|
}, [t ? {
|
|
324
488
|
name: "header",
|
|
325
|
-
fn:
|
|
489
|
+
fn: B(() => [S(l.$slots, "header")]),
|
|
326
490
|
key: "0"
|
|
327
|
-
} : void 0,
|
|
491
|
+
} : void 0, a ? {
|
|
328
492
|
name: "footer",
|
|
329
|
-
fn:
|
|
493
|
+
fn: B(() => [S(l.$slots, "footer")]),
|
|
330
494
|
key: "1"
|
|
331
495
|
} : void 0]), 1032, ["modelValue", "title", "body-class"]));
|
|
332
496
|
}
|
|
333
|
-
}),
|
|
497
|
+
}), Ze = /* @__PURE__ */ b({
|
|
334
498
|
__name: "XDivider",
|
|
335
499
|
props: {
|
|
336
500
|
direction: {},
|
|
@@ -339,46 +503,46 @@ const Ye = /* @__PURE__ */ b({
|
|
|
339
503
|
},
|
|
340
504
|
setup(e) {
|
|
341
505
|
const t = e;
|
|
342
|
-
return (
|
|
343
|
-
default:
|
|
344
|
-
|
|
506
|
+
return (a, n) => (v(), g(w(Be), $(O(t)), {
|
|
507
|
+
default: B(() => [
|
|
508
|
+
S(a.$slots, "default")
|
|
345
509
|
]),
|
|
346
510
|
_: 3
|
|
347
511
|
}, 16));
|
|
348
512
|
}
|
|
349
|
-
}),
|
|
513
|
+
}), et = /* @__PURE__ */ b((e, {
|
|
350
514
|
expose: t
|
|
351
515
|
}) => {
|
|
352
|
-
const
|
|
516
|
+
const a = m(le, void 0), n = m(Re, void 0), l = H(), r = {
|
|
353
517
|
label: e.label,
|
|
354
518
|
required: e.required,
|
|
355
519
|
clearValidate() {
|
|
356
|
-
|
|
520
|
+
l.value = void 0;
|
|
357
521
|
},
|
|
358
522
|
validate() {
|
|
359
|
-
return
|
|
523
|
+
return l.value = r.validator?.() ?? void 0, l.value && a?.name && (te({
|
|
360
524
|
plain: !0,
|
|
361
525
|
type: "warning",
|
|
362
|
-
message:
|
|
363
|
-
}), n?.trigger(
|
|
526
|
+
message: l.value
|
|
527
|
+
}), n?.trigger(a.name)), !l.value;
|
|
364
528
|
}
|
|
365
529
|
};
|
|
366
|
-
return
|
|
367
|
-
...
|
|
368
|
-
}),
|
|
530
|
+
return m(ae, void 0)?.push(r), L(k, r), t({
|
|
531
|
+
...r
|
|
532
|
+
}), L(A, e.label), () => z(Xe, V({
|
|
369
533
|
label: e.label,
|
|
370
534
|
labelPosition: e.labelPosition,
|
|
371
535
|
labelWidth: e.labelWidth,
|
|
372
536
|
required: e.required
|
|
373
537
|
}, {
|
|
374
|
-
error:
|
|
538
|
+
error: l.value
|
|
375
539
|
}), {
|
|
376
540
|
label: () => e.label,
|
|
377
541
|
default: () => e.content?.()
|
|
378
542
|
});
|
|
379
543
|
}, {
|
|
380
544
|
props: ["label", "required", "content", "tooltip"]
|
|
381
|
-
}),
|
|
545
|
+
}), tt = /* @__PURE__ */ b({
|
|
382
546
|
__name: "XForm",
|
|
383
547
|
props: {
|
|
384
548
|
content: {
|
|
@@ -404,22 +568,22 @@ const Ye = /* @__PURE__ */ b({
|
|
|
404
568
|
setup(e, {
|
|
405
569
|
expose: t
|
|
406
570
|
}) {
|
|
407
|
-
const
|
|
408
|
-
|
|
409
|
-
const
|
|
410
|
-
|
|
571
|
+
const a = H(), n = [];
|
|
572
|
+
L(ae, n);
|
|
573
|
+
const l = () => n.every((o) => o.validate()), r = () => {
|
|
574
|
+
a.value?.resetFields(), n.forEach((o) => o.clearValidate());
|
|
411
575
|
};
|
|
412
576
|
t({
|
|
413
577
|
data: e.data,
|
|
414
|
-
validate:
|
|
415
|
-
resetFields:
|
|
578
|
+
validate: l,
|
|
579
|
+
resetFields: r
|
|
416
580
|
});
|
|
417
|
-
const
|
|
581
|
+
const i = () => e.content?.({
|
|
418
582
|
data: e.data
|
|
419
583
|
});
|
|
420
|
-
return (
|
|
584
|
+
return (o, d) => (v(), g(w(we), V({
|
|
421
585
|
ref_key: "form",
|
|
422
|
-
ref:
|
|
586
|
+
ref: a
|
|
423
587
|
}, {
|
|
424
588
|
inline: e.inline,
|
|
425
589
|
disabled: e.disabled,
|
|
@@ -428,11 +592,11 @@ const Ye = /* @__PURE__ */ b({
|
|
|
428
592
|
labelPosition: e.labelPosition,
|
|
429
593
|
statusIcon: e.statusIcon
|
|
430
594
|
}), {
|
|
431
|
-
default:
|
|
595
|
+
default: B(() => [z(i)]),
|
|
432
596
|
_: 1
|
|
433
597
|
}, 16));
|
|
434
598
|
}
|
|
435
|
-
}),
|
|
599
|
+
}), at = /* @__PURE__ */ b({
|
|
436
600
|
__name: "XImage",
|
|
437
601
|
props: {
|
|
438
602
|
hideOnClickModal: { type: Boolean },
|
|
@@ -456,11 +620,11 @@ const Ye = /* @__PURE__ */ b({
|
|
|
456
620
|
},
|
|
457
621
|
setup(e) {
|
|
458
622
|
const t = e;
|
|
459
|
-
return (
|
|
623
|
+
return (a, n) => (v(), g(w(Te), $(O(t)), null, 16));
|
|
460
624
|
}
|
|
461
|
-
}),
|
|
625
|
+
}), lt = /* @__PURE__ */ b({
|
|
462
626
|
__name: "XInput",
|
|
463
|
-
props: /* @__PURE__ */
|
|
627
|
+
props: /* @__PURE__ */ T({
|
|
464
628
|
clearable: {
|
|
465
629
|
type: Boolean
|
|
466
630
|
},
|
|
@@ -481,33 +645,33 @@ const Ye = /* @__PURE__ */ b({
|
|
|
481
645
|
modelValue: {},
|
|
482
646
|
modelModifiers: {}
|
|
483
647
|
}),
|
|
484
|
-
emits: /* @__PURE__ */
|
|
648
|
+
emits: /* @__PURE__ */ T(["blur", "change"], ["update:modelValue"]),
|
|
485
649
|
setup(e, {
|
|
486
650
|
emit: t
|
|
487
651
|
}) {
|
|
488
|
-
const
|
|
489
|
-
if (
|
|
652
|
+
const a = e, n = t, l = C(e, "modelValue"), r = m(k, void 0);
|
|
653
|
+
if (r?.required) {
|
|
490
654
|
const {
|
|
491
|
-
validator:
|
|
492
|
-
label:
|
|
493
|
-
} =
|
|
494
|
-
|
|
655
|
+
validator: u,
|
|
656
|
+
label: X
|
|
657
|
+
} = r;
|
|
658
|
+
r.validator = () => l.value ? u?.() : `请输入${X}`;
|
|
495
659
|
}
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
const s = (
|
|
499
|
-
|
|
660
|
+
const i = m(A, void 0), o = m(M, void 0), d = m(R, void 0);
|
|
661
|
+
o?.on(([u, X]) => i === u && X === void 0 && (l.value = void 0)), d?.on(() => i && o?.trigger([i, l.value]));
|
|
662
|
+
const s = (u) => n("change", u), c = () => {
|
|
663
|
+
r?.validate(), n("blur");
|
|
500
664
|
};
|
|
501
|
-
return (
|
|
502
|
-
modelValue:
|
|
503
|
-
"onUpdate:modelValue":
|
|
665
|
+
return (u, X) => (v(), g(w(xe), V(a, {
|
|
666
|
+
modelValue: l.value,
|
|
667
|
+
"onUpdate:modelValue": X[0] || (X[0] = (E) => l.value = E),
|
|
504
668
|
onBlur: c,
|
|
505
669
|
onChange: s
|
|
506
670
|
}), null, 16, ["modelValue"]));
|
|
507
671
|
}
|
|
508
|
-
}),
|
|
672
|
+
}), ot = /* @__PURE__ */ b({
|
|
509
673
|
__name: "XInputNumber",
|
|
510
|
-
props: /* @__PURE__ */
|
|
674
|
+
props: /* @__PURE__ */ T({
|
|
511
675
|
placeholder: {
|
|
512
676
|
default: "请输入"
|
|
513
677
|
},
|
|
@@ -533,33 +697,33 @@ const Ye = /* @__PURE__ */ b({
|
|
|
533
697
|
modelValue: {},
|
|
534
698
|
modelModifiers: {}
|
|
535
699
|
}),
|
|
536
|
-
emits: /* @__PURE__ */
|
|
700
|
+
emits: /* @__PURE__ */ T(["blur"], ["update:modelValue"]),
|
|
537
701
|
setup(e, {
|
|
538
702
|
emit: t
|
|
539
703
|
}) {
|
|
540
|
-
const
|
|
541
|
-
if (
|
|
704
|
+
const a = e, n = t, l = C(e, "modelValue"), r = m(k, void 0);
|
|
705
|
+
if (r?.required) {
|
|
542
706
|
const {
|
|
543
|
-
validator:
|
|
544
|
-
label:
|
|
545
|
-
} =
|
|
546
|
-
|
|
707
|
+
validator: o,
|
|
708
|
+
label: d
|
|
709
|
+
} = r;
|
|
710
|
+
r.validator = () => l.value === void 0 ? `请输入${d}` : o?.();
|
|
547
711
|
}
|
|
548
|
-
const
|
|
549
|
-
|
|
712
|
+
const i = () => {
|
|
713
|
+
r?.validate(), n("blur");
|
|
550
714
|
};
|
|
551
|
-
return (
|
|
715
|
+
return (o, d) => {
|
|
552
716
|
const s = U("ElInputNumber");
|
|
553
|
-
return
|
|
554
|
-
modelValue:
|
|
555
|
-
"onUpdate:modelValue":
|
|
556
|
-
onBlur:
|
|
717
|
+
return v(), g(s, V(a, {
|
|
718
|
+
modelValue: l.value,
|
|
719
|
+
"onUpdate:modelValue": d[0] || (d[0] = (c) => l.value = c),
|
|
720
|
+
onBlur: i
|
|
557
721
|
}), null, 16, ["modelValue"]);
|
|
558
722
|
};
|
|
559
723
|
}
|
|
560
|
-
}),
|
|
724
|
+
}), nt = /* @__PURE__ */ b({
|
|
561
725
|
__name: "XPagination",
|
|
562
|
-
props: /* @__PURE__ */
|
|
726
|
+
props: /* @__PURE__ */ T({
|
|
563
727
|
sizes: { default: () => [20, 50, 100] },
|
|
564
728
|
pageSize: {},
|
|
565
729
|
defaultPageSize: {},
|
|
@@ -588,21 +752,21 @@ const Ye = /* @__PURE__ */ b({
|
|
|
588
752
|
current: {},
|
|
589
753
|
currentModifiers: {}
|
|
590
754
|
}),
|
|
591
|
-
emits: /* @__PURE__ */
|
|
755
|
+
emits: /* @__PURE__ */ T(["sizeChange", "currentChange"], ["update:size", "update:current"]),
|
|
592
756
|
setup(e, { emit: t }) {
|
|
593
|
-
const
|
|
594
|
-
return (
|
|
595
|
-
"current-page":
|
|
596
|
-
"onUpdate:currentPage":
|
|
757
|
+
const a = t, n = C(e, "size"), l = C(e, "current");
|
|
758
|
+
return (r, i) => (v(), g(w(Ve), V({ background: e.background, pageSizes: e.sizes, layout: e.layout, total: e.total }, {
|
|
759
|
+
"current-page": l.value,
|
|
760
|
+
"onUpdate:currentPage": i[0] || (i[0] = (o) => l.value = o),
|
|
597
761
|
"page-size": n.value,
|
|
598
|
-
"onUpdate:pageSize":
|
|
599
|
-
onSizeChange:
|
|
600
|
-
onCurrentChange:
|
|
762
|
+
"onUpdate:pageSize": i[1] || (i[1] = (o) => n.value = o),
|
|
763
|
+
onSizeChange: i[2] || (i[2] = (o) => a("sizeChange", o)),
|
|
764
|
+
onCurrentChange: i[3] || (i[3] = (o) => a("currentChange", o))
|
|
601
765
|
}), null, 16, ["current-page", "page-size"]));
|
|
602
766
|
}
|
|
603
|
-
}),
|
|
767
|
+
}), it = /* @__PURE__ */ b({
|
|
604
768
|
__name: "XRate",
|
|
605
|
-
props: /* @__PURE__ */
|
|
769
|
+
props: /* @__PURE__ */ T({
|
|
606
770
|
ariaLabel: {},
|
|
607
771
|
id: {},
|
|
608
772
|
lowThreshold: {},
|
|
@@ -640,10 +804,10 @@ const Ye = /* @__PURE__ */ b({
|
|
|
640
804
|
}),
|
|
641
805
|
emits: ["update:modelValue"],
|
|
642
806
|
setup(e) {
|
|
643
|
-
const t = e,
|
|
644
|
-
return (n,
|
|
645
|
-
modelValue:
|
|
646
|
-
"onUpdate:modelValue":
|
|
807
|
+
const t = e, a = C(e, "modelValue");
|
|
808
|
+
return (n, l) => (v(), g(w(Ce), V(t, {
|
|
809
|
+
modelValue: a.value,
|
|
810
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => a.value = r)
|
|
647
811
|
}), null, 16, ["modelValue"]));
|
|
648
812
|
}
|
|
649
813
|
}), rt = /* @__PURE__ */ b({
|
|
@@ -653,34 +817,34 @@ const Ye = /* @__PURE__ */ b({
|
|
|
653
817
|
},
|
|
654
818
|
emits: ["cancel", "confirm"],
|
|
655
819
|
setup(e, { emit: t }) {
|
|
656
|
-
const
|
|
657
|
-
return (n,
|
|
658
|
-
const
|
|
659
|
-
return
|
|
820
|
+
const a = t;
|
|
821
|
+
return (n, l) => {
|
|
822
|
+
const r = U("XButton");
|
|
823
|
+
return v(), g(w(Ee), {
|
|
660
824
|
title: e.title,
|
|
661
|
-
onCancel:
|
|
662
|
-
onConfirm:
|
|
825
|
+
onCancel: l[0] || (l[0] = () => a("cancel")),
|
|
826
|
+
onConfirm: l[1] || (l[1] = () => a("confirm"))
|
|
663
827
|
}, {
|
|
664
|
-
reference:
|
|
665
|
-
|
|
828
|
+
reference: B(() => [
|
|
829
|
+
S(n.$slots, "default")
|
|
666
830
|
]),
|
|
667
|
-
actions:
|
|
668
|
-
z(
|
|
831
|
+
actions: B(({ confirm: i, cancel: o }) => [
|
|
832
|
+
z(r, {
|
|
669
833
|
size: "small",
|
|
670
|
-
onClick:
|
|
834
|
+
onClick: o
|
|
671
835
|
}, {
|
|
672
|
-
default:
|
|
673
|
-
|
|
836
|
+
default: B(() => [...l[2] || (l[2] = [
|
|
837
|
+
j(" 取消 ", -1)
|
|
674
838
|
])]),
|
|
675
839
|
_: 1
|
|
676
840
|
}, 8, ["onClick"]),
|
|
677
|
-
z(
|
|
841
|
+
z(r, {
|
|
678
842
|
type: "danger",
|
|
679
843
|
size: "small",
|
|
680
|
-
onClick:
|
|
844
|
+
onClick: i
|
|
681
845
|
}, {
|
|
682
|
-
default:
|
|
683
|
-
|
|
846
|
+
default: B(() => [...l[3] || (l[3] = [
|
|
847
|
+
j(" 确定 ", -1)
|
|
684
848
|
])]),
|
|
685
849
|
_: 1
|
|
686
850
|
}, 8, ["onClick"])
|
|
@@ -719,20 +883,20 @@ const Ye = /* @__PURE__ */ b({
|
|
|
719
883
|
setup(e, {
|
|
720
884
|
expose: t
|
|
721
885
|
}) {
|
|
722
|
-
const
|
|
886
|
+
const a = e, n = ee("scrollbar"), l = x(() => n.value?.wrapRef), r = x(() => l.value?.firstElementChild);
|
|
723
887
|
return t({
|
|
724
|
-
wrapRef:
|
|
725
|
-
viewRef:
|
|
726
|
-
}), (
|
|
888
|
+
wrapRef: l,
|
|
889
|
+
viewRef: r
|
|
890
|
+
}), (i, o) => (v(), g(w(Se), V({
|
|
727
891
|
ref: "scrollbar"
|
|
728
|
-
},
|
|
729
|
-
default:
|
|
892
|
+
}, a), {
|
|
893
|
+
default: B(() => [S(i.$slots, "default")]),
|
|
730
894
|
_: 3
|
|
731
895
|
}, 16));
|
|
732
896
|
}
|
|
733
|
-
}),
|
|
897
|
+
}), dt = /* @__PURE__ */ b({
|
|
734
898
|
__name: "XSelect",
|
|
735
|
-
props: /* @__PURE__ */
|
|
899
|
+
props: /* @__PURE__ */ T({
|
|
736
900
|
data: {},
|
|
737
901
|
factory: {
|
|
738
902
|
type: Function
|
|
@@ -837,56 +1001,56 @@ const Ye = /* @__PURE__ */ b({
|
|
|
837
1001
|
modelValue: {},
|
|
838
1002
|
modelModifiers: {}
|
|
839
1003
|
}),
|
|
840
|
-
emits: /* @__PURE__ */
|
|
1004
|
+
emits: /* @__PURE__ */ T(["blur", "change"], ["update:modelValue"]),
|
|
841
1005
|
setup(e, {
|
|
842
1006
|
emit: t
|
|
843
1007
|
}) {
|
|
844
|
-
const
|
|
845
|
-
if (typeof
|
|
1008
|
+
const a = t, n = C(e, "modelValue"), l = H([]), r = /* @__PURE__ */ W(() => e.data, e.factory), i = x(() => [...(/* @__PURE__ */ W(l, e.factory)).value, ...r.value]), o = (p) => {
|
|
1009
|
+
if (typeof p == "object") {
|
|
846
1010
|
if (e.identify)
|
|
847
|
-
return e.identify(
|
|
1011
|
+
return e.identify(p);
|
|
848
1012
|
throw new Error("`identify` is required when value's type extends `object` or `object[]`");
|
|
849
1013
|
} else
|
|
850
|
-
return
|
|
851
|
-
},
|
|
1014
|
+
return p;
|
|
1015
|
+
}, d = (p) => i.value.map((h) => h.value).find((h) => o(h) === p);
|
|
852
1016
|
let s = 0;
|
|
853
|
-
|
|
1017
|
+
_([n, r], async () => {
|
|
854
1018
|
if (s++, n.value) {
|
|
855
|
-
const
|
|
856
|
-
|
|
1019
|
+
const p = [].concat(n.value).filter((q) => !r.value.map((I) => o(I.value)).includes(o(q))), h = s, D = await e.supplement?.(p);
|
|
1020
|
+
h === s && D && (l.value = D);
|
|
857
1021
|
} else
|
|
858
|
-
|
|
1022
|
+
l.value = [];
|
|
859
1023
|
}, {
|
|
860
1024
|
immediate: !0
|
|
861
1025
|
});
|
|
862
|
-
const c =
|
|
863
|
-
const
|
|
1026
|
+
const c = x(() => i.value.map((p) => {
|
|
1027
|
+
const h = o(p.value);
|
|
864
1028
|
return {
|
|
865
|
-
...
|
|
866
|
-
key:
|
|
867
|
-
value:
|
|
1029
|
+
...p,
|
|
1030
|
+
key: h,
|
|
1031
|
+
value: h
|
|
868
1032
|
};
|
|
869
|
-
})),
|
|
870
|
-
get: () => n.value && (Array.isArray(n.value) ? n.value.map(
|
|
871
|
-
set: (
|
|
872
|
-
Array.isArray(
|
|
1033
|
+
})), u = x({
|
|
1034
|
+
get: () => n.value && (Array.isArray(n.value) ? n.value.map(o) : o(n.value)),
|
|
1035
|
+
set: (p) => {
|
|
1036
|
+
Array.isArray(p) ? n.value = p.map((h) => d(h)) : n.value = p === void 0 ? void 0 : d(p) || (e.allowCreate ? p : void 0);
|
|
873
1037
|
}
|
|
874
|
-
}),
|
|
875
|
-
if (
|
|
1038
|
+
}), X = m(k, void 0);
|
|
1039
|
+
if (X?.required) {
|
|
876
1040
|
const {
|
|
877
|
-
validator:
|
|
878
|
-
label:
|
|
879
|
-
} =
|
|
880
|
-
|
|
1041
|
+
validator: p,
|
|
1042
|
+
label: h
|
|
1043
|
+
} = X;
|
|
1044
|
+
X.validator = () => !n.value || Array.isArray(n.value) && n.value.length === 0 ? `请选择${h}` : p?.();
|
|
881
1045
|
}
|
|
882
|
-
const
|
|
883
|
-
|
|
884
|
-
const
|
|
885
|
-
|
|
1046
|
+
const E = m(A, void 0), f = m(M, void 0), y = m(R, void 0);
|
|
1047
|
+
f?.on(([p, h]) => E === p && h === void 0 && (u.value = void 0)), y?.on(() => E && f?.trigger([E, u.value === void 0 ? void 0 : [].concat(u.value).map((p) => c.value.find((h) => h.value === p).label).join(",")]));
|
|
1048
|
+
const N = (p) => a("change", p), ne = () => {
|
|
1049
|
+
X?.validate(), a("blur");
|
|
886
1050
|
};
|
|
887
|
-
return (
|
|
888
|
-
const
|
|
889
|
-
return
|
|
1051
|
+
return (p, h) => {
|
|
1052
|
+
const D = U("ElOption"), q = U("ElSelect");
|
|
1053
|
+
return v(), g(q, V({
|
|
890
1054
|
allowCreate: e.allowCreate,
|
|
891
1055
|
clearable: e.clearable,
|
|
892
1056
|
filterable: e.filterable,
|
|
@@ -900,24 +1064,24 @@ const Ye = /* @__PURE__ */ b({
|
|
|
900
1064
|
collapseTags: e.collapseTags,
|
|
901
1065
|
collapseTagsTooltip: e.collapseTags
|
|
902
1066
|
}, {
|
|
903
|
-
modelValue:
|
|
904
|
-
"onUpdate:modelValue":
|
|
905
|
-
onBlur:
|
|
906
|
-
onChange:
|
|
1067
|
+
modelValue: u.value,
|
|
1068
|
+
"onUpdate:modelValue": h[0] || (h[0] = (I) => u.value = I),
|
|
1069
|
+
onBlur: ne,
|
|
1070
|
+
onChange: N
|
|
907
1071
|
}), {
|
|
908
|
-
default:
|
|
909
|
-
key:
|
|
910
|
-
label:
|
|
911
|
-
value:
|
|
1072
|
+
default: B(() => [(v(!0), K(J, null, Z(c.value, (I) => (v(), g(D, {
|
|
1073
|
+
key: I.key,
|
|
1074
|
+
label: I.label,
|
|
1075
|
+
value: I.value
|
|
912
1076
|
}, {
|
|
913
|
-
default:
|
|
1077
|
+
default: B(() => [j(ce(I.label), 1)]),
|
|
914
1078
|
_: 2
|
|
915
1079
|
}, 1032, ["label", "value"]))), 128))]),
|
|
916
1080
|
_: 1
|
|
917
1081
|
}, 16, ["modelValue"]);
|
|
918
1082
|
};
|
|
919
1083
|
}
|
|
920
|
-
}),
|
|
1084
|
+
}), st = /* @__PURE__ */ b({
|
|
921
1085
|
__name: "XSpace",
|
|
922
1086
|
props: {
|
|
923
1087
|
direction: {},
|
|
@@ -937,12 +1101,12 @@ const Ye = /* @__PURE__ */ b({
|
|
|
937
1101
|
},
|
|
938
1102
|
setup(e) {
|
|
939
1103
|
const t = e;
|
|
940
|
-
return (
|
|
941
|
-
default:
|
|
1104
|
+
return (a, n) => (v(), g(w(ke), $(O(t)), {
|
|
1105
|
+
default: B(() => [S(a.$slots, "default")]),
|
|
942
1106
|
_: 3
|
|
943
1107
|
}, 16));
|
|
944
1108
|
}
|
|
945
|
-
}),
|
|
1109
|
+
}), ct = /* @__PURE__ */ b({
|
|
946
1110
|
__name: "XTable",
|
|
947
1111
|
props: {
|
|
948
1112
|
data: {},
|
|
@@ -965,92 +1129,51 @@ const Ye = /* @__PURE__ */ b({
|
|
|
965
1129
|
setup(e, {
|
|
966
1130
|
emit: t
|
|
967
1131
|
}) {
|
|
968
|
-
const
|
|
969
|
-
ref:
|
|
1132
|
+
const a = t, n = ee("container"), l = H(), r = _e(n), i = x(() => e.height ?? r.height.value), o = () => z(Ie, V({
|
|
1133
|
+
ref: l
|
|
970
1134
|
}, {
|
|
971
1135
|
data: e.data,
|
|
972
|
-
height:
|
|
1136
|
+
height: i.value,
|
|
973
1137
|
showOverflowTooltip: e.showOverflowTooltip,
|
|
974
1138
|
border: e.border,
|
|
975
1139
|
highlightCurrentRow: e.highlightCurrentRow,
|
|
976
1140
|
spanMethod: e.spanMethod
|
|
977
1141
|
}, {
|
|
978
|
-
"onRow-click": (
|
|
979
|
-
"onSelection-change": (
|
|
980
|
-
"onHeader-dragend": (
|
|
1142
|
+
"onRow-click": (d) => a("rowClick", d),
|
|
1143
|
+
"onSelection-change": (d) => a("selectionChange", d),
|
|
1144
|
+
"onHeader-dragend": (d, s, c) => a("headerDragend", d, s, c)
|
|
981
1145
|
}), {
|
|
982
|
-
default: () => e.columns.map((
|
|
1146
|
+
default: () => e.columns.map((d) => z(ze, d, {
|
|
983
1147
|
default: ({
|
|
984
1148
|
$index: s,
|
|
985
1149
|
row: c
|
|
986
|
-
}) =>
|
|
1150
|
+
}) => d.content?.({
|
|
987
1151
|
index: s,
|
|
988
1152
|
row: c
|
|
989
1153
|
}),
|
|
990
|
-
header: () =>
|
|
991
|
-
column:
|
|
992
|
-
}) ??
|
|
1154
|
+
header: () => d.header?.({
|
|
1155
|
+
column: d
|
|
1156
|
+
}) ?? d.label
|
|
993
1157
|
}))
|
|
994
1158
|
});
|
|
995
|
-
return (
|
|
1159
|
+
return (d, s) => (v(), K("div", {
|
|
996
1160
|
ref_key: "container",
|
|
997
1161
|
ref: n,
|
|
998
|
-
class:
|
|
999
|
-
}, [z(
|
|
1162
|
+
class: fe([e.height === void 0 && "h-full"])
|
|
1163
|
+
}, [z(o)], 2));
|
|
1000
1164
|
}
|
|
1001
|
-
}),
|
|
1165
|
+
}), ft = /* @__PURE__ */ b((e, {
|
|
1002
1166
|
slots: t
|
|
1003
1167
|
}) => {
|
|
1004
|
-
const
|
|
1168
|
+
const a = {
|
|
1005
1169
|
...e
|
|
1006
1170
|
};
|
|
1007
|
-
return
|
|
1171
|
+
return m(De, void 0)?.push(a), L(le, a), () => z(Pe, e, {
|
|
1008
1172
|
...t
|
|
1009
1173
|
});
|
|
1010
1174
|
}, {
|
|
1011
1175
|
props: ["label", "name", "closable", "lazy", "disabled"]
|
|
1012
|
-
}),
|
|
1013
|
-
__name: "XTabs",
|
|
1014
|
-
props: /* @__PURE__ */ B({
|
|
1015
|
-
type: {},
|
|
1016
|
-
defaultValue: {},
|
|
1017
|
-
addable: {
|
|
1018
|
-
type: Boolean,
|
|
1019
|
-
default: () => {
|
|
1020
|
-
}
|
|
1021
|
-
},
|
|
1022
|
-
editable: {
|
|
1023
|
-
type: Boolean,
|
|
1024
|
-
default: () => {
|
|
1025
|
-
}
|
|
1026
|
-
},
|
|
1027
|
-
tabPosition: {}
|
|
1028
|
-
}, {
|
|
1029
|
-
modelValue: {},
|
|
1030
|
-
modelModifiers: {}
|
|
1031
|
-
}),
|
|
1032
|
-
emits: /* @__PURE__ */ B(["tabChange", "tabRemove"], ["update:modelValue"]),
|
|
1033
|
-
setup(e, {
|
|
1034
|
-
emit: t
|
|
1035
|
-
}) {
|
|
1036
|
-
const l = t, n = T(e, "modelValue");
|
|
1037
|
-
return $(ae, []), (i, d) => (m(), y(h(Ae), V({
|
|
1038
|
-
addable: e.addable,
|
|
1039
|
-
editable: e.editable,
|
|
1040
|
-
type: e.type,
|
|
1041
|
-
defaultValue: e.defaultValue,
|
|
1042
|
-
tabPosition: e.tabPosition
|
|
1043
|
-
}, {
|
|
1044
|
-
modelValue: n.value,
|
|
1045
|
-
"onUpdate:modelValue": d[0] || (d[0] = (a) => n.value = a),
|
|
1046
|
-
onTabChange: d[1] || (d[1] = (a) => l("tabChange", a)),
|
|
1047
|
-
onTabRemove: d[2] || (d[2] = (a) => l("tabRemove", a))
|
|
1048
|
-
}), {
|
|
1049
|
-
default: v(() => [E(i.$slots, "default")]),
|
|
1050
|
-
_: 3
|
|
1051
|
-
}, 16, ["modelValue"]));
|
|
1052
|
-
}
|
|
1053
|
-
}), bt = /* @__PURE__ */ b({
|
|
1176
|
+
}), mt = /* @__PURE__ */ b({
|
|
1054
1177
|
__name: "XTag",
|
|
1055
1178
|
props: {
|
|
1056
1179
|
type: {},
|
|
@@ -1062,16 +1185,16 @@ const Ye = /* @__PURE__ */ b({
|
|
|
1062
1185
|
},
|
|
1063
1186
|
emits: ["close"],
|
|
1064
1187
|
setup(e) {
|
|
1065
|
-
return (t,
|
|
1066
|
-
onClose:
|
|
1188
|
+
return (t, a) => (v(), g(w(Ae), V({ type: e.type, color: e.color, closable: e.closable, round: e.round }, {
|
|
1189
|
+
onClose: a[0] || (a[0] = (n) => t.$emit("close"))
|
|
1067
1190
|
}), {
|
|
1068
|
-
default:
|
|
1069
|
-
|
|
1191
|
+
default: B(() => [
|
|
1192
|
+
S(t.$slots, "default")
|
|
1070
1193
|
]),
|
|
1071
1194
|
_: 3
|
|
1072
1195
|
}, 16));
|
|
1073
1196
|
}
|
|
1074
|
-
}),
|
|
1197
|
+
}), pt = /* @__PURE__ */ b({
|
|
1075
1198
|
__name: "XText",
|
|
1076
1199
|
props: {
|
|
1077
1200
|
type: {},
|
|
@@ -1080,16 +1203,16 @@ const Ye = /* @__PURE__ */ b({
|
|
|
1080
1203
|
} }
|
|
1081
1204
|
},
|
|
1082
1205
|
setup(e) {
|
|
1083
|
-
return (t,
|
|
1084
|
-
default:
|
|
1085
|
-
|
|
1206
|
+
return (t, a) => (v(), g(w($e), $(O({ type: e.type, size: e.size, truncated: e.truncated })), {
|
|
1207
|
+
default: B(() => [
|
|
1208
|
+
S(t.$slots, "default")
|
|
1086
1209
|
]),
|
|
1087
1210
|
_: 3
|
|
1088
1211
|
}, 16));
|
|
1089
1212
|
}
|
|
1090
1213
|
}), vt = /* @__PURE__ */ b({
|
|
1091
1214
|
__name: "XUpload",
|
|
1092
|
-
props: /* @__PURE__ */
|
|
1215
|
+
props: /* @__PURE__ */ T({
|
|
1093
1216
|
action: {},
|
|
1094
1217
|
data: {
|
|
1095
1218
|
type: Function
|
|
@@ -1121,72 +1244,102 @@ const Ye = /* @__PURE__ */ b({
|
|
|
1121
1244
|
}),
|
|
1122
1245
|
emits: ["update:modelValue"],
|
|
1123
1246
|
setup(e) {
|
|
1124
|
-
const t =
|
|
1125
|
-
name:
|
|
1126
|
-
url:
|
|
1127
|
-
uid: Number(
|
|
1128
|
-
}))), n =
|
|
1247
|
+
const t = C(e, "modelValue"), a = x(() => [].concat(t.value ?? []).reverse().map((o) => ({
|
|
1248
|
+
name: o.split("/").findLast(() => !0),
|
|
1249
|
+
url: o,
|
|
1250
|
+
uid: Number(o.slice(0, o.lastIndexOf("/")).split("/").findLast(() => !0))
|
|
1251
|
+
}))), n = m(k, void 0);
|
|
1129
1252
|
if (n?.required) {
|
|
1130
1253
|
const {
|
|
1131
|
-
validator:
|
|
1132
|
-
label:
|
|
1254
|
+
validator: o,
|
|
1255
|
+
label: d
|
|
1133
1256
|
} = n;
|
|
1134
|
-
n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${
|
|
1257
|
+
n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${d}` : o?.();
|
|
1135
1258
|
}
|
|
1136
|
-
const
|
|
1137
|
-
t.value = Array.isArray(t.value) ?
|
|
1259
|
+
const l = (o) => (o.size > e.maxSize && te.warning("文件过大,请重新选择"), o.size < e.maxSize), r = (o) => window.open(o.url), i = (o, d) => {
|
|
1260
|
+
t.value = Array.isArray(t.value) ? d.map((s) => s.url) : void 0;
|
|
1138
1261
|
};
|
|
1139
|
-
return (
|
|
1262
|
+
return (o, d) => (v(), g(w(Oe), $(O({
|
|
1140
1263
|
limit: e.limit,
|
|
1141
1264
|
disabled: e.disabled,
|
|
1142
1265
|
data: e.data,
|
|
1143
1266
|
maxSize: e.maxSize,
|
|
1144
1267
|
showFileList: e.showFileList,
|
|
1145
|
-
fileList:
|
|
1146
|
-
beforeUpload:
|
|
1147
|
-
onPreview:
|
|
1148
|
-
onRemove:
|
|
1268
|
+
fileList: a.value,
|
|
1269
|
+
beforeUpload: l,
|
|
1270
|
+
onPreview: r,
|
|
1271
|
+
onRemove: i
|
|
1149
1272
|
})), {
|
|
1150
|
-
file:
|
|
1273
|
+
file: B(({
|
|
1151
1274
|
file: s
|
|
1152
|
-
}) => [
|
|
1275
|
+
}) => [S(o.$slots, "file", {
|
|
1153
1276
|
file: s
|
|
1154
1277
|
})]),
|
|
1155
|
-
default:
|
|
1278
|
+
default: B(() => [S(o.$slots, "default")]),
|
|
1156
1279
|
_: 3
|
|
1157
1280
|
}, 16));
|
|
1158
1281
|
}
|
|
1159
|
-
})
|
|
1282
|
+
}), yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1283
|
+
__proto__: null,
|
|
1284
|
+
XButton: Me,
|
|
1285
|
+
XCascader: Fe,
|
|
1286
|
+
XCheckbox: Ke,
|
|
1287
|
+
XColorPicker: Ge,
|
|
1288
|
+
XDatePicker: Ye,
|
|
1289
|
+
XDialog: Je,
|
|
1290
|
+
XDivider: Ze,
|
|
1291
|
+
XForm: tt,
|
|
1292
|
+
XFormItem: et,
|
|
1293
|
+
XImage: at,
|
|
1294
|
+
XInput: lt,
|
|
1295
|
+
XInputNumber: ot,
|
|
1296
|
+
XPagination: nt,
|
|
1297
|
+
XRate: it,
|
|
1298
|
+
XReconfirm: rt,
|
|
1299
|
+
XScrollbar: ut,
|
|
1300
|
+
XSelect: dt,
|
|
1301
|
+
XSpace: st,
|
|
1302
|
+
XTabPane: ft,
|
|
1303
|
+
XTable: ct,
|
|
1304
|
+
XTag: mt,
|
|
1305
|
+
XText: pt,
|
|
1306
|
+
XUpload: vt
|
|
1307
|
+
}, Symbol.toStringTag, { value: "Module" })), ht = {
|
|
1308
|
+
install(e) {
|
|
1309
|
+
Object.entries(yt).forEach(([t, a]) => e.component(t, a));
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1160
1312
|
export {
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
tt as
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1313
|
+
Me as XButton,
|
|
1314
|
+
Fe as XCascader,
|
|
1315
|
+
Ke as XCheckbox,
|
|
1316
|
+
Ge as XColorPicker,
|
|
1317
|
+
Ye as XDatePicker,
|
|
1318
|
+
Je as XDialog,
|
|
1319
|
+
Ze as XDivider,
|
|
1320
|
+
tt as XForm,
|
|
1321
|
+
et as XFormItem,
|
|
1322
|
+
at as XImage,
|
|
1323
|
+
lt as XInput,
|
|
1324
|
+
ot as XInputNumber,
|
|
1325
|
+
nt as XPagination,
|
|
1326
|
+
it as XRate,
|
|
1174
1327
|
rt as XReconfirm,
|
|
1175
1328
|
ut as XScrollbar,
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
yt as XText,
|
|
1329
|
+
dt as XSelect,
|
|
1330
|
+
st as XSpace,
|
|
1331
|
+
ft as XTabPane,
|
|
1332
|
+
ct as XTable,
|
|
1333
|
+
mt as XTag,
|
|
1334
|
+
pt as XText,
|
|
1183
1335
|
vt as XUpload,
|
|
1184
|
-
|
|
1336
|
+
A as X_FORM_ITEM_LABEL,
|
|
1185
1337
|
k as X_FORM_ITEM_VALIDATION,
|
|
1186
1338
|
Re as X_FORM_TAB_UPDATE_HOOK,
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1339
|
+
ae as X_FORM_VALIDATIONS,
|
|
1340
|
+
R as X_TABLE_QUERY_EXECUTE_HOOK,
|
|
1341
|
+
M as X_TABLE_QUERY_UPDATE_HOOK,
|
|
1190
1342
|
le as X_TAB_PANE,
|
|
1191
|
-
|
|
1343
|
+
De as X_TAB_PANES,
|
|
1344
|
+
ht as default
|
|
1192
1345
|
};
|