@pungfe/element 0.5.9 → 0.6.2
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/advance-D6B-C4Hp.cjs +1 -0
- package/dist/{advance-CQmhQvAA.js → advance-_v6DUKbJ.js} +14 -11
- package/dist/advance.cjs +1 -1
- package/dist/advance.js +1 -1
- package/dist/basic-Cr2tjyfU.cjs +1 -0
- package/dist/{basic-C9hScn7S.js → basic-DxvTjPBA.js} +171 -158
- package/dist/basic.cjs +1 -1
- package/dist/basic.js +1 -1
- package/dist/components/basic/Pagination.vue.d.ts +6 -6
- package/dist/composables/useFormValidation.d.ts +1 -0
- package/dist/composables/useXConfig.d.ts +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/package.json.d.ts +15 -14
- package/dist/style.css +1 -1
- package/package.json +18 -19
- package/dist/advance-CplHk8O4.cjs +0 -1
- package/dist/basic-B9QKaeaZ.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./locales-C0-S9TeD.js";
|
|
2
|
-
import { ElButton as t, ElCascader as n, ElCheckbox as r, ElConfigProvider as i, ElDatePicker as a, ElDialog as o, ElForm as s, ElFormItem as c, ElInput as l, ElInputNumber as u, ElOption as
|
|
3
|
-
import { Fragment as
|
|
2
|
+
import { ElButton as t, ElCascader as n, ElCheckbox as r, ElConfigProvider as i, ElDatePicker as a, ElDialog as o, ElForm as s, ElFormItem as c, ElInput as l, ElInputNumber as u, ElOption as d, ElPagination as ee, ElSelect as te, ElTabPane as f, ElTable as p, ElTableColumn as ne, ElTabs as m, ElUpload as h, useLocale as g } from "element-plus";
|
|
3
|
+
import { Fragment as _, computed as v, createBlock as y, createElementBlock as re, createSlots as b, createVNode as x, defineComponent as S, getCurrentInstance as ie, getCurrentScope as ae, guardReactiveProps as C, inject as w, mergeModels as T, mergeProps as E, nextTick as oe, normalizeProps as D, onMounted as O, onScopeDispose as se, onUnmounted as ce, openBlock as k, provide as A, ref as j, renderList as M, renderSlot as N, shallowRef as P, toValue as F, unref as I, useId as le, useModel as L, useTemplateRef as R, watch as z, withCtx as B, withModifiers as ue } from "vue";
|
|
4
4
|
//#region \0rolldown/runtime.js
|
|
5
5
|
var V = Object.defineProperty, H = (e, t) => {
|
|
6
6
|
let n = {};
|
|
@@ -66,7 +66,7 @@ function me(e) {
|
|
|
66
66
|
return Array.isArray(e) ? e : [e];
|
|
67
67
|
}
|
|
68
68
|
function he(e) {
|
|
69
|
-
return e ||
|
|
69
|
+
return e || ie();
|
|
70
70
|
}
|
|
71
71
|
function ge(e, t = 200, n = {}) {
|
|
72
72
|
return fe(pe(t, n), e);
|
|
@@ -75,34 +75,41 @@ function K(e, t = !0, n) {
|
|
|
75
75
|
he(n) ? O(e, n) : t ? e() : oe(e);
|
|
76
76
|
}
|
|
77
77
|
function _e(e, t) {
|
|
78
|
-
return
|
|
78
|
+
return v(() => F(e).map((e) => F(e)).filter(t));
|
|
79
79
|
}
|
|
80
80
|
function q(e, t) {
|
|
81
|
-
return
|
|
81
|
+
return v(() => F(e).map((e) => F(e)).map(t));
|
|
82
82
|
}
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.38_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
85
|
-
|
|
85
|
+
function ve(e, t, n, r) {
|
|
86
|
+
let i = w(e);
|
|
87
|
+
return n && (i = w(e, n)), r && (i = w(e, n, r)), v(typeof t == "function" ? (e) => t(i, e) : {
|
|
88
|
+
get: (e) => t.get(i, e),
|
|
89
|
+
set: t.set
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
var J = W ? window : void 0, ye = W ? window.document : void 0;
|
|
86
93
|
W && window.navigator, W && window.location;
|
|
87
94
|
function Y(e) {
|
|
88
95
|
let t = F(e);
|
|
89
96
|
return t?.$el ?? t;
|
|
90
97
|
}
|
|
91
|
-
function
|
|
92
|
-
let e = P(!1), t =
|
|
98
|
+
function be() {
|
|
99
|
+
let e = P(!1), t = ie();
|
|
93
100
|
return t && O(() => {
|
|
94
101
|
e.value = !0;
|
|
95
102
|
}, t), e;
|
|
96
103
|
}
|
|
97
104
|
/* @__NO_SIDE_EFFECTS__ */
|
|
98
|
-
function
|
|
99
|
-
let t =
|
|
100
|
-
return
|
|
105
|
+
function xe(e) {
|
|
106
|
+
let t = be();
|
|
107
|
+
return v(() => (t.value, !!e()));
|
|
101
108
|
}
|
|
102
|
-
function
|
|
103
|
-
let { window: r = J, ...i } = n, a, o = /* @__PURE__ */
|
|
109
|
+
function Se(e, t, n = {}) {
|
|
110
|
+
let { window: r = J, ...i } = n, a, o = /* @__PURE__ */ xe(() => r && "ResizeObserver" in r), s = () => {
|
|
104
111
|
a &&= (a.disconnect(), void 0);
|
|
105
|
-
}, c = z(
|
|
112
|
+
}, c = z(v(() => {
|
|
106
113
|
let t = F(e);
|
|
107
114
|
return Array.isArray(t) ? t.map((e) => Y(e)) : [Y(t)];
|
|
108
115
|
}), (e) => {
|
|
@@ -121,14 +128,14 @@ function xe(e, t, n = {}) {
|
|
|
121
128
|
stop: l
|
|
122
129
|
};
|
|
123
130
|
}
|
|
124
|
-
function
|
|
131
|
+
function Ce(e, t = {
|
|
125
132
|
width: 0,
|
|
126
133
|
height: 0
|
|
127
134
|
}, n = {}) {
|
|
128
|
-
let { window: r = J, box: i = "content-box" } = n, a =
|
|
135
|
+
let { window: r = J, box: i = "content-box" } = n, a = v(() => {
|
|
129
136
|
var t;
|
|
130
137
|
return (t = Y(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
|
|
131
|
-
}), o = P(t.width), s = P(t.height), { stop: c } =
|
|
138
|
+
}), o = P(t.width), s = P(t.height), { stop: c } = Se(e, ([t]) => {
|
|
132
139
|
let n = i === "border-box" ? t.borderBoxSize : i === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
133
140
|
if (r && a.value) {
|
|
134
141
|
let t = Y(e);
|
|
@@ -159,7 +166,7 @@ function Se(e, t = {
|
|
|
159
166
|
}
|
|
160
167
|
//#endregion
|
|
161
168
|
//#region src/components/basic/Button.vue
|
|
162
|
-
var
|
|
169
|
+
var we = /* @__PURE__ */ S({
|
|
163
170
|
__name: "Button",
|
|
164
171
|
props: {
|
|
165
172
|
disabled: {
|
|
@@ -176,21 +183,20 @@ var Ce = /* @__PURE__ */ x({
|
|
|
176
183
|
type: {}
|
|
177
184
|
},
|
|
178
185
|
emits: ["click"],
|
|
179
|
-
setup(e
|
|
180
|
-
|
|
181
|
-
return (n, i) => (k(), v(I(t), E({
|
|
186
|
+
setup(e) {
|
|
187
|
+
return (n, r) => (k(), y(I(t), E({
|
|
182
188
|
type: e.type,
|
|
183
189
|
text: e.text,
|
|
184
190
|
link: e.link,
|
|
185
191
|
disabled: e.disabled,
|
|
186
192
|
size: e.size,
|
|
187
193
|
icon: e.icon
|
|
188
|
-
}, { onClick:
|
|
194
|
+
}, { onClick: r[0] ||= (e) => n.$emit("click", e) }), {
|
|
189
195
|
default: B(() => [N(n.$slots, "default")]),
|
|
190
196
|
_: 3
|
|
191
197
|
}, 16));
|
|
192
198
|
}
|
|
193
|
-
}), X = Symbol("X_LOCALE_CONFIG"),
|
|
199
|
+
}), X = Symbol("X_LOCALE_CONFIG"), Te = Symbol("X_ELEMENT_CONFIG"), Ee = Symbol("X_ELEMENT_INSTALLED"), De = Symbol("X_ELEMENT_IN_TABLE"), Oe = Symbol("X_ELEMENT_IN_FORM"), ke = Symbol("X_ELEMENT_IN_TABS"), Ae = Symbol("X_ELEMENT_IN_TAB_PANE"), je = Symbol("X_FORM_VALIDATIONS"), Z = Symbol("X_FORM_ITEM_VALIDATION"), Me = Symbol("X_TAB_PANE"), Ne = Symbol("X_TABS_MODEL_UPDATE_HOOK"), Pe = /* @__PURE__ */ S({
|
|
194
200
|
__name: "Cascader",
|
|
195
201
|
props: /*@__PURE__*/ T({
|
|
196
202
|
clearable: { type: Boolean },
|
|
@@ -210,17 +216,15 @@ var Ce = /* @__PURE__ */ x({
|
|
|
210
216
|
}),
|
|
211
217
|
emits: ["update:modelValue"],
|
|
212
218
|
setup(e) {
|
|
213
|
-
let { t } =
|
|
214
|
-
get: () =>
|
|
215
|
-
set: (e) =>
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
}), o = w(Q, void 0);
|
|
219
|
+
let t = L(e, "modelValue"), { t: r } = g(w(X)), i = v(() => e.data ?? []), a = v({
|
|
220
|
+
get: () => t.value,
|
|
221
|
+
set: (e) => t.value = e
|
|
222
|
+
}), o = w(Z, void 0);
|
|
219
223
|
if (o?.required) {
|
|
220
224
|
let { label: e, validator: n } = o;
|
|
221
|
-
o.validator = () => e && (!
|
|
225
|
+
o.validator = () => e && (!t.value || Array.isArray(t.value) && t.value.length === 0) ? r("el.validation.cascader", { label: e }) : n?.();
|
|
222
226
|
}
|
|
223
|
-
return (
|
|
227
|
+
return (t, o) => (k(), y(I(n), E({
|
|
224
228
|
modelValue: a.value,
|
|
225
229
|
"onUpdate:modelValue": o[0] ||= (e) => a.value = e
|
|
226
230
|
}, {
|
|
@@ -230,10 +234,10 @@ var Ce = /* @__PURE__ */ x({
|
|
|
230
234
|
size: e.size,
|
|
231
235
|
options: i.value,
|
|
232
236
|
props: e.props,
|
|
233
|
-
placeholder: e.placeholder ?? I(
|
|
237
|
+
placeholder: e.placeholder ?? I(r)("el.select.placeholder")
|
|
234
238
|
}), null, 16, ["modelValue"]));
|
|
235
239
|
}
|
|
236
|
-
}),
|
|
240
|
+
}), Fe = /* @__PURE__ */ S({
|
|
237
241
|
__name: "Checkbox",
|
|
238
242
|
props: /*@__PURE__*/ T({
|
|
239
243
|
disabled: {
|
|
@@ -259,27 +263,35 @@ var Ce = /* @__PURE__ */ x({
|
|
|
259
263
|
}),
|
|
260
264
|
emits: /*@__PURE__*/ T(["blur", "focus"], ["update:modelValue"]),
|
|
261
265
|
setup(e) {
|
|
262
|
-
let t = L(e, "modelValue"), { t: n } =
|
|
266
|
+
let t = L(e, "modelValue"), { t: n } = g(w(X)), i = w(Z, void 0);
|
|
263
267
|
if (i?.required) {
|
|
264
268
|
let { label: e, validator: r } = i;
|
|
265
269
|
i.validator = () => e && !t.value ? n("el.validation.input", { label: e }) : r?.();
|
|
266
270
|
}
|
|
267
|
-
return (n, i) => (k(),
|
|
271
|
+
return (n, i) => (k(), y(I(r), E({ disabled: e.disabled }, {
|
|
268
272
|
modelValue: t.value,
|
|
269
273
|
"onUpdate:modelValue": i[0] ||= (e) => t.value = e
|
|
270
274
|
}), null, 16, ["modelValue"]));
|
|
271
275
|
}
|
|
272
|
-
}),
|
|
276
|
+
}), Ie = /* @__PURE__ */ S({
|
|
273
277
|
__name: "ConfigProvider",
|
|
274
278
|
props: { locale: {} },
|
|
275
279
|
setup(t) {
|
|
276
|
-
let n =
|
|
277
|
-
return A(X, n), (e, t) => (k(),
|
|
280
|
+
let n = v(() => t.locale ?? e);
|
|
281
|
+
return A(X, n), (e, t) => (k(), y(I(i), { locale: n.value }, {
|
|
278
282
|
default: B(() => [N(e.$slots, "default")]),
|
|
279
283
|
_: 3
|
|
280
284
|
}, 8, ["locale"]));
|
|
281
285
|
}
|
|
282
|
-
}),
|
|
286
|
+
}), Le = {
|
|
287
|
+
button: { autoInsertSpace: !1 },
|
|
288
|
+
datePicker: { valueFormat: "YYYY-MM-DD" },
|
|
289
|
+
pagination: {
|
|
290
|
+
defaultPageSize: 20,
|
|
291
|
+
layout: "prev, pager, next, sizes, jumper, ->, total"
|
|
292
|
+
},
|
|
293
|
+
table: { showOverflowTooltip: !1 }
|
|
294
|
+
}, Q = (e) => ve(Te, (t) => t[e], Le), Re = /* @__PURE__ */ S({
|
|
283
295
|
__name: "DatePicker",
|
|
284
296
|
props: /*@__PURE__*/ T({
|
|
285
297
|
disabled: {
|
|
@@ -312,37 +324,38 @@ var Ce = /* @__PURE__ */ x({
|
|
|
312
324
|
"update:end"
|
|
313
325
|
]),
|
|
314
326
|
setup(e) {
|
|
315
|
-
let t = L(e, "modelValue"), n = L(e, "start"), r = L(e, "end"),
|
|
327
|
+
let t = L(e, "modelValue"), n = L(e, "start"), r = L(e, "end"), { t: i } = g(w(X, void 0)), o = v({
|
|
316
328
|
get() {
|
|
317
329
|
return e.type.includes("range") && n.value && r.value ? [n.value, r.value] : e.type.includes("range") ? null : t.value;
|
|
318
330
|
},
|
|
319
331
|
set(i) {
|
|
320
|
-
e.type.includes("range") && Array.isArray(i) ? (n.value = i
|
|
332
|
+
e.type.includes("range") && Array.isArray(i) ? (n.value = i[0], r.value = i[1]) : t.value = i;
|
|
321
333
|
}
|
|
322
|
-
}),
|
|
323
|
-
if (
|
|
324
|
-
let { label:
|
|
325
|
-
|
|
334
|
+
}), s = w(Z, void 0);
|
|
335
|
+
if (s?.required) {
|
|
336
|
+
let { label: a, validator: o } = s;
|
|
337
|
+
s.validator = () => a && e.type.includes("range") && (!n.value || !r.value) || a && !e.type.includes("range") && !t.value ? i("el.validation.datepicker", { label: a }) : o?.();
|
|
326
338
|
}
|
|
327
|
-
|
|
339
|
+
let c = Q("datePicker"), l = v(() => e.valueFormat ?? c.value?.valueFormat);
|
|
340
|
+
return (t, n) => (k(), y(I(a), E({
|
|
328
341
|
disabled: e.disabled,
|
|
329
342
|
disabledDate: e.disabledDate,
|
|
330
343
|
type: e.type,
|
|
331
|
-
valueFormat:
|
|
332
|
-
placeholder: e.placeholder ?? I(
|
|
333
|
-
startPlaceholder: e.startPlaceholder ?? e.placeholder ?? I(
|
|
334
|
-
endPlaceholder: e.endPlaceholder ?? e.placeholder ?? I(
|
|
344
|
+
valueFormat: l.value,
|
|
345
|
+
placeholder: e.placeholder ?? I(i)("el.datepicker.placeholder"),
|
|
346
|
+
startPlaceholder: e.startPlaceholder ?? e.placeholder ?? I(i)("el.datepicker.startPlaceholder"),
|
|
347
|
+
endPlaceholder: e.endPlaceholder ?? e.placeholder ?? I(i)("el.datepicker.endPlaceholder"),
|
|
335
348
|
shortcuts: e.shortcuts,
|
|
336
349
|
size: e.size,
|
|
337
350
|
teleported: e.teleported
|
|
338
351
|
}, {
|
|
339
|
-
modelValue:
|
|
340
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
352
|
+
modelValue: o.value,
|
|
353
|
+
"onUpdate:modelValue": n[0] ||= (e) => o.value = e,
|
|
341
354
|
onBlur: n[1] ||= (e) => t.$emit("blur", e),
|
|
342
355
|
onFocus: n[2] ||= (e) => t.$emit("focus", e)
|
|
343
356
|
}), null, 16, ["modelValue"]));
|
|
344
357
|
}
|
|
345
|
-
}),
|
|
358
|
+
}), ze = /* @__PURE__ */ S({
|
|
346
359
|
__name: "Dialog",
|
|
347
360
|
props: /*@__PURE__*/ T({
|
|
348
361
|
alignCenter: { type: Boolean },
|
|
@@ -370,7 +383,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
370
383
|
emits: ["update:modelValue"],
|
|
371
384
|
setup(e) {
|
|
372
385
|
let t = L(e, "modelValue");
|
|
373
|
-
return (n, r) => (k(),
|
|
386
|
+
return (n, r) => (k(), y(I(o), E({
|
|
374
387
|
modelValue: t.value,
|
|
375
388
|
"onUpdate:modelValue": r[0] ||= (e) => t.value = e
|
|
376
389
|
}, {
|
|
@@ -383,7 +396,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
383
396
|
draggable: e.draggable,
|
|
384
397
|
closeOnClickModal: e.closeOnClickModal,
|
|
385
398
|
closeOnPressEscape: e.closeOnPressEscape
|
|
386
|
-
}),
|
|
399
|
+
}), b({
|
|
387
400
|
default: B(() => [N(n.$slots, "default")]),
|
|
388
401
|
_: 2
|
|
389
402
|
}, ["header" in n.$slots ? {
|
|
@@ -396,7 +409,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
396
409
|
key: "1"
|
|
397
410
|
} : void 0]), 1040, ["modelValue"]));
|
|
398
411
|
}
|
|
399
|
-
}),
|
|
412
|
+
}), Be = /* @__PURE__ */ S({
|
|
400
413
|
__name: "Form",
|
|
401
414
|
props: {
|
|
402
415
|
content: { type: Function },
|
|
@@ -413,9 +426,9 @@ var Ce = /* @__PURE__ */ x({
|
|
|
413
426
|
},
|
|
414
427
|
setup(e, { expose: t }) {
|
|
415
428
|
let n = R("form"), r = () => e.content?.({ data: e.data ?? {} });
|
|
416
|
-
A(
|
|
429
|
+
A(Oe, !0);
|
|
417
430
|
let i = [];
|
|
418
|
-
A(
|
|
431
|
+
A(je, i);
|
|
419
432
|
let a = () => i.every((e) => e.validate()), o = () => i.forEach((e) => e.clearValidate());
|
|
420
433
|
return t({
|
|
421
434
|
clearValidate: o,
|
|
@@ -424,7 +437,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
424
437
|
o(), n.value?.resetFields();
|
|
425
438
|
},
|
|
426
439
|
validate: a
|
|
427
|
-
}), (t, i) => (k(),
|
|
440
|
+
}), (t, i) => (k(), y(I(s), E({
|
|
428
441
|
ref_key: "form",
|
|
429
442
|
ref: n
|
|
430
443
|
}, {
|
|
@@ -436,11 +449,11 @@ var Ce = /* @__PURE__ */ x({
|
|
|
436
449
|
labelSuffix: e.labelSuffix,
|
|
437
450
|
size: e.size
|
|
438
451
|
}, { onSubmit: i[0] ||= ue(() => {}, ["prevent"]) }), {
|
|
439
|
-
default: B(() => [
|
|
452
|
+
default: B(() => [x(r)]),
|
|
440
453
|
_: 1
|
|
441
454
|
}, 16));
|
|
442
455
|
}
|
|
443
|
-
}),
|
|
456
|
+
}), Ve = /* @__PURE__ */ S({
|
|
444
457
|
__name: "FormItem",
|
|
445
458
|
props: {
|
|
446
459
|
content: { type: Function },
|
|
@@ -449,7 +462,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
449
462
|
validator: { type: Function }
|
|
450
463
|
},
|
|
451
464
|
setup(e) {
|
|
452
|
-
let t = w(
|
|
465
|
+
let t = w(je, void 0), n = w(ke, void 0), r = w(Ae, void 0), i = w(Me, void 0), a = w(Ne, void 0), o = j(), s = le(), l = {
|
|
453
466
|
clearValidate: () => o.value = void 0,
|
|
454
467
|
id: s,
|
|
455
468
|
label: e.label,
|
|
@@ -457,19 +470,19 @@ var Ce = /* @__PURE__ */ x({
|
|
|
457
470
|
validate: () => (o.value = l.validator?.() ?? void 0, o.value && n && r && i && a?.trigger(i), !o.value),
|
|
458
471
|
validator: e.validator
|
|
459
472
|
};
|
|
460
|
-
A(
|
|
473
|
+
A(Z, l), O(() => {
|
|
461
474
|
t?.some((e) => e.id === s) || t?.push(l);
|
|
462
475
|
}), ce(() => {
|
|
463
476
|
let e = t?.findIndex((e) => e.id === s);
|
|
464
477
|
e && e > -1 && t?.splice(e, 1);
|
|
465
478
|
});
|
|
466
479
|
let u = () => e.content?.();
|
|
467
|
-
return (t, n) => (k(),
|
|
480
|
+
return (t, n) => (k(), y(I(c), {
|
|
468
481
|
label: e.label,
|
|
469
482
|
required: e.required,
|
|
470
483
|
error: o.value
|
|
471
|
-
},
|
|
472
|
-
default: B(() => [N(t.$slots, "default", {}, () => [
|
|
484
|
+
}, b({
|
|
485
|
+
default: B(() => [N(t.$slots, "default", {}, () => [x(u)])]),
|
|
473
486
|
_: 2
|
|
474
487
|
}, ["label" in t.$slots ? {
|
|
475
488
|
name: "label",
|
|
@@ -481,7 +494,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
481
494
|
"error"
|
|
482
495
|
]));
|
|
483
496
|
}
|
|
484
|
-
}),
|
|
497
|
+
}), $ = /* @__PURE__ */ S({
|
|
485
498
|
__name: "Input",
|
|
486
499
|
props: /*@__PURE__*/ T({
|
|
487
500
|
autocomplete: {},
|
|
@@ -507,7 +520,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
507
520
|
"focus"
|
|
508
521
|
], ["update:modelValue"]),
|
|
509
522
|
setup(e, { emit: t }) {
|
|
510
|
-
let n = t, r = L(e, "modelValue"), { t: i } =
|
|
523
|
+
let n = t, r = L(e, "modelValue"), { t: i } = g(w(X, void 0)), a = w(Z, void 0);
|
|
511
524
|
if (a?.required) {
|
|
512
525
|
let { label: e, validator: t } = a;
|
|
513
526
|
a.validator = () => e && !r.value ? i("el.validation.input", { label: e }) : t?.();
|
|
@@ -519,7 +532,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
519
532
|
}, c = (e) => {
|
|
520
533
|
n("change", e);
|
|
521
534
|
};
|
|
522
|
-
return (t, n) => (k(),
|
|
535
|
+
return (t, n) => (k(), y(I(l), E({
|
|
523
536
|
disabled: e.disabled,
|
|
524
537
|
type: e.type,
|
|
525
538
|
size: e.size,
|
|
@@ -534,7 +547,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
534
547
|
onBlur: o,
|
|
535
548
|
onFocus: s,
|
|
536
549
|
onChange: c
|
|
537
|
-
}),
|
|
550
|
+
}), b({ _: 2 }, [
|
|
538
551
|
"append" in t.$slots ? {
|
|
539
552
|
name: "append",
|
|
540
553
|
fn: B(() => [N(t.$slots, "append")]),
|
|
@@ -557,7 +570,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
557
570
|
} : void 0
|
|
558
571
|
]), 1040, ["modelValue"]));
|
|
559
572
|
}
|
|
560
|
-
}),
|
|
573
|
+
}), He = /* @__PURE__ */ S({
|
|
561
574
|
__name: "InputNumber",
|
|
562
575
|
props: /*@__PURE__*/ T({
|
|
563
576
|
align: {},
|
|
@@ -580,7 +593,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
580
593
|
}),
|
|
581
594
|
emits: /*@__PURE__*/ T(["blur", "focus"], ["update:modelValue"]),
|
|
582
595
|
setup(e, { emit: t }) {
|
|
583
|
-
let n = t, r = L(e, "modelValue"), { t: i } =
|
|
596
|
+
let n = t, r = L(e, "modelValue"), { t: i } = g(w(X)), a = w(Z, void 0);
|
|
584
597
|
if (a?.required) {
|
|
585
598
|
let { label: e, validator: t } = a;
|
|
586
599
|
a.validator = () => e && !r.value ? i("el.validation.inputNumber", { label: e }) : t?.();
|
|
@@ -590,7 +603,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
590
603
|
}, s = (e) => {
|
|
591
604
|
n("blur", e);
|
|
592
605
|
};
|
|
593
|
-
return (t, n) => (k(),
|
|
606
|
+
return (t, n) => (k(), y(I(u), E({
|
|
594
607
|
align: e.align,
|
|
595
608
|
controls: e.controls,
|
|
596
609
|
disabled: e.disabled,
|
|
@@ -607,7 +620,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
607
620
|
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
608
621
|
onBlur: s,
|
|
609
622
|
onFocus: o
|
|
610
|
-
}),
|
|
623
|
+
}), b({ _: 2 }, ["prefix" in t.$slots ? {
|
|
611
624
|
name: "prefix",
|
|
612
625
|
fn: B(() => [N(t.$slots, "prefix")]),
|
|
613
626
|
key: "0"
|
|
@@ -617,15 +630,15 @@ var Ce = /* @__PURE__ */ x({
|
|
|
617
630
|
key: "1"
|
|
618
631
|
} : void 0]), 1040, ["modelValue"]));
|
|
619
632
|
}
|
|
620
|
-
}),
|
|
633
|
+
}), Ue = /* @__PURE__ */ S({
|
|
621
634
|
__name: "Pagination",
|
|
622
635
|
props: /*@__PURE__*/ T({
|
|
623
636
|
background: { type: Boolean },
|
|
624
|
-
defaultPageSize: { default: 20 },
|
|
625
637
|
layout: {},
|
|
626
638
|
pageSizes: {},
|
|
627
639
|
size: {},
|
|
628
|
-
total: {}
|
|
640
|
+
total: {},
|
|
641
|
+
defaultPageSize: {}
|
|
629
642
|
}, {
|
|
630
643
|
currentPage: {},
|
|
631
644
|
currentPageModifiers: {},
|
|
@@ -634,21 +647,21 @@ var Ce = /* @__PURE__ */ x({
|
|
|
634
647
|
}),
|
|
635
648
|
emits: /*@__PURE__*/ T(["currentChange", "sizeChange"], ["update:currentPage", "update:pageSize"]),
|
|
636
649
|
setup(e, { emit: t }) {
|
|
637
|
-
let n =
|
|
638
|
-
return
|
|
650
|
+
let n = t, r = L(e, "currentPage"), i = L(e, "pageSize"), a = Q("pagination"), o = v(() => e.layout ?? a.value?.layout), s = v(() => e.defaultPageSize ?? a.value?.defaultPageSize);
|
|
651
|
+
return g(w(X)), (t, a) => (k(), y(I(ee), E({
|
|
639
652
|
size: e.size,
|
|
640
653
|
total: e.total,
|
|
641
654
|
pageSizes: e.pageSizes,
|
|
642
655
|
background: e.background,
|
|
643
|
-
layout:
|
|
656
|
+
layout: o.value
|
|
644
657
|
}, {
|
|
645
|
-
"current-page":
|
|
646
|
-
"onUpdate:currentPage":
|
|
647
|
-
"page-size":
|
|
648
|
-
"onUpdate:pageSize":
|
|
649
|
-
"default-page-size":
|
|
650
|
-
onSizeChange:
|
|
651
|
-
onCurrentChange:
|
|
658
|
+
"current-page": r.value,
|
|
659
|
+
"onUpdate:currentPage": a[0] ||= (e) => r.value = e,
|
|
660
|
+
"page-size": i.value,
|
|
661
|
+
"onUpdate:pageSize": a[1] ||= (e) => i.value = e,
|
|
662
|
+
"default-page-size": s.value,
|
|
663
|
+
onSizeChange: a[2] ||= (e) => n("sizeChange", e),
|
|
664
|
+
onCurrentChange: a[3] ||= (e) => n("currentChange", e)
|
|
652
665
|
}), {
|
|
653
666
|
default: B(() => [N(t.$slots, "default")]),
|
|
654
667
|
_: 3
|
|
@@ -658,7 +671,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
658
671
|
"default-page-size"
|
|
659
672
|
]));
|
|
660
673
|
}
|
|
661
|
-
}),
|
|
674
|
+
}), We = /* @__PURE__ */ S({
|
|
662
675
|
__name: "Select",
|
|
663
676
|
props: /*@__PURE__*/ T({
|
|
664
677
|
allowCreate: { type: Boolean },
|
|
@@ -691,7 +704,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
691
704
|
"focus"
|
|
692
705
|
], ["update:modelValue"]),
|
|
693
706
|
setup(e, { emit: t }) {
|
|
694
|
-
let n = t, r = L(e, "modelValue"), { t: i } =
|
|
707
|
+
let n = t, r = L(e, "modelValue"), { t: i } = g(w(X)), a = j([]), o = q(() => e.data ?? [], e.factory), s = v(() => [...q(a, e.factory).value, ...o.value]), c = (t) => {
|
|
695
708
|
if (typeof t == "object") {
|
|
696
709
|
if (e.identify) return e.identify(t);
|
|
697
710
|
throw Error("`identify` is required when value's type extends `object` or `object[]`");
|
|
@@ -703,7 +716,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
703
716
|
n === u && i && (a.value = i);
|
|
704
717
|
} else a.value = [];
|
|
705
718
|
}, { immediate: !0 });
|
|
706
|
-
let
|
|
719
|
+
let ee = v(() => s.value.map((e) => {
|
|
707
720
|
let t = c(e.value);
|
|
708
721
|
return {
|
|
709
722
|
disabled: e.disabled,
|
|
@@ -712,28 +725,28 @@ var Ce = /* @__PURE__ */ x({
|
|
|
712
725
|
render: e.render,
|
|
713
726
|
value: t
|
|
714
727
|
};
|
|
715
|
-
})),
|
|
728
|
+
})), f = v({
|
|
716
729
|
get: () => r.value && (Array.isArray(r.value) ? r.value.map(c) : c(r.value)),
|
|
717
730
|
set: (t) => {
|
|
718
731
|
Array.isArray(t) ? r.value = t.map((e) => l(e)) : r.value = t === void 0 ? void 0 : l(t) ?? (e.allowCreate ? t : void 0);
|
|
719
732
|
}
|
|
720
|
-
}),
|
|
721
|
-
if (
|
|
722
|
-
let { label: e, validator: t } =
|
|
723
|
-
|
|
733
|
+
}), p = w(Z, void 0);
|
|
734
|
+
if (p?.required) {
|
|
735
|
+
let { label: e, validator: t } = p;
|
|
736
|
+
p.validator = () => e && (!r.value || Array.isArray(r.value) && r.value.length === 0) ? i("el.validation.select", { label: e }) : t?.();
|
|
724
737
|
}
|
|
725
|
-
let
|
|
726
|
-
n("blur", e),
|
|
727
|
-
}, p = (e) => {
|
|
728
|
-
n("focus", e);
|
|
738
|
+
let ne = (e) => {
|
|
739
|
+
n("blur", e), p?.validate?.();
|
|
729
740
|
}, m = (e) => {
|
|
741
|
+
n("focus", e);
|
|
742
|
+
}, h = (e) => {
|
|
730
743
|
n("change", e);
|
|
731
|
-
},
|
|
744
|
+
}, b = (e) => x(d, {
|
|
732
745
|
disabled: e.disabled,
|
|
733
746
|
label: e.label,
|
|
734
747
|
value: e.value
|
|
735
748
|
}, { default: () => e.render?.() ?? e.label });
|
|
736
|
-
return (t, n) => (k(),
|
|
749
|
+
return (t, n) => (k(), y(I(te), E({
|
|
737
750
|
placeholder: e.placeholder ?? I(i)("el.select.placeholder"),
|
|
738
751
|
disabled: e.disabled,
|
|
739
752
|
allowCreate: e.allowCreate,
|
|
@@ -748,13 +761,13 @@ var Ce = /* @__PURE__ */ x({
|
|
|
748
761
|
collapseTagsTooltip: e.collapseTagsTooltip,
|
|
749
762
|
defaultFirstOption: e.defaultFirstOption || e.allowCreate
|
|
750
763
|
}, {
|
|
751
|
-
modelValue:
|
|
752
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
753
|
-
onBlur:
|
|
754
|
-
onFocus:
|
|
755
|
-
onChange:
|
|
764
|
+
modelValue: f.value,
|
|
765
|
+
"onUpdate:modelValue": n[0] ||= (e) => f.value = e,
|
|
766
|
+
onBlur: ne,
|
|
767
|
+
onFocus: m,
|
|
768
|
+
onChange: h
|
|
756
769
|
}), {
|
|
757
|
-
default: B(() => [(k(!0),
|
|
770
|
+
default: B(() => [(k(!0), re(_, null, M(ee.value, (e) => (k(), y(b, {
|
|
758
771
|
key: e.key,
|
|
759
772
|
label: e.label,
|
|
760
773
|
value: e.value,
|
|
@@ -769,7 +782,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
769
782
|
_: 1
|
|
770
783
|
}, 16, ["modelValue"]));
|
|
771
784
|
}
|
|
772
|
-
}),
|
|
785
|
+
}), Ge = /* @__PURE__ */ S({
|
|
773
786
|
__name: "Table",
|
|
774
787
|
props: {
|
|
775
788
|
cellClassName: { type: [Function, String] },
|
|
@@ -807,19 +820,19 @@ var Ce = /* @__PURE__ */ x({
|
|
|
807
820
|
"selectionChange"
|
|
808
821
|
],
|
|
809
822
|
setup(e, { expose: t, emit: n }) {
|
|
810
|
-
let r = n, i =
|
|
823
|
+
let r = n, i = R("table");
|
|
811
824
|
t({
|
|
812
|
-
clearSelection: () =>
|
|
813
|
-
doLayout: () =>
|
|
814
|
-
getSelectionRows: () =>
|
|
815
|
-
scrollTo: (e, t) =>
|
|
816
|
-
setCurrentRow: (e) =>
|
|
817
|
-
setScrollLeft: (e) =>
|
|
818
|
-
setScrollTop: (e) =>
|
|
819
|
-
toggleAllSelection: () =>
|
|
820
|
-
toggleRowSelection: (e, t, n) =>
|
|
821
|
-
}), A(
|
|
822
|
-
let
|
|
825
|
+
clearSelection: () => i.value?.clearSelection(),
|
|
826
|
+
doLayout: () => i.value?.doLayout(),
|
|
827
|
+
getSelectionRows: () => i.value?.getSelectionRows(),
|
|
828
|
+
scrollTo: (e, t) => i.value?.scrollTo(e, t),
|
|
829
|
+
setCurrentRow: (e) => i.value?.setCurrentRow(e),
|
|
830
|
+
setScrollLeft: (e) => i.value?.setScrollLeft(e),
|
|
831
|
+
setScrollTop: (e) => i.value?.setScrollTop(e),
|
|
832
|
+
toggleAllSelection: () => i.value?.toggleAllSelection(),
|
|
833
|
+
toggleRowSelection: (e, t, n) => i.value?.toggleRowSelection(e, t, n)
|
|
834
|
+
}), A(De, !0);
|
|
835
|
+
let a = /* @__PURE__ */ S((e) => () => x(ne, {
|
|
823
836
|
align: e.align,
|
|
824
837
|
columnKey: e.columnKey,
|
|
825
838
|
fixed: e.fixed,
|
|
@@ -845,10 +858,10 @@ var Ce = /* @__PURE__ */ x({
|
|
|
845
858
|
"selectable",
|
|
846
859
|
"type",
|
|
847
860
|
"width"
|
|
848
|
-
] });
|
|
849
|
-
return (t, n) => (k(),
|
|
861
|
+
] }), o = Q("table"), s = v(() => e.align ?? o.value?.align), c = v(() => e.border ?? o.value?.border), l = v(() => e.showOverflowTooltip ?? o.value?.showOverflowTooltip), u = v(() => e.fit ?? o.value?.fit), d = v(() => e.headerAlign ?? o.value?.headerAlign);
|
|
862
|
+
return (t, n) => (k(), y(I(p), E({
|
|
850
863
|
ref_key: "table",
|
|
851
|
-
ref:
|
|
864
|
+
ref: i,
|
|
852
865
|
data: e.data
|
|
853
866
|
}, {
|
|
854
867
|
height: e.height,
|
|
@@ -861,24 +874,24 @@ var Ce = /* @__PURE__ */ x({
|
|
|
861
874
|
summaryMethod: e.summaryMethod,
|
|
862
875
|
size: e.size,
|
|
863
876
|
rowKey: e.rowKey,
|
|
864
|
-
showOverflowTooltip:
|
|
865
|
-
fit:
|
|
866
|
-
border:
|
|
877
|
+
showOverflowTooltip: l.value,
|
|
878
|
+
fit: u.value,
|
|
879
|
+
border: c.value
|
|
867
880
|
}, {
|
|
868
881
|
onRowClick: n[0] ||= (e) => r("rowClick", e),
|
|
869
882
|
onRowDblclick: n[1] ||= (e) => r("rowDblclick", e),
|
|
870
883
|
onSelectionChange: n[2] ||= (e) => r("selectionChange", e),
|
|
871
884
|
onHeaderDragend: n[3] ||= (e, t, n) => r("headerDragend", e, t, n)
|
|
872
885
|
}), {
|
|
873
|
-
default: B(() => [(k(!0),
|
|
874
|
-
align:
|
|
875
|
-
headerAlign:
|
|
876
|
-
...
|
|
886
|
+
default: B(() => [(k(!0), re(_, null, M(e.columns, (e) => (k(), y(I(a), E({ ref_for: !0 }, {
|
|
887
|
+
align: s.value,
|
|
888
|
+
headerAlign: d.value,
|
|
889
|
+
...e
|
|
877
890
|
}), null, 16))), 256))]),
|
|
878
891
|
_: 1
|
|
879
892
|
}, 16, ["data"]));
|
|
880
893
|
}
|
|
881
|
-
}),
|
|
894
|
+
}), Ke = /* @__PURE__ */ S({
|
|
882
895
|
__name: "TabPane",
|
|
883
896
|
props: {
|
|
884
897
|
closable: { type: Boolean },
|
|
@@ -891,7 +904,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
891
904
|
return t({
|
|
892
905
|
label: e.label,
|
|
893
906
|
name: e.name
|
|
894
|
-
}), A(
|
|
907
|
+
}), A(Ae, !0), A(Me, e.name), (t, n) => (k(), y(I(f), D(C({
|
|
895
908
|
label: e.label,
|
|
896
909
|
name: e.name,
|
|
897
910
|
disabled: e.disabled,
|
|
@@ -902,7 +915,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
902
915
|
_: 3
|
|
903
916
|
}, 16));
|
|
904
917
|
}
|
|
905
|
-
}),
|
|
918
|
+
}), qe = /* @__PURE__ */ S({
|
|
906
919
|
__name: "Tabs",
|
|
907
920
|
props: /*@__PURE__*/ T({
|
|
908
921
|
addable: { type: Boolean },
|
|
@@ -920,9 +933,9 @@ var Ce = /* @__PURE__ */ x({
|
|
|
920
933
|
], ["update:modelValue"]),
|
|
921
934
|
setup(e) {
|
|
922
935
|
let t = L(e, "modelValue");
|
|
923
|
-
A(
|
|
936
|
+
A(ke, !0);
|
|
924
937
|
let n = de();
|
|
925
|
-
return A(
|
|
938
|
+
return A(Ne, n), n.on((e) => t.value = e), (n, r) => (k(), y(I(m), E({
|
|
926
939
|
addable: e.addable,
|
|
927
940
|
editable: e.editable,
|
|
928
941
|
tabPosition: e.tabPosition,
|
|
@@ -933,7 +946,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
933
946
|
onTabChange: r[1] ||= (e) => n.$emit("change", e),
|
|
934
947
|
onTabRemove: r[2] ||= (e) => n.$emit("remove", e),
|
|
935
948
|
onEdit: r[3] ||= (e, t) => n.$emit("edit", e, t)
|
|
936
|
-
}),
|
|
949
|
+
}), b({
|
|
937
950
|
default: B(() => [N(n.$slots, "default")]),
|
|
938
951
|
_: 2
|
|
939
952
|
}, ["addIcon" in n.$slots ? {
|
|
@@ -942,7 +955,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
942
955
|
key: "0"
|
|
943
956
|
} : void 0]), 1040, ["modelValue"]));
|
|
944
957
|
}
|
|
945
|
-
}),
|
|
958
|
+
}), Je = /* @__PURE__ */ S({
|
|
946
959
|
__name: "Upload",
|
|
947
960
|
props: {
|
|
948
961
|
accept: {},
|
|
@@ -962,7 +975,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
962
975
|
}
|
|
963
976
|
},
|
|
964
977
|
setup(e) {
|
|
965
|
-
let t = w(
|
|
978
|
+
let t = w(Z, void 0);
|
|
966
979
|
if (t?.required) {
|
|
967
980
|
let { validator: e } = t;
|
|
968
981
|
t.validator = () => e?.();
|
|
@@ -974,7 +987,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
974
987
|
}, i = (t) => {
|
|
975
988
|
e.onPreview?.(t);
|
|
976
989
|
};
|
|
977
|
-
return (t, a) => (k(),
|
|
990
|
+
return (t, a) => (k(), y(I(h), D(C({
|
|
978
991
|
action: e.action,
|
|
979
992
|
disabled: e.disabled,
|
|
980
993
|
accept: e.accept,
|
|
@@ -987,7 +1000,7 @@ var Ce = /* @__PURE__ */ x({
|
|
|
987
1000
|
onPreview: i,
|
|
988
1001
|
onSuccess: n,
|
|
989
1002
|
onRemove: r
|
|
990
|
-
})),
|
|
1003
|
+
})), b({
|
|
991
1004
|
default: B(() => [N(t.$slots, "default")]),
|
|
992
1005
|
_: 2
|
|
993
1006
|
}, [
|
|
@@ -1011,23 +1024,23 @@ var Ce = /* @__PURE__ */ x({
|
|
|
1011
1024
|
} : void 0
|
|
1012
1025
|
]), 1040));
|
|
1013
1026
|
}
|
|
1014
|
-
}),
|
|
1015
|
-
XButton: () =>
|
|
1016
|
-
XCascader: () =>
|
|
1017
|
-
XCheckbox: () =>
|
|
1018
|
-
XConfigProvider: () =>
|
|
1019
|
-
XDatePicker: () =>
|
|
1020
|
-
XDialog: () =>
|
|
1021
|
-
XForm: () =>
|
|
1022
|
-
XFormItem: () =>
|
|
1023
|
-
XInput: () =>
|
|
1024
|
-
XInputNumber: () =>
|
|
1025
|
-
XPagination: () =>
|
|
1026
|
-
XSelect: () =>
|
|
1027
|
-
XTabPane: () =>
|
|
1028
|
-
XTable: () =>
|
|
1029
|
-
XTabs: () =>
|
|
1030
|
-
XUpload: () =>
|
|
1027
|
+
}), Ye = /* @__PURE__ */ H({
|
|
1028
|
+
XButton: () => we,
|
|
1029
|
+
XCascader: () => Pe,
|
|
1030
|
+
XCheckbox: () => Fe,
|
|
1031
|
+
XConfigProvider: () => Ie,
|
|
1032
|
+
XDatePicker: () => Re,
|
|
1033
|
+
XDialog: () => ze,
|
|
1034
|
+
XForm: () => Be,
|
|
1035
|
+
XFormItem: () => Ve,
|
|
1036
|
+
XInput: () => $,
|
|
1037
|
+
XInputNumber: () => He,
|
|
1038
|
+
XPagination: () => Ue,
|
|
1039
|
+
XSelect: () => We,
|
|
1040
|
+
XTabPane: () => Ke,
|
|
1041
|
+
XTable: () => Ge,
|
|
1042
|
+
XTabs: () => qe,
|
|
1043
|
+
XUpload: () => Je
|
|
1031
1044
|
});
|
|
1032
1045
|
//#endregion
|
|
1033
|
-
export { H as A, Y as C, _e as D, U as E, q as O,
|
|
1046
|
+
export { H as A, Y as C, _e as D, U as E, q as O, ye as S, K as T, Te as _, Ge as a, X as b, He as c, Be as d, ze as f, Pe as g, Fe as h, Ke as i, ge as k, $ as l, Ie as m, Je as n, We as o, Re as p, qe as r, Ue as s, Ye as t, Ve as u, Ee as v, Ce as w, we as x, De as y };
|