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