@pungfe/element 0.0.1-alpha.12 → 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/components.d.ts +1 -0
- package/dist/index.js +386 -343
- package/package.json +1 -1
package/dist/components.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export { default as XSpace } from './basic/XSpace.vue';
|
|
|
33
33
|
export * from './basic/XSpace.vue';
|
|
34
34
|
export { default as XTable } from './basic/XTable.vue';
|
|
35
35
|
export * from './basic/XTable.vue';
|
|
36
|
+
export { XTabPane, default as XTabs } from './basic/XTabs.vue';
|
|
36
37
|
export * from './basic/XTabs.vue';
|
|
37
38
|
export { default as XTag } from './basic/XTag.vue';
|
|
38
39
|
export * from './basic/XTag.vue';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElButton 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: {},
|
|
@@ -25,26 +25,26 @@ const Me = /* @__PURE__ */ b({
|
|
|
25
25
|
emits: ["click"],
|
|
26
26
|
setup(e, { emit: t }) {
|
|
27
27
|
const a = e, n = t;
|
|
28
|
-
return (
|
|
28
|
+
return (o, r) => (p(), g(B(pe), C(a, {
|
|
29
29
|
onClick: r[0] || (r[0] = (i) => n("click", i))
|
|
30
30
|
}), {
|
|
31
|
-
default:
|
|
32
|
-
S(
|
|
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 Me = /* @__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 a = e, n = t,
|
|
67
|
+
const a = e, n = t, o = x(e, "modelValue"), r = f(k, void 0);
|
|
68
68
|
if (r?.required) {
|
|
69
69
|
const {
|
|
70
70
|
validator: c,
|
|
71
|
-
label:
|
|
71
|
+
label: d
|
|
72
72
|
} = r;
|
|
73
|
-
r.validator = () =>
|
|
73
|
+
r.validator = () => o.value ? c?.() : `请输入${d}`;
|
|
74
74
|
}
|
|
75
|
-
const i =
|
|
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,
|
|
81
|
-
modelValue:
|
|
82
|
-
"onUpdate:modelValue":
|
|
80
|
+
return (c, d) => (p(), g(B(be), C(a, {
|
|
81
|
+
modelValue: o.value,
|
|
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
102
|
function W(e, t) {
|
|
103
|
-
return
|
|
103
|
+
return X(() => L(e).map((a) => L(a)).map(t));
|
|
104
104
|
}
|
|
105
|
-
const
|
|
105
|
+
const ne = He ? window : void 0;
|
|
106
106
|
function P(e) {
|
|
107
107
|
var t;
|
|
108
|
-
const a =
|
|
108
|
+
const a = L(e);
|
|
109
109
|
return (t = a?.$el) !== null && t !== void 0 ? t : a;
|
|
110
110
|
}
|
|
111
111
|
// @__NO_SIDE_EFFECTS__
|
|
112
|
-
function
|
|
113
|
-
const e = Q(!1), t =
|
|
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 =
|
|
123
|
+
function Ke(e, t, a = {}) {
|
|
124
|
+
const { window: n = ne, ...o } = a;
|
|
125
125
|
let r;
|
|
126
|
-
const i = /* @__PURE__ */
|
|
126
|
+
const i = /* @__PURE__ */ We(() => n && "ResizeObserver" in n), l = () => {
|
|
127
127
|
r && (r.disconnect(), r = void 0);
|
|
128
|
-
},
|
|
129
|
-
const c =
|
|
130
|
-
return Array.isArray(c) ? c.map((
|
|
128
|
+
}, u = K(X(() => {
|
|
129
|
+
const c = L(e);
|
|
130
|
+
return Array.isArray(c) ? c.map((d) => P(d)) : [P(c)];
|
|
131
131
|
}), (c) => {
|
|
132
|
-
if (
|
|
132
|
+
if (l(), i.value && n) {
|
|
133
133
|
r = new ResizeObserver(t);
|
|
134
|
-
for (const
|
|
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
|
|
142
|
+
return Ue(s), {
|
|
143
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
150
|
}, a = {}) {
|
|
151
|
-
const { window: n =
|
|
152
|
-
var
|
|
153
|
-
return (
|
|
154
|
-
}), i = Q(t.width),
|
|
155
|
-
const
|
|
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
156
|
if (n && r.value) {
|
|
157
157
|
const E = P(e);
|
|
158
158
|
if (E) {
|
|
159
|
-
const
|
|
160
|
-
i.value =
|
|
159
|
+
const m = E.getBoundingClientRect();
|
|
160
|
+
i.value = m.width, l.value = m.height;
|
|
161
161
|
}
|
|
162
|
-
} else if (
|
|
163
|
-
const E =
|
|
164
|
-
i.value = E.reduce((
|
|
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
|
-
i.value =
|
|
166
|
+
i.value = d.contentRect.width, l.value = d.contentRect.height;
|
|
167
167
|
}, a);
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
|
|
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
|
-
i.value =
|
|
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
179
|
width: i,
|
|
180
|
-
height:
|
|
180
|
+
height: l,
|
|
181
181
|
stop: c
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
const
|
|
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,50 +224,50 @@ const Ke = /* @__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
|
-
}, r = (s) => n.value.map((c) => c.value).find((c) =>
|
|
235
|
-
const c =
|
|
234
|
+
}, r = (s) => n.value.map((c) => c.value).find((c) => o(c) === s), i = X(() => n.value.map((s) => {
|
|
235
|
+
const c = o(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(
|
|
241
|
+
})), l = X({
|
|
242
|
+
get: () => t.value && t.value.map(o),
|
|
243
243
|
set: (s) => t.value = Array.isArray(s) ? s.map((c) => r(c)) : []
|
|
244
|
-
}),
|
|
245
|
-
if (
|
|
244
|
+
}), u = f(k, void 0);
|
|
245
|
+
if (u?.required) {
|
|
246
246
|
const {
|
|
247
247
|
validator: s,
|
|
248
248
|
label: c
|
|
249
|
-
} =
|
|
250
|
-
|
|
249
|
+
} = u;
|
|
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,23 @@ const Ke = /* @__PURE__ */ b({
|
|
|
281
281
|
}),
|
|
282
282
|
emits: ["update:modelValue"],
|
|
283
283
|
setup(e) {
|
|
284
|
-
const t = e, a =
|
|
284
|
+
const t = e, a = x(e, "modelValue"), n = f(k, void 0);
|
|
285
285
|
if (n?.required) {
|
|
286
286
|
const {
|
|
287
|
-
validator:
|
|
288
|
-
label:
|
|
287
|
+
validator: l,
|
|
288
|
+
label: u
|
|
289
289
|
} = n;
|
|
290
|
-
n.validator = () => a.value ?
|
|
290
|
+
n.validator = () => a.value ? l?.() : `请输入${u}`;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
return r?.on(([
|
|
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
294
|
modelValue: a.value,
|
|
295
|
-
"onUpdate:modelValue":
|
|
295
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => a.value = s)
|
|
296
296
|
}), null, 16, ["modelValue"]));
|
|
297
297
|
}
|
|
298
|
-
}),
|
|
298
|
+
}), Je = /* @__PURE__ */ y({
|
|
299
299
|
__name: "XDatePicker",
|
|
300
|
-
props: /* @__PURE__ */
|
|
300
|
+
props: /* @__PURE__ */ V({
|
|
301
301
|
type: {
|
|
302
302
|
default: "date"
|
|
303
303
|
},
|
|
@@ -385,37 +385,37 @@ const Ke = /* @__PURE__ */ b({
|
|
|
385
385
|
end: {},
|
|
386
386
|
endModifiers: {}
|
|
387
387
|
}),
|
|
388
|
-
emits: /* @__PURE__ */
|
|
388
|
+
emits: /* @__PURE__ */ V(["blur", "change"], ["update:modelValue", "update:start", "update:end"]),
|
|
389
389
|
setup(e, {
|
|
390
390
|
emit: t
|
|
391
391
|
}) {
|
|
392
|
-
const a = t, n =
|
|
392
|
+
const a = t, n = x(e, "modelValue"), o = x(e, "start"), r = x(e, "end"), i = X({
|
|
393
393
|
get: () => {
|
|
394
|
-
if (e.type.includes("range") &&
|
|
395
|
-
return [
|
|
394
|
+
if (e.type.includes("range") && o.value && r.value)
|
|
395
|
+
return [o.value, r.value];
|
|
396
396
|
if (!e.type.includes("range"))
|
|
397
397
|
return n.value;
|
|
398
398
|
},
|
|
399
|
-
set: (
|
|
400
|
-
e.type.includes("range") ? (
|
|
399
|
+
set: (m) => {
|
|
400
|
+
e.type.includes("range") ? (o.value = m?.[0], r.value = m?.[1]) : n.value = m;
|
|
401
401
|
}
|
|
402
|
-
}),
|
|
402
|
+
}), l = X(() => e.type.includes("range") ? [{
|
|
403
403
|
text: "最近一周",
|
|
404
404
|
value: () => {
|
|
405
|
-
const
|
|
406
|
-
return
|
|
405
|
+
const m = /* @__PURE__ */ new Date(), v = /* @__PURE__ */ new Date();
|
|
406
|
+
return v.setTime(v.getTime() - 3600 * 1e3 * 24 * 7), [v, m];
|
|
407
407
|
}
|
|
408
408
|
}, {
|
|
409
409
|
text: "最近一月",
|
|
410
410
|
value: () => {
|
|
411
|
-
const
|
|
412
|
-
return
|
|
411
|
+
const m = /* @__PURE__ */ new Date(), v = /* @__PURE__ */ new Date();
|
|
412
|
+
return v.setTime(v.getTime() - 3600 * 1e3 * 24 * 30), [v, m];
|
|
413
413
|
}
|
|
414
414
|
}, {
|
|
415
415
|
text: "最近三月",
|
|
416
416
|
value: () => {
|
|
417
|
-
const
|
|
418
|
-
return
|
|
417
|
+
const m = /* @__PURE__ */ new Date(), v = /* @__PURE__ */ new Date();
|
|
418
|
+
return v.setTime(v.getTime() - 3600 * 1e3 * 24 * 90), [v, m];
|
|
419
419
|
}
|
|
420
420
|
}] : [{
|
|
421
421
|
text: "昨天",
|
|
@@ -423,45 +423,45 @@ const Ke = /* @__PURE__ */ b({
|
|
|
423
423
|
}, {
|
|
424
424
|
text: "一周前",
|
|
425
425
|
value: () => {
|
|
426
|
-
const
|
|
427
|
-
return
|
|
426
|
+
const m = /* @__PURE__ */ new Date();
|
|
427
|
+
return m.setTime(m.getTime() - 3600 * 1e3 * 24 * 7), m;
|
|
428
428
|
}
|
|
429
429
|
}, {
|
|
430
430
|
text: "一月前",
|
|
431
431
|
value: () => {
|
|
432
|
-
const
|
|
433
|
-
return
|
|
432
|
+
const m = /* @__PURE__ */ new Date();
|
|
433
|
+
return m.setTime(m.getTime() - 3600 * 1e3 * 24 * 30), m;
|
|
434
434
|
}
|
|
435
|
-
}]),
|
|
436
|
-
if (
|
|
435
|
+
}]), u = f(k, void 0);
|
|
436
|
+
if (u?.required) {
|
|
437
437
|
const {
|
|
438
|
-
validator:
|
|
439
|
-
label:
|
|
440
|
-
} =
|
|
441
|
-
|
|
438
|
+
validator: m,
|
|
439
|
+
label: v
|
|
440
|
+
} = u;
|
|
441
|
+
u.validator = () => !i.value || e.type.includes("range") && !i.value?.length ? `请选择${v}` : m?.();
|
|
442
442
|
}
|
|
443
|
-
const s =
|
|
444
|
-
c?.on(([
|
|
445
|
-
const
|
|
446
|
-
|
|
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
447
|
};
|
|
448
|
-
return (
|
|
448
|
+
return (m, v) => (p(), g(B(he), C({
|
|
449
449
|
type: e.type,
|
|
450
450
|
placeholder: e.placeholder,
|
|
451
451
|
startPlaceholder: e.startPlaceholder,
|
|
452
452
|
endPlaceholder: e.endPlaceholder,
|
|
453
|
-
shortcuts:
|
|
453
|
+
shortcuts: l.value,
|
|
454
454
|
valueFormat: e.valueFormat
|
|
455
455
|
}, {
|
|
456
456
|
modelValue: i.value,
|
|
457
|
-
"onUpdate:modelValue":
|
|
457
|
+
"onUpdate:modelValue": v[0] || (v[0] = (N) => i.value = N),
|
|
458
458
|
onBlur: E,
|
|
459
|
-
onChange:
|
|
459
|
+
onChange: T
|
|
460
460
|
}), null, 16, ["modelValue"]));
|
|
461
461
|
}
|
|
462
|
-
}),
|
|
462
|
+
}), Ze = /* @__PURE__ */ y({
|
|
463
463
|
__name: "XDialog",
|
|
464
|
-
props: /* @__PURE__ */
|
|
464
|
+
props: /* @__PURE__ */ V({
|
|
465
465
|
title: {},
|
|
466
466
|
bodyClass: {}
|
|
467
467
|
}, {
|
|
@@ -475,26 +475,26 @@ const Ke = /* @__PURE__ */ b({
|
|
|
475
475
|
const {
|
|
476
476
|
header: t,
|
|
477
477
|
footer: a
|
|
478
|
-
} =
|
|
479
|
-
return (
|
|
478
|
+
} = se(), n = x(e, "modelValue");
|
|
479
|
+
return (o, r) => (p(), g(B(Be), {
|
|
480
480
|
modelValue: n.value,
|
|
481
481
|
"onUpdate:modelValue": r[0] || (r[0] = (i) => n.value = i),
|
|
482
482
|
title: e.title,
|
|
483
483
|
"body-class": `flex flex-col ${e.bodyClass}`
|
|
484
|
-
},
|
|
485
|
-
default:
|
|
484
|
+
}, ce({
|
|
485
|
+
default: h(() => [S(o.$slots, "default")]),
|
|
486
486
|
_: 2
|
|
487
487
|
}, [t ? {
|
|
488
488
|
name: "header",
|
|
489
|
-
fn:
|
|
489
|
+
fn: h(() => [S(o.$slots, "header")]),
|
|
490
490
|
key: "0"
|
|
491
491
|
} : void 0, a ? {
|
|
492
492
|
name: "footer",
|
|
493
|
-
fn:
|
|
493
|
+
fn: h(() => [S(o.$slots, "footer")]),
|
|
494
494
|
key: "1"
|
|
495
495
|
} : void 0]), 1032, ["modelValue", "title", "body-class"]));
|
|
496
496
|
}
|
|
497
|
-
}),
|
|
497
|
+
}), et = /* @__PURE__ */ y({
|
|
498
498
|
__name: "XDivider",
|
|
499
499
|
props: {
|
|
500
500
|
direction: {},
|
|
@@ -503,46 +503,46 @@ const Ke = /* @__PURE__ */ b({
|
|
|
503
503
|
},
|
|
504
504
|
setup(e) {
|
|
505
505
|
const t = e;
|
|
506
|
-
return (a, n) => (
|
|
507
|
-
default:
|
|
506
|
+
return (a, n) => (p(), g(B(we), O(M(t)), {
|
|
507
|
+
default: h(() => [
|
|
508
508
|
S(a.$slots, "default")
|
|
509
509
|
]),
|
|
510
510
|
_: 3
|
|
511
511
|
}, 16));
|
|
512
512
|
}
|
|
513
|
-
}),
|
|
513
|
+
}), tt = /* @__PURE__ */ y((e, {
|
|
514
514
|
expose: t
|
|
515
515
|
}) => {
|
|
516
|
-
const a =
|
|
516
|
+
const a = f(oe, void 0), n = f(Fe, void 0), o = H(), r = {
|
|
517
517
|
label: e.label,
|
|
518
518
|
required: e.required,
|
|
519
519
|
clearValidate() {
|
|
520
|
-
|
|
520
|
+
o.value = void 0;
|
|
521
521
|
},
|
|
522
522
|
validate() {
|
|
523
|
-
return
|
|
523
|
+
return o.value = r.validator?.() ?? void 0, o.value && a?.name && (te({
|
|
524
524
|
plain: !0,
|
|
525
525
|
type: "warning",
|
|
526
|
-
message:
|
|
527
|
-
}), n?.trigger(a.name)), !
|
|
526
|
+
message: o.value
|
|
527
|
+
}), n?.trigger(a.name)), !o.value;
|
|
528
528
|
}
|
|
529
529
|
};
|
|
530
|
-
return
|
|
530
|
+
return f(ae, void 0)?.push(r), A(k, r), t({
|
|
531
531
|
...r
|
|
532
|
-
}),
|
|
532
|
+
}), A($, e.label), () => z(Te, C({
|
|
533
533
|
label: e.label,
|
|
534
534
|
labelPosition: e.labelPosition,
|
|
535
535
|
labelWidth: e.labelWidth,
|
|
536
536
|
required: e.required
|
|
537
537
|
}, {
|
|
538
|
-
error:
|
|
538
|
+
error: o.value
|
|
539
539
|
}), {
|
|
540
540
|
label: () => e.label,
|
|
541
541
|
default: () => e.content?.()
|
|
542
542
|
});
|
|
543
543
|
}, {
|
|
544
544
|
props: ["label", "required", "content", "tooltip"]
|
|
545
|
-
}),
|
|
545
|
+
}), at = /* @__PURE__ */ y({
|
|
546
546
|
__name: "XForm",
|
|
547
547
|
props: {
|
|
548
548
|
content: {
|
|
@@ -569,19 +569,19 @@ const Ke = /* @__PURE__ */ b({
|
|
|
569
569
|
expose: t
|
|
570
570
|
}) {
|
|
571
571
|
const a = H(), n = [];
|
|
572
|
-
|
|
573
|
-
const
|
|
574
|
-
a.value?.resetFields(), n.forEach((
|
|
572
|
+
A(ae, n);
|
|
573
|
+
const o = () => n.every((l) => l.validate()), r = () => {
|
|
574
|
+
a.value?.resetFields(), n.forEach((l) => l.clearValidate());
|
|
575
575
|
};
|
|
576
576
|
t({
|
|
577
577
|
data: e.data,
|
|
578
|
-
validate:
|
|
578
|
+
validate: o,
|
|
579
579
|
resetFields: r
|
|
580
580
|
});
|
|
581
581
|
const i = () => e.content?.({
|
|
582
582
|
data: e.data
|
|
583
583
|
});
|
|
584
|
-
return (
|
|
584
|
+
return (l, u) => (p(), g(B(Ve), C({
|
|
585
585
|
ref_key: "form",
|
|
586
586
|
ref: a
|
|
587
587
|
}, {
|
|
@@ -592,11 +592,11 @@ const Ke = /* @__PURE__ */ b({
|
|
|
592
592
|
labelPosition: e.labelPosition,
|
|
593
593
|
statusIcon: e.statusIcon
|
|
594
594
|
}), {
|
|
595
|
-
default:
|
|
595
|
+
default: h(() => [z(i)]),
|
|
596
596
|
_: 1
|
|
597
597
|
}, 16));
|
|
598
598
|
}
|
|
599
|
-
}),
|
|
599
|
+
}), lt = /* @__PURE__ */ y({
|
|
600
600
|
__name: "XImage",
|
|
601
601
|
props: {
|
|
602
602
|
hideOnClickModal: { type: Boolean },
|
|
@@ -620,11 +620,11 @@ const Ke = /* @__PURE__ */ b({
|
|
|
620
620
|
},
|
|
621
621
|
setup(e) {
|
|
622
622
|
const t = e;
|
|
623
|
-
return (a, n) => (
|
|
623
|
+
return (a, n) => (p(), g(B(Xe), O(M(t)), null, 16));
|
|
624
624
|
}
|
|
625
|
-
}),
|
|
625
|
+
}), ot = /* @__PURE__ */ y({
|
|
626
626
|
__name: "XInput",
|
|
627
|
-
props: /* @__PURE__ */
|
|
627
|
+
props: /* @__PURE__ */ V({
|
|
628
628
|
clearable: {
|
|
629
629
|
type: Boolean
|
|
630
630
|
},
|
|
@@ -645,33 +645,33 @@ const Ke = /* @__PURE__ */ b({
|
|
|
645
645
|
modelValue: {},
|
|
646
646
|
modelModifiers: {}
|
|
647
647
|
}),
|
|
648
|
-
emits: /* @__PURE__ */
|
|
648
|
+
emits: /* @__PURE__ */ V(["blur", "change"], ["update:modelValue"]),
|
|
649
649
|
setup(e, {
|
|
650
650
|
emit: t
|
|
651
651
|
}) {
|
|
652
|
-
const a = e, n = t,
|
|
652
|
+
const a = e, n = t, o = x(e, "modelValue"), r = f(k, void 0);
|
|
653
653
|
if (r?.required) {
|
|
654
654
|
const {
|
|
655
|
-
validator:
|
|
656
|
-
label:
|
|
655
|
+
validator: d,
|
|
656
|
+
label: T
|
|
657
657
|
} = r;
|
|
658
|
-
r.validator = () =>
|
|
658
|
+
r.validator = () => o.value ? d?.() : `请输入${T}`;
|
|
659
659
|
}
|
|
660
|
-
const i =
|
|
661
|
-
|
|
662
|
-
const s = (
|
|
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
663
|
r?.validate(), n("blur");
|
|
664
664
|
};
|
|
665
|
-
return (
|
|
666
|
-
modelValue:
|
|
667
|
-
"onUpdate:modelValue":
|
|
665
|
+
return (d, T) => (p(), g(B(Ce), C(a, {
|
|
666
|
+
modelValue: o.value,
|
|
667
|
+
"onUpdate:modelValue": T[0] || (T[0] = (E) => o.value = E),
|
|
668
668
|
onBlur: c,
|
|
669
669
|
onChange: s
|
|
670
670
|
}), null, 16, ["modelValue"]));
|
|
671
671
|
}
|
|
672
|
-
}),
|
|
672
|
+
}), nt = /* @__PURE__ */ y({
|
|
673
673
|
__name: "XInputNumber",
|
|
674
|
-
props: /* @__PURE__ */
|
|
674
|
+
props: /* @__PURE__ */ V({
|
|
675
675
|
placeholder: {
|
|
676
676
|
default: "请输入"
|
|
677
677
|
},
|
|
@@ -697,33 +697,33 @@ const Ke = /* @__PURE__ */ b({
|
|
|
697
697
|
modelValue: {},
|
|
698
698
|
modelModifiers: {}
|
|
699
699
|
}),
|
|
700
|
-
emits: /* @__PURE__ */
|
|
700
|
+
emits: /* @__PURE__ */ V(["blur"], ["update:modelValue"]),
|
|
701
701
|
setup(e, {
|
|
702
702
|
emit: t
|
|
703
703
|
}) {
|
|
704
|
-
const a = e, n = t,
|
|
704
|
+
const a = e, n = t, o = x(e, "modelValue"), r = f(k, void 0);
|
|
705
705
|
if (r?.required) {
|
|
706
706
|
const {
|
|
707
|
-
validator:
|
|
708
|
-
label:
|
|
707
|
+
validator: l,
|
|
708
|
+
label: u
|
|
709
709
|
} = r;
|
|
710
|
-
r.validator = () =>
|
|
710
|
+
r.validator = () => o.value === void 0 ? `请输入${u}` : l?.();
|
|
711
711
|
}
|
|
712
712
|
const i = () => {
|
|
713
713
|
r?.validate(), n("blur");
|
|
714
714
|
};
|
|
715
|
-
return (
|
|
715
|
+
return (l, u) => {
|
|
716
716
|
const s = U("ElInputNumber");
|
|
717
|
-
return
|
|
718
|
-
modelValue:
|
|
719
|
-
"onUpdate:modelValue":
|
|
717
|
+
return p(), g(s, C(a, {
|
|
718
|
+
modelValue: o.value,
|
|
719
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
|
|
720
720
|
onBlur: i
|
|
721
721
|
}), null, 16, ["modelValue"]);
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
|
-
}),
|
|
724
|
+
}), it = /* @__PURE__ */ y({
|
|
725
725
|
__name: "XPagination",
|
|
726
|
-
props: /* @__PURE__ */
|
|
726
|
+
props: /* @__PURE__ */ V({
|
|
727
727
|
sizes: { default: () => [20, 50, 100] },
|
|
728
728
|
pageSize: {},
|
|
729
729
|
defaultPageSize: {},
|
|
@@ -752,21 +752,21 @@ const Ke = /* @__PURE__ */ b({
|
|
|
752
752
|
current: {},
|
|
753
753
|
currentModifiers: {}
|
|
754
754
|
}),
|
|
755
|
-
emits: /* @__PURE__ */
|
|
755
|
+
emits: /* @__PURE__ */ V(["sizeChange", "currentChange"], ["update:size", "update:current"]),
|
|
756
756
|
setup(e, { emit: t }) {
|
|
757
|
-
const a = t, n =
|
|
758
|
-
return (r, i) => (
|
|
759
|
-
"current-page":
|
|
760
|
-
"onUpdate:currentPage": i[0] || (i[0] = (
|
|
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 }, {
|
|
759
|
+
"current-page": o.value,
|
|
760
|
+
"onUpdate:currentPage": i[0] || (i[0] = (l) => o.value = l),
|
|
761
761
|
"page-size": n.value,
|
|
762
|
-
"onUpdate:pageSize": i[1] || (i[1] = (
|
|
763
|
-
onSizeChange: i[2] || (i[2] = (
|
|
764
|
-
onCurrentChange: i[3] || (i[3] = (
|
|
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))
|
|
765
765
|
}), null, 16, ["current-page", "page-size"]));
|
|
766
766
|
}
|
|
767
|
-
}),
|
|
767
|
+
}), rt = /* @__PURE__ */ y({
|
|
768
768
|
__name: "XRate",
|
|
769
|
-
props: /* @__PURE__ */
|
|
769
|
+
props: /* @__PURE__ */ V({
|
|
770
770
|
ariaLabel: {},
|
|
771
771
|
id: {},
|
|
772
772
|
lowThreshold: {},
|
|
@@ -804,13 +804,13 @@ const Ke = /* @__PURE__ */ b({
|
|
|
804
804
|
}),
|
|
805
805
|
emits: ["update:modelValue"],
|
|
806
806
|
setup(e) {
|
|
807
|
-
const t = e, a =
|
|
808
|
-
return (n,
|
|
807
|
+
const t = e, a = x(e, "modelValue");
|
|
808
|
+
return (n, o) => (p(), g(B(Ee), C(t, {
|
|
809
809
|
modelValue: a.value,
|
|
810
|
-
"onUpdate:modelValue":
|
|
810
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => a.value = r)
|
|
811
811
|
}), null, 16, ["modelValue"]));
|
|
812
812
|
}
|
|
813
|
-
}),
|
|
813
|
+
}), dt = /* @__PURE__ */ y({
|
|
814
814
|
__name: "XReconfirm",
|
|
815
815
|
props: {
|
|
816
816
|
title: { default: "是否执行?" }
|
|
@@ -818,22 +818,22 @@ const Ke = /* @__PURE__ */ b({
|
|
|
818
818
|
emits: ["cancel", "confirm"],
|
|
819
819
|
setup(e, { emit: t }) {
|
|
820
820
|
const a = t;
|
|
821
|
-
return (n,
|
|
821
|
+
return (n, o) => {
|
|
822
822
|
const r = U("XButton");
|
|
823
|
-
return
|
|
823
|
+
return p(), g(B(Se), {
|
|
824
824
|
title: e.title,
|
|
825
|
-
onCancel:
|
|
826
|
-
onConfirm:
|
|
825
|
+
onCancel: o[0] || (o[0] = () => a("cancel")),
|
|
826
|
+
onConfirm: o[1] || (o[1] = () => a("confirm"))
|
|
827
827
|
}, {
|
|
828
|
-
reference:
|
|
828
|
+
reference: h(() => [
|
|
829
829
|
S(n.$slots, "default")
|
|
830
830
|
]),
|
|
831
|
-
actions:
|
|
831
|
+
actions: h(({ confirm: i, cancel: l }) => [
|
|
832
832
|
z(r, {
|
|
833
833
|
size: "small",
|
|
834
|
-
onClick:
|
|
834
|
+
onClick: l
|
|
835
835
|
}, {
|
|
836
|
-
default:
|
|
836
|
+
default: h(() => [...o[2] || (o[2] = [
|
|
837
837
|
j(" 取消 ", -1)
|
|
838
838
|
])]),
|
|
839
839
|
_: 1
|
|
@@ -843,7 +843,7 @@ const Ke = /* @__PURE__ */ b({
|
|
|
843
843
|
size: "small",
|
|
844
844
|
onClick: i
|
|
845
845
|
}, {
|
|
846
|
-
default:
|
|
846
|
+
default: h(() => [...o[3] || (o[3] = [
|
|
847
847
|
j(" 确定 ", -1)
|
|
848
848
|
])]),
|
|
849
849
|
_: 1
|
|
@@ -853,7 +853,7 @@ const Ke = /* @__PURE__ */ b({
|
|
|
853
853
|
}, 8, ["title"]);
|
|
854
854
|
};
|
|
855
855
|
}
|
|
856
|
-
}), ut = /* @__PURE__ */
|
|
856
|
+
}), ut = /* @__PURE__ */ y({
|
|
857
857
|
__name: "XScrollbar",
|
|
858
858
|
props: {
|
|
859
859
|
ariaLabel: {},
|
|
@@ -883,20 +883,20 @@ const Ke = /* @__PURE__ */ b({
|
|
|
883
883
|
setup(e, {
|
|
884
884
|
expose: t
|
|
885
885
|
}) {
|
|
886
|
-
const a = e, n = ee("scrollbar"),
|
|
886
|
+
const a = e, n = ee("scrollbar"), o = X(() => n.value?.wrapRef), r = X(() => o.value?.firstElementChild);
|
|
887
887
|
return t({
|
|
888
|
-
wrapRef:
|
|
888
|
+
wrapRef: o,
|
|
889
889
|
viewRef: r
|
|
890
|
-
}), (i,
|
|
890
|
+
}), (i, l) => (p(), g(B(ke), C({
|
|
891
891
|
ref: "scrollbar"
|
|
892
892
|
}, a), {
|
|
893
|
-
default:
|
|
893
|
+
default: h(() => [S(i.$slots, "default")]),
|
|
894
894
|
_: 3
|
|
895
895
|
}, 16));
|
|
896
896
|
}
|
|
897
|
-
}),
|
|
897
|
+
}), st = /* @__PURE__ */ y({
|
|
898
898
|
__name: "XSelect",
|
|
899
|
-
props: /* @__PURE__ */
|
|
899
|
+
props: /* @__PURE__ */ V({
|
|
900
900
|
data: {},
|
|
901
901
|
factory: {
|
|
902
902
|
type: Function
|
|
@@ -1001,56 +1001,56 @@ const Ke = /* @__PURE__ */ b({
|
|
|
1001
1001
|
modelValue: {},
|
|
1002
1002
|
modelModifiers: {}
|
|
1003
1003
|
}),
|
|
1004
|
-
emits: /* @__PURE__ */
|
|
1004
|
+
emits: /* @__PURE__ */ V(["blur", "change"], ["update:modelValue"]),
|
|
1005
1005
|
setup(e, {
|
|
1006
1006
|
emit: t
|
|
1007
1007
|
}) {
|
|
1008
|
-
const a = t, n =
|
|
1009
|
-
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") {
|
|
1010
1010
|
if (e.identify)
|
|
1011
|
-
return e.identify(
|
|
1011
|
+
return e.identify(b);
|
|
1012
1012
|
throw new Error("`identify` is required when value's type extends `object` or `object[]`");
|
|
1013
1013
|
} else
|
|
1014
|
-
return
|
|
1015
|
-
},
|
|
1014
|
+
return b;
|
|
1015
|
+
}, u = (b) => i.value.map((w) => w.value).find((w) => l(w) === b);
|
|
1016
1016
|
let s = 0;
|
|
1017
|
-
|
|
1017
|
+
K([n, r], async () => {
|
|
1018
1018
|
if (s++, n.value) {
|
|
1019
|
-
const
|
|
1020
|
-
|
|
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);
|
|
1021
1021
|
} else
|
|
1022
|
-
|
|
1022
|
+
o.value = [];
|
|
1023
1023
|
}, {
|
|
1024
1024
|
immediate: !0
|
|
1025
1025
|
});
|
|
1026
|
-
const c =
|
|
1027
|
-
const
|
|
1026
|
+
const c = X(() => i.value.map((b) => {
|
|
1027
|
+
const w = l(b.value);
|
|
1028
1028
|
return {
|
|
1029
|
-
...
|
|
1030
|
-
key:
|
|
1031
|
-
value:
|
|
1029
|
+
...b,
|
|
1030
|
+
key: w,
|
|
1031
|
+
value: w
|
|
1032
1032
|
};
|
|
1033
|
-
})),
|
|
1034
|
-
get: () => n.value && (Array.isArray(n.value) ? n.value.map(
|
|
1035
|
-
set: (
|
|
1036
|
-
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);
|
|
1037
1037
|
}
|
|
1038
|
-
}),
|
|
1039
|
-
if (
|
|
1038
|
+
}), T = f(k, void 0);
|
|
1039
|
+
if (T?.required) {
|
|
1040
1040
|
const {
|
|
1041
|
-
validator:
|
|
1042
|
-
label:
|
|
1043
|
-
} =
|
|
1044
|
-
|
|
1041
|
+
validator: b,
|
|
1042
|
+
label: w
|
|
1043
|
+
} = T;
|
|
1044
|
+
T.validator = () => !n.value || Array.isArray(n.value) && n.value.length === 0 ? `请选择${w}` : b?.();
|
|
1045
1045
|
}
|
|
1046
|
-
const E =
|
|
1047
|
-
|
|
1048
|
-
const N = (
|
|
1049
|
-
|
|
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");
|
|
1050
1050
|
};
|
|
1051
|
-
return (
|
|
1052
|
-
const
|
|
1053
|
-
return
|
|
1051
|
+
return (b, w) => {
|
|
1052
|
+
const F = U("ElOption"), q = U("ElSelect");
|
|
1053
|
+
return p(), g(q, C({
|
|
1054
1054
|
allowCreate: e.allowCreate,
|
|
1055
1055
|
clearable: e.clearable,
|
|
1056
1056
|
filterable: e.filterable,
|
|
@@ -1064,24 +1064,24 @@ const Ke = /* @__PURE__ */ b({
|
|
|
1064
1064
|
collapseTags: e.collapseTags,
|
|
1065
1065
|
collapseTagsTooltip: e.collapseTags
|
|
1066
1066
|
}, {
|
|
1067
|
-
modelValue:
|
|
1068
|
-
"onUpdate:modelValue":
|
|
1069
|
-
onBlur:
|
|
1067
|
+
modelValue: d.value,
|
|
1068
|
+
"onUpdate:modelValue": w[0] || (w[0] = (I) => d.value = I),
|
|
1069
|
+
onBlur: ie,
|
|
1070
1070
|
onChange: N
|
|
1071
1071
|
}), {
|
|
1072
|
-
default:
|
|
1072
|
+
default: h(() => [(p(!0), G(J, null, Z(c.value, (I) => (p(), g(F, {
|
|
1073
1073
|
key: I.key,
|
|
1074
1074
|
label: I.label,
|
|
1075
1075
|
value: I.value
|
|
1076
1076
|
}, {
|
|
1077
|
-
default:
|
|
1077
|
+
default: h(() => [j(me(I.label), 1)]),
|
|
1078
1078
|
_: 2
|
|
1079
1079
|
}, 1032, ["label", "value"]))), 128))]),
|
|
1080
1080
|
_: 1
|
|
1081
1081
|
}, 16, ["modelValue"]);
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
|
-
}),
|
|
1084
|
+
}), ct = /* @__PURE__ */ y({
|
|
1085
1085
|
__name: "XSpace",
|
|
1086
1086
|
props: {
|
|
1087
1087
|
direction: {},
|
|
@@ -1101,12 +1101,12 @@ const Ke = /* @__PURE__ */ b({
|
|
|
1101
1101
|
},
|
|
1102
1102
|
setup(e) {
|
|
1103
1103
|
const t = e;
|
|
1104
|
-
return (a, n) => (
|
|
1105
|
-
default:
|
|
1104
|
+
return (a, n) => (p(), g(B(Ie), O(M(t)), {
|
|
1105
|
+
default: h(() => [S(a.$slots, "default")]),
|
|
1106
1106
|
_: 3
|
|
1107
1107
|
}, 16));
|
|
1108
1108
|
}
|
|
1109
|
-
}),
|
|
1109
|
+
}), mt = /* @__PURE__ */ y({
|
|
1110
1110
|
__name: "XTable",
|
|
1111
1111
|
props: {
|
|
1112
1112
|
data: {},
|
|
@@ -1129,8 +1129,8 @@ const Ke = /* @__PURE__ */ b({
|
|
|
1129
1129
|
setup(e, {
|
|
1130
1130
|
emit: t
|
|
1131
1131
|
}) {
|
|
1132
|
-
const a = t, n = ee("container"),
|
|
1133
|
-
ref:
|
|
1132
|
+
const a = t, n = ee("container"), o = H(), r = Ge(n), i = X(() => e.height ?? r.height.value), l = () => z(ze, C({
|
|
1133
|
+
ref: o
|
|
1134
1134
|
}, {
|
|
1135
1135
|
data: e.data,
|
|
1136
1136
|
height: i.value,
|
|
@@ -1139,41 +1139,82 @@ const Ke = /* @__PURE__ */ b({
|
|
|
1139
1139
|
highlightCurrentRow: e.highlightCurrentRow,
|
|
1140
1140
|
spanMethod: e.spanMethod
|
|
1141
1141
|
}, {
|
|
1142
|
-
"onRow-click": (
|
|
1143
|
-
"onSelection-change": (
|
|
1144
|
-
"onHeader-dragend": (
|
|
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)
|
|
1145
1145
|
}), {
|
|
1146
|
-
default: () => e.columns.map((
|
|
1146
|
+
default: () => e.columns.map((u) => z(Pe, u, {
|
|
1147
1147
|
default: ({
|
|
1148
1148
|
$index: s,
|
|
1149
1149
|
row: c
|
|
1150
|
-
}) =>
|
|
1150
|
+
}) => u.content?.({
|
|
1151
1151
|
index: s,
|
|
1152
1152
|
row: c
|
|
1153
1153
|
}),
|
|
1154
|
-
header: () =>
|
|
1155
|
-
column:
|
|
1156
|
-
}) ??
|
|
1154
|
+
header: () => u.header?.({
|
|
1155
|
+
column: u
|
|
1156
|
+
}) ?? u.label
|
|
1157
1157
|
}))
|
|
1158
1158
|
});
|
|
1159
|
-
return (
|
|
1159
|
+
return (u, s) => (p(), G("div", {
|
|
1160
1160
|
ref_key: "container",
|
|
1161
1161
|
ref: n,
|
|
1162
1162
|
class: fe([e.height === void 0 && "h-full"])
|
|
1163
|
-
}, [z(
|
|
1163
|
+
}, [z(l)], 2));
|
|
1164
1164
|
}
|
|
1165
|
-
}), ft = /* @__PURE__ */
|
|
1165
|
+
}), ft = /* @__PURE__ */ y((e, {
|
|
1166
1166
|
slots: t
|
|
1167
1167
|
}) => {
|
|
1168
1168
|
const a = {
|
|
1169
1169
|
...e
|
|
1170
1170
|
};
|
|
1171
|
-
return
|
|
1171
|
+
return f(le, void 0)?.push(a), A(oe, a), () => z(Ae, e, {
|
|
1172
1172
|
...t
|
|
1173
1173
|
});
|
|
1174
1174
|
}, {
|
|
1175
1175
|
props: ["label", "name", "closable", "lazy", "disabled"]
|
|
1176
|
-
}),
|
|
1176
|
+
}), pt = /* @__PURE__ */ y({
|
|
1177
|
+
__name: "XTabs",
|
|
1178
|
+
props: /* @__PURE__ */ V({
|
|
1179
|
+
type: {},
|
|
1180
|
+
defaultValue: {},
|
|
1181
|
+
addable: {
|
|
1182
|
+
type: Boolean,
|
|
1183
|
+
default: () => {
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
editable: {
|
|
1187
|
+
type: Boolean,
|
|
1188
|
+
default: () => {
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
tabPosition: {}
|
|
1192
|
+
}, {
|
|
1193
|
+
modelValue: {},
|
|
1194
|
+
modelModifiers: {}
|
|
1195
|
+
}),
|
|
1196
|
+
emits: /* @__PURE__ */ V(["tabChange", "tabRemove"], ["update:modelValue"]),
|
|
1197
|
+
setup(e, {
|
|
1198
|
+
emit: t
|
|
1199
|
+
}) {
|
|
1200
|
+
const a = t, n = x(e, "modelValue");
|
|
1201
|
+
return A(le, []), (r, i) => (p(), g(B($e), C({
|
|
1202
|
+
addable: e.addable,
|
|
1203
|
+
editable: e.editable,
|
|
1204
|
+
type: e.type,
|
|
1205
|
+
defaultValue: e.defaultValue,
|
|
1206
|
+
tabPosition: e.tabPosition
|
|
1207
|
+
}, {
|
|
1208
|
+
modelValue: n.value,
|
|
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))
|
|
1212
|
+
}), {
|
|
1213
|
+
default: h(() => [S(r.$slots, "default")]),
|
|
1214
|
+
_: 3
|
|
1215
|
+
}, 16, ["modelValue"]));
|
|
1216
|
+
}
|
|
1217
|
+
}), bt = /* @__PURE__ */ y({
|
|
1177
1218
|
__name: "XTag",
|
|
1178
1219
|
props: {
|
|
1179
1220
|
type: {},
|
|
@@ -1185,16 +1226,16 @@ const Ke = /* @__PURE__ */ b({
|
|
|
1185
1226
|
},
|
|
1186
1227
|
emits: ["close"],
|
|
1187
1228
|
setup(e) {
|
|
1188
|
-
return (t, a) => (
|
|
1229
|
+
return (t, a) => (p(), g(B(Oe), C({ type: e.type, color: e.color, closable: e.closable, round: e.round }, {
|
|
1189
1230
|
onClose: a[0] || (a[0] = (n) => t.$emit("close"))
|
|
1190
1231
|
}), {
|
|
1191
|
-
default:
|
|
1232
|
+
default: h(() => [
|
|
1192
1233
|
S(t.$slots, "default")
|
|
1193
1234
|
]),
|
|
1194
1235
|
_: 3
|
|
1195
1236
|
}, 16));
|
|
1196
1237
|
}
|
|
1197
|
-
}),
|
|
1238
|
+
}), vt = /* @__PURE__ */ y({
|
|
1198
1239
|
__name: "XText",
|
|
1199
1240
|
props: {
|
|
1200
1241
|
type: {},
|
|
@@ -1203,16 +1244,16 @@ const Ke = /* @__PURE__ */ b({
|
|
|
1203
1244
|
} }
|
|
1204
1245
|
},
|
|
1205
1246
|
setup(e) {
|
|
1206
|
-
return (t, a) => (
|
|
1207
|
-
default:
|
|
1247
|
+
return (t, a) => (p(), g(B(Me), O(M({ type: e.type, size: e.size, truncated: e.truncated })), {
|
|
1248
|
+
default: h(() => [
|
|
1208
1249
|
S(t.$slots, "default")
|
|
1209
1250
|
]),
|
|
1210
1251
|
_: 3
|
|
1211
1252
|
}, 16));
|
|
1212
1253
|
}
|
|
1213
|
-
}),
|
|
1254
|
+
}), yt = /* @__PURE__ */ y({
|
|
1214
1255
|
__name: "XUpload",
|
|
1215
|
-
props: /* @__PURE__ */
|
|
1256
|
+
props: /* @__PURE__ */ V({
|
|
1216
1257
|
action: {},
|
|
1217
1258
|
data: {
|
|
1218
1259
|
type: Function
|
|
@@ -1244,102 +1285,104 @@ const Ke = /* @__PURE__ */ b({
|
|
|
1244
1285
|
}),
|
|
1245
1286
|
emits: ["update:modelValue"],
|
|
1246
1287
|
setup(e) {
|
|
1247
|
-
const t =
|
|
1248
|
-
name:
|
|
1249
|
-
url:
|
|
1250
|
-
uid: Number(
|
|
1251
|
-
}))), 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);
|
|
1252
1293
|
if (n?.required) {
|
|
1253
1294
|
const {
|
|
1254
|
-
validator:
|
|
1255
|
-
label:
|
|
1295
|
+
validator: l,
|
|
1296
|
+
label: u
|
|
1256
1297
|
} = n;
|
|
1257
|
-
n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${
|
|
1298
|
+
n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${u}` : l?.();
|
|
1258
1299
|
}
|
|
1259
|
-
const
|
|
1260
|
-
t.value = Array.isArray(t.value) ?
|
|
1300
|
+
const o = (l) => (l.size > e.maxSize && te.warning("文件过大,请重新选择"), l.size < e.maxSize), r = (l) => window.open(l.url), i = (l, u) => {
|
|
1301
|
+
t.value = Array.isArray(t.value) ? u.map((s) => s.url) : void 0;
|
|
1261
1302
|
};
|
|
1262
|
-
return (
|
|
1303
|
+
return (l, u) => (p(), g(B(Re), O(M({
|
|
1263
1304
|
limit: e.limit,
|
|
1264
1305
|
disabled: e.disabled,
|
|
1265
1306
|
data: e.data,
|
|
1266
1307
|
maxSize: e.maxSize,
|
|
1267
1308
|
showFileList: e.showFileList,
|
|
1268
1309
|
fileList: a.value,
|
|
1269
|
-
beforeUpload:
|
|
1310
|
+
beforeUpload: o,
|
|
1270
1311
|
onPreview: r,
|
|
1271
1312
|
onRemove: i
|
|
1272
1313
|
})), {
|
|
1273
|
-
file:
|
|
1314
|
+
file: h(({
|
|
1274
1315
|
file: s
|
|
1275
|
-
}) => [S(
|
|
1316
|
+
}) => [S(l.$slots, "file", {
|
|
1276
1317
|
file: s
|
|
1277
1318
|
})]),
|
|
1278
|
-
default:
|
|
1319
|
+
default: h(() => [S(l.$slots, "default")]),
|
|
1279
1320
|
_: 3
|
|
1280
1321
|
}, 16));
|
|
1281
1322
|
}
|
|
1282
|
-
}),
|
|
1323
|
+
}), gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1283
1324
|
__proto__: null,
|
|
1284
|
-
XButton:
|
|
1285
|
-
XCascader:
|
|
1286
|
-
XCheckbox:
|
|
1287
|
-
XColorPicker:
|
|
1288
|
-
XDatePicker:
|
|
1289
|
-
XDialog:
|
|
1290
|
-
XDivider:
|
|
1291
|
-
XForm:
|
|
1292
|
-
XFormItem:
|
|
1293
|
-
XImage:
|
|
1294
|
-
XInput:
|
|
1295
|
-
XInputNumber:
|
|
1296
|
-
XPagination:
|
|
1297
|
-
XRate:
|
|
1298
|
-
XReconfirm:
|
|
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,
|
|
1299
1340
|
XScrollbar: ut,
|
|
1300
|
-
XSelect:
|
|
1301
|
-
XSpace:
|
|
1341
|
+
XSelect: st,
|
|
1342
|
+
XSpace: ct,
|
|
1302
1343
|
XTabPane: ft,
|
|
1303
|
-
XTable:
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1344
|
+
XTable: mt,
|
|
1345
|
+
XTabs: pt,
|
|
1346
|
+
XTag: bt,
|
|
1347
|
+
XText: vt,
|
|
1348
|
+
XUpload: yt
|
|
1349
|
+
}, Symbol.toStringTag, { value: "Module" })), wt = {
|
|
1308
1350
|
install(e) {
|
|
1309
|
-
Object.entries(
|
|
1351
|
+
Object.entries(gt).forEach(([t, a]) => e.component(t, a));
|
|
1310
1352
|
}
|
|
1311
1353
|
};
|
|
1312
1354
|
export {
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1355
|
+
De as XButton,
|
|
1356
|
+
Le as XCascader,
|
|
1357
|
+
Ye as XCheckbox,
|
|
1358
|
+
_e as XColorPicker,
|
|
1359
|
+
Je as XDatePicker,
|
|
1360
|
+
Ze as XDialog,
|
|
1361
|
+
et as XDivider,
|
|
1362
|
+
at as XForm,
|
|
1363
|
+
tt as XFormItem,
|
|
1364
|
+
lt as XImage,
|
|
1365
|
+
ot as XInput,
|
|
1366
|
+
nt as XInputNumber,
|
|
1367
|
+
it as XPagination,
|
|
1368
|
+
rt as XRate,
|
|
1369
|
+
dt as XReconfirm,
|
|
1328
1370
|
ut as XScrollbar,
|
|
1329
|
-
|
|
1330
|
-
|
|
1371
|
+
st as XSelect,
|
|
1372
|
+
ct as XSpace,
|
|
1331
1373
|
ft as XTabPane,
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
vt as
|
|
1336
|
-
|
|
1374
|
+
mt as XTable,
|
|
1375
|
+
pt as XTabs,
|
|
1376
|
+
bt as XTag,
|
|
1377
|
+
vt as XText,
|
|
1378
|
+
yt as XUpload,
|
|
1379
|
+
$ as X_FORM_ITEM_LABEL,
|
|
1337
1380
|
k as X_FORM_ITEM_VALIDATION,
|
|
1338
|
-
|
|
1381
|
+
Fe as X_FORM_TAB_UPDATE_HOOK,
|
|
1339
1382
|
ae as X_FORM_VALIDATIONS,
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
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
|
|
1345
1388
|
};
|
package/package.json
CHANGED