@pungfe/element 0.6.6 → 0.6.8
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-BkjMiFIF.cjs +1 -0
- package/dist/advance-CeuQa3QF.js +2079 -0
- package/dist/advance.cjs +1 -0
- package/dist/advance.d.ts +25 -0
- package/dist/advance.js +2 -0
- package/dist/basic-CHngH3v0.js +1051 -0
- package/dist/basic-QaGJh7c5.cjs +1 -0
- package/dist/basic.cjs +1 -0
- package/dist/basic.d.ts +33 -0
- package/dist/basic.js +2 -0
- package/dist/components/advance/XButtonAsync.vue.d.ts +17 -0
- package/dist/components/advance/XButtonConfirm.vue.d.ts +23 -0
- package/dist/components/advance/XCascaderRequest.vue.d.ts +60 -0
- package/dist/components/advance/XFormFlex.vue.d.ts +23 -0
- package/dist/components/advance/XFormRequest.vue.d.ts +58 -0
- package/dist/components/advance/XRequest.vue.d.ts +71 -0
- package/dist/components/advance/XSelectRequest.vue.d.ts +58 -0
- package/dist/components/advance/XTableConfig.vue.d.ts +54 -0
- package/dist/components/advance/XTableFlex.vue.d.ts +65 -0
- package/dist/components/advance/XTableRequest.vue.d.ts +103 -0
- package/dist/components/advance/XTableRequestConfig.vue.d.ts +91 -0
- package/dist/components/advance/XUploadOss.vue.d.ts +31 -0
- package/dist/components/basic/Button.vue.d.ts +33 -0
- package/dist/components/basic/Cascader.vue.d.ts +40 -0
- package/dist/components/basic/Checkbox.vue.d.ts +24 -0
- package/dist/components/basic/ConfigProvider.vue.d.ts +17 -0
- package/dist/components/basic/DatePicker.vue.d.ts +43 -0
- package/dist/components/basic/Dialog.vue.d.ts +36 -0
- package/dist/components/basic/Form.vue.d.ts +37 -0
- package/dist/components/basic/FormItem.vue.d.ts +36 -0
- package/dist/components/basic/Input.vue.d.ts +44 -0
- package/dist/components/basic/InputNumber.vue.d.ts +41 -0
- package/dist/components/basic/Pagination.vue.d.ts +41 -0
- package/dist/components/basic/Select.vue.d.ts +57 -0
- package/dist/components/basic/TabPane.vue.d.ts +28 -0
- package/dist/components/basic/Table.vue.d.ts +125 -0
- package/dist/components/basic/Tabs.vue.d.ts +41 -0
- package/dist/components/basic/Upload.vue.d.ts +34 -0
- package/dist/composables/useElementConfig.d.ts +8 -0
- package/dist/composables/useFormValidation.d.ts +1 -0
- package/dist/composables/useXConfig.d.ts +3 -0
- package/dist/constants/index.d.ts +18 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +36 -0
- package/dist/install.d.ts +12 -0
- package/dist/locales/ar.d.ts +2 -0
- package/dist/locales/en.d.ts +2 -0
- package/dist/locales/th.d.ts +2 -0
- package/dist/locales/zh-cn.d.ts +2 -0
- package/dist/locales-BCty7For.cjs +1 -0
- package/dist/locales-C7JFCxgs.js +865 -0
- package/dist/locales.cjs +1 -0
- package/dist/locales.d.ts +4 -0
- package/dist/locales.js +2 -0
- package/dist/package.json.d.ts +142 -0
- package/dist/resolver.cjs +1 -0
- package/dist/resolver.d.ts +5 -0
- package/dist/resolver.js +66 -0
- package/dist/style.css +3 -0
- package/dist/types.d.ts +32 -0
- package/package.json +6 -10
|
@@ -0,0 +1,1051 @@
|
|
|
1
|
+
import { t as e } from "./locales-C7JFCxgs.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 ee, ElPagination as d, 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
|
+
//#region \0rolldown/runtime.js
|
|
5
|
+
var V = Object.defineProperty, H = (e, t) => {
|
|
6
|
+
let n = {};
|
|
7
|
+
for (var r in e) V(n, r, {
|
|
8
|
+
get: e[r],
|
|
9
|
+
enumerable: !0
|
|
10
|
+
});
|
|
11
|
+
return t || V(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.39_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
15
|
+
function U(e, t) {
|
|
16
|
+
return ae() ? (se(e, t), !0) : !1;
|
|
17
|
+
}
|
|
18
|
+
function de() {
|
|
19
|
+
let e = /* @__PURE__ */ new Set(), t = (t) => {
|
|
20
|
+
e.delete(t);
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
on: (n) => {
|
|
24
|
+
e.add(n);
|
|
25
|
+
let r = () => t(n);
|
|
26
|
+
return U(r), { off: r };
|
|
27
|
+
},
|
|
28
|
+
off: t,
|
|
29
|
+
trigger: (...t) => Promise.all(Array.from(e).map((e) => e(...t))),
|
|
30
|
+
clear: () => {
|
|
31
|
+
e.clear();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
var W = typeof window < "u" && typeof document < "u";
|
|
36
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
37
|
+
var G = () => {};
|
|
38
|
+
function fe(e, t) {
|
|
39
|
+
function n(...n) {
|
|
40
|
+
return new Promise((r, i) => {
|
|
41
|
+
Promise.resolve(e(() => t.apply(this, n), {
|
|
42
|
+
fn: t,
|
|
43
|
+
thisArg: this,
|
|
44
|
+
args: n
|
|
45
|
+
})).then(r).catch(i);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return n;
|
|
49
|
+
}
|
|
50
|
+
function pe(e, t = {}) {
|
|
51
|
+
let n, r, i = G, a = (e) => {
|
|
52
|
+
clearTimeout(e), i(), i = G;
|
|
53
|
+
}, o;
|
|
54
|
+
return (s) => {
|
|
55
|
+
let c = F(e), l = F(t.maxWait);
|
|
56
|
+
return n && a(n), c <= 0 || l !== void 0 && l <= 0 ? (r &&= (a(r), void 0), Promise.resolve(s())) : new Promise((e, u) => {
|
|
57
|
+
i = t.rejectOnCancel ? u : e, o = s, l && !r && (r = setTimeout(() => {
|
|
58
|
+
n && a(n), r = void 0, e(o());
|
|
59
|
+
}, l)), n = setTimeout(() => {
|
|
60
|
+
r && a(r), r = void 0, e(s());
|
|
61
|
+
}, c);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function me(e) {
|
|
66
|
+
return Array.isArray(e) ? e : [e];
|
|
67
|
+
}
|
|
68
|
+
function he(e) {
|
|
69
|
+
return e || ie();
|
|
70
|
+
}
|
|
71
|
+
function ge(e, t = 200, n = {}) {
|
|
72
|
+
return fe(pe(t, n), e);
|
|
73
|
+
}
|
|
74
|
+
function K(e, t = !0, n) {
|
|
75
|
+
he(n) ? O(e, n) : t ? e() : oe(e);
|
|
76
|
+
}
|
|
77
|
+
function _e(e, t) {
|
|
78
|
+
return v(() => F(e).map((e) => F(e)).filter(t));
|
|
79
|
+
}
|
|
80
|
+
function q(e, t) {
|
|
81
|
+
return v(() => F(e).map((e) => F(e)).map(t));
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.39_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
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;
|
|
93
|
+
W && window.navigator, W && window.location;
|
|
94
|
+
function Y(e) {
|
|
95
|
+
let t = F(e);
|
|
96
|
+
return t?.$el ?? t;
|
|
97
|
+
}
|
|
98
|
+
function be() {
|
|
99
|
+
let e = P(!1), t = ie();
|
|
100
|
+
return t && O(() => {
|
|
101
|
+
e.value = !0;
|
|
102
|
+
}, t), e;
|
|
103
|
+
}
|
|
104
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
105
|
+
function xe(e) {
|
|
106
|
+
let t = be();
|
|
107
|
+
return v(() => (t.value, !!e()));
|
|
108
|
+
}
|
|
109
|
+
function Se(e, t, n = {}) {
|
|
110
|
+
let { window: r = J, ...i } = n, a, o = /* @__PURE__ */ xe(() => r && "ResizeObserver" in r), s = () => {
|
|
111
|
+
a &&= (a.disconnect(), void 0);
|
|
112
|
+
}, c = z(v(() => {
|
|
113
|
+
let t = F(e);
|
|
114
|
+
return Array.isArray(t) ? t.map((e) => Y(e)) : [Y(t)];
|
|
115
|
+
}), (e) => {
|
|
116
|
+
if (s(), o.value && r) {
|
|
117
|
+
a = new ResizeObserver(t);
|
|
118
|
+
for (let t of e) t && a.observe(t, i);
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
immediate: !0,
|
|
122
|
+
flush: "post"
|
|
123
|
+
}), l = () => {
|
|
124
|
+
s(), c();
|
|
125
|
+
};
|
|
126
|
+
return U(l), {
|
|
127
|
+
isSupported: o,
|
|
128
|
+
stop: l
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function Ce(e, t = {
|
|
132
|
+
width: 0,
|
|
133
|
+
height: 0
|
|
134
|
+
}, n = {}) {
|
|
135
|
+
let { window: r = J, box: i = "content-box" } = n, a = v(() => {
|
|
136
|
+
var t;
|
|
137
|
+
return (t = Y(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
|
|
138
|
+
}), o = P(t.width), s = P(t.height), { stop: c } = Se(e, ([t]) => {
|
|
139
|
+
let n = i === "border-box" ? t.borderBoxSize : i === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
140
|
+
if (r && a.value) {
|
|
141
|
+
let t = Y(e);
|
|
142
|
+
if (t) {
|
|
143
|
+
let e = t.getBoundingClientRect();
|
|
144
|
+
o.value = e.width, s.value = e.height;
|
|
145
|
+
}
|
|
146
|
+
} else if (n) {
|
|
147
|
+
let e = me(n);
|
|
148
|
+
o.value = e.reduce((e, { inlineSize: t }) => e + t, 0), s.value = e.reduce((e, { blockSize: t }) => e + t, 0);
|
|
149
|
+
} else o.value = t.contentRect.width, s.value = t.contentRect.height;
|
|
150
|
+
}, n);
|
|
151
|
+
K(() => {
|
|
152
|
+
let n = Y(e);
|
|
153
|
+
n && (o.value = "offsetWidth" in n ? n.offsetWidth : t.width, s.value = "offsetHeight" in n ? n.offsetHeight : t.height);
|
|
154
|
+
});
|
|
155
|
+
let l = z(() => Y(e), (e) => {
|
|
156
|
+
o.value = e ? t.width : 0, s.value = e ? t.height : 0;
|
|
157
|
+
});
|
|
158
|
+
function u() {
|
|
159
|
+
c(), l();
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
width: o,
|
|
163
|
+
height: s,
|
|
164
|
+
stop: u
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/components/basic/Button.vue
|
|
169
|
+
var we = /* @__PURE__ */ S({
|
|
170
|
+
__name: "Button",
|
|
171
|
+
props: {
|
|
172
|
+
disabled: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: () => void 0
|
|
175
|
+
},
|
|
176
|
+
icon: {},
|
|
177
|
+
link: {
|
|
178
|
+
type: Boolean,
|
|
179
|
+
default: () => void 0
|
|
180
|
+
},
|
|
181
|
+
size: {},
|
|
182
|
+
text: { type: Boolean },
|
|
183
|
+
type: {}
|
|
184
|
+
},
|
|
185
|
+
emits: ["click"],
|
|
186
|
+
setup(e) {
|
|
187
|
+
return (n, r) => (k(), y(I(t), E({
|
|
188
|
+
type: e.type,
|
|
189
|
+
text: e.text,
|
|
190
|
+
link: e.link,
|
|
191
|
+
disabled: e.disabled,
|
|
192
|
+
size: e.size,
|
|
193
|
+
icon: e.icon
|
|
194
|
+
}, { onClick: r[0] ||= (e) => n.$emit("click", e) }), {
|
|
195
|
+
default: B(() => [N(n.$slots, "default")]),
|
|
196
|
+
_: 3
|
|
197
|
+
}, 16));
|
|
198
|
+
}
|
|
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({
|
|
200
|
+
__name: "Cascader",
|
|
201
|
+
props: /*@__PURE__*/ T({
|
|
202
|
+
clearable: { type: Boolean },
|
|
203
|
+
data: {},
|
|
204
|
+
disabled: {
|
|
205
|
+
type: Boolean,
|
|
206
|
+
default: () => void 0
|
|
207
|
+
},
|
|
208
|
+
factory: { type: Function },
|
|
209
|
+
filterable: { type: Boolean },
|
|
210
|
+
placeholder: {},
|
|
211
|
+
props: {},
|
|
212
|
+
size: {}
|
|
213
|
+
}, {
|
|
214
|
+
modelValue: {},
|
|
215
|
+
modelModifiers: {}
|
|
216
|
+
}),
|
|
217
|
+
emits: ["update:modelValue"],
|
|
218
|
+
setup(e) {
|
|
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);
|
|
223
|
+
if (o?.required) {
|
|
224
|
+
let { label: e, validator: n } = o;
|
|
225
|
+
o.validator = () => e && (!t.value || Array.isArray(t.value) && t.value.length === 0) ? r("el.validation.cascader", { label: e }) : n?.();
|
|
226
|
+
}
|
|
227
|
+
return (t, o) => (k(), y(I(n), E({
|
|
228
|
+
modelValue: a.value,
|
|
229
|
+
"onUpdate:modelValue": o[0] ||= (e) => a.value = e
|
|
230
|
+
}, {
|
|
231
|
+
clearable: e.clearable,
|
|
232
|
+
disabled: e.disabled,
|
|
233
|
+
filterable: e.filterable,
|
|
234
|
+
size: e.size,
|
|
235
|
+
options: i.value,
|
|
236
|
+
props: e.props,
|
|
237
|
+
placeholder: e.placeholder ?? I(r)("el.select.placeholder")
|
|
238
|
+
}), null, 16, ["modelValue"]));
|
|
239
|
+
}
|
|
240
|
+
}), Fe = /* @__PURE__ */ S({
|
|
241
|
+
__name: "Checkbox",
|
|
242
|
+
props: /*@__PURE__*/ T({
|
|
243
|
+
disabled: {
|
|
244
|
+
type: Boolean,
|
|
245
|
+
default: () => void 0
|
|
246
|
+
},
|
|
247
|
+
falseValue: {},
|
|
248
|
+
label: { type: [
|
|
249
|
+
String,
|
|
250
|
+
Boolean,
|
|
251
|
+
Number,
|
|
252
|
+
Object
|
|
253
|
+
] },
|
|
254
|
+
size: {},
|
|
255
|
+
trueValue: {}
|
|
256
|
+
}, {
|
|
257
|
+
modelValue: { type: [
|
|
258
|
+
String,
|
|
259
|
+
Number,
|
|
260
|
+
Boolean
|
|
261
|
+
] },
|
|
262
|
+
modelModifiers: {}
|
|
263
|
+
}),
|
|
264
|
+
emits: /*@__PURE__*/ T(["blur", "focus"], ["update:modelValue"]),
|
|
265
|
+
setup(e) {
|
|
266
|
+
let t = L(e, "modelValue"), { t: n } = g(w(X)), i = w(Z, void 0);
|
|
267
|
+
if (i?.required) {
|
|
268
|
+
let { label: e, validator: r } = i;
|
|
269
|
+
i.validator = () => e && !t.value ? n("el.validation.input", { label: e }) : r?.();
|
|
270
|
+
}
|
|
271
|
+
return (n, i) => (k(), y(I(r), E({ disabled: e.disabled }, {
|
|
272
|
+
modelValue: t.value,
|
|
273
|
+
"onUpdate:modelValue": i[0] ||= (e) => t.value = e
|
|
274
|
+
}), null, 16, ["modelValue"]));
|
|
275
|
+
}
|
|
276
|
+
}), Ie = /* @__PURE__ */ S({
|
|
277
|
+
__name: "ConfigProvider",
|
|
278
|
+
props: { locale: {} },
|
|
279
|
+
setup(t) {
|
|
280
|
+
let n = v(() => t.locale ?? e);
|
|
281
|
+
return A(X, n), (e, t) => (k(), y(I(i), { locale: n.value }, {
|
|
282
|
+
default: B(() => [N(e.$slots, "default")]),
|
|
283
|
+
_: 3
|
|
284
|
+
}, 8, ["locale"]));
|
|
285
|
+
}
|
|
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({
|
|
295
|
+
__name: "DatePicker",
|
|
296
|
+
props: /*@__PURE__*/ T({
|
|
297
|
+
disabled: {
|
|
298
|
+
type: Boolean,
|
|
299
|
+
default: () => void 0
|
|
300
|
+
},
|
|
301
|
+
disabledDate: {},
|
|
302
|
+
endPlaceholder: {},
|
|
303
|
+
placeholder: {},
|
|
304
|
+
shortcuts: {},
|
|
305
|
+
size: {},
|
|
306
|
+
startPlaceholder: {},
|
|
307
|
+
type: { default: "date" },
|
|
308
|
+
teleported: {
|
|
309
|
+
type: Boolean,
|
|
310
|
+
default: !0
|
|
311
|
+
},
|
|
312
|
+
valueFormat: {}
|
|
313
|
+
}, {
|
|
314
|
+
modelValue: {},
|
|
315
|
+
modelModifiers: {},
|
|
316
|
+
start: {},
|
|
317
|
+
startModifiers: {},
|
|
318
|
+
end: {},
|
|
319
|
+
endModifiers: {}
|
|
320
|
+
}),
|
|
321
|
+
emits: /*@__PURE__*/ T(["blur", "focus"], [
|
|
322
|
+
"update:modelValue",
|
|
323
|
+
"update:start",
|
|
324
|
+
"update:end"
|
|
325
|
+
]),
|
|
326
|
+
setup(e) {
|
|
327
|
+
let t = L(e, "modelValue"), n = L(e, "start"), r = L(e, "end"), { t: i } = g(w(X, void 0)), o = v({
|
|
328
|
+
get() {
|
|
329
|
+
return e.type.includes("range") && n.value && r.value ? [n.value, r.value] : e.type.includes("range") ? null : t.value;
|
|
330
|
+
},
|
|
331
|
+
set(i) {
|
|
332
|
+
e.type.includes("range") && Array.isArray(i) ? (n.value = i[0], r.value = i[1]) : t.value = i;
|
|
333
|
+
}
|
|
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?.();
|
|
338
|
+
}
|
|
339
|
+
let c = Q("datePicker"), l = v(() => e.valueFormat ?? c.value?.valueFormat);
|
|
340
|
+
return (t, n) => (k(), y(I(a), E({
|
|
341
|
+
disabled: e.disabled,
|
|
342
|
+
disabledDate: e.disabledDate,
|
|
343
|
+
type: e.type,
|
|
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"),
|
|
348
|
+
shortcuts: e.shortcuts,
|
|
349
|
+
size: e.size,
|
|
350
|
+
teleported: e.teleported
|
|
351
|
+
}, {
|
|
352
|
+
modelValue: o.value,
|
|
353
|
+
"onUpdate:modelValue": n[0] ||= (e) => o.value = e,
|
|
354
|
+
onBlur: n[1] ||= (e) => t.$emit("blur", e),
|
|
355
|
+
onFocus: n[2] ||= (e) => t.$emit("focus", e)
|
|
356
|
+
}), null, 16, ["modelValue"]));
|
|
357
|
+
}
|
|
358
|
+
}), ze = /* @__PURE__ */ S({
|
|
359
|
+
__name: "Dialog",
|
|
360
|
+
props: /*@__PURE__*/ T({
|
|
361
|
+
alignCenter: { type: Boolean },
|
|
362
|
+
bodyClass: {},
|
|
363
|
+
center: { type: Boolean },
|
|
364
|
+
closeOnClickModal: {
|
|
365
|
+
type: Boolean,
|
|
366
|
+
default: () => void 0
|
|
367
|
+
},
|
|
368
|
+
closeOnPressEscape: {
|
|
369
|
+
type: Boolean,
|
|
370
|
+
default: () => void 0
|
|
371
|
+
},
|
|
372
|
+
draggable: { type: Boolean },
|
|
373
|
+
showClose: {
|
|
374
|
+
type: Boolean,
|
|
375
|
+
default: () => void 0
|
|
376
|
+
},
|
|
377
|
+
title: {},
|
|
378
|
+
width: {}
|
|
379
|
+
}, {
|
|
380
|
+
modelValue: { type: Boolean },
|
|
381
|
+
modelModifiers: {}
|
|
382
|
+
}),
|
|
383
|
+
emits: ["update:modelValue"],
|
|
384
|
+
setup(e) {
|
|
385
|
+
let t = L(e, "modelValue");
|
|
386
|
+
return (n, r) => (k(), y(I(o), E({
|
|
387
|
+
modelValue: t.value,
|
|
388
|
+
"onUpdate:modelValue": r[0] ||= (e) => t.value = e
|
|
389
|
+
}, {
|
|
390
|
+
bodyClass: e.bodyClass,
|
|
391
|
+
width: e.width,
|
|
392
|
+
showClose: e.showClose,
|
|
393
|
+
title: e.title,
|
|
394
|
+
center: e.center,
|
|
395
|
+
alignCenter: e.alignCenter,
|
|
396
|
+
draggable: e.draggable,
|
|
397
|
+
closeOnClickModal: e.closeOnClickModal,
|
|
398
|
+
closeOnPressEscape: e.closeOnPressEscape
|
|
399
|
+
}), b({
|
|
400
|
+
default: B(() => [N(n.$slots, "default")]),
|
|
401
|
+
_: 2
|
|
402
|
+
}, ["header" in n.$slots ? {
|
|
403
|
+
name: "header",
|
|
404
|
+
fn: B(() => [N(n.$slots, "header")]),
|
|
405
|
+
key: "0"
|
|
406
|
+
} : void 0, "footer" in n.$slots ? {
|
|
407
|
+
name: "footer",
|
|
408
|
+
fn: B(() => [N(n.$slots, "footer")]),
|
|
409
|
+
key: "1"
|
|
410
|
+
} : void 0]), 1040, ["modelValue"]));
|
|
411
|
+
}
|
|
412
|
+
}), Be = /* @__PURE__ */ S({
|
|
413
|
+
__name: "Form",
|
|
414
|
+
props: {
|
|
415
|
+
content: { type: Function },
|
|
416
|
+
data: {},
|
|
417
|
+
disabled: {
|
|
418
|
+
type: Boolean,
|
|
419
|
+
default: () => void 0
|
|
420
|
+
},
|
|
421
|
+
inline: { type: Boolean },
|
|
422
|
+
labelPosition: {},
|
|
423
|
+
labelSuffix: {},
|
|
424
|
+
labelWidth: {},
|
|
425
|
+
size: {}
|
|
426
|
+
},
|
|
427
|
+
setup(e, { expose: t }) {
|
|
428
|
+
let n = R("form"), r = () => e.content?.({ data: e.data ?? {} });
|
|
429
|
+
A(Oe, !0);
|
|
430
|
+
let i = [];
|
|
431
|
+
A(je, i);
|
|
432
|
+
let a = () => i.every((e) => e.validate()), o = () => i.forEach((e) => e.clearValidate());
|
|
433
|
+
return t({
|
|
434
|
+
clearValidate: o,
|
|
435
|
+
data: e.data,
|
|
436
|
+
resetFields: () => {
|
|
437
|
+
o(), n.value?.resetFields();
|
|
438
|
+
},
|
|
439
|
+
validate: a
|
|
440
|
+
}), (t, i) => (k(), y(I(s), E({
|
|
441
|
+
ref_key: "form",
|
|
442
|
+
ref: n
|
|
443
|
+
}, {
|
|
444
|
+
model: e.data,
|
|
445
|
+
disabled: e.disabled,
|
|
446
|
+
inline: e.inline,
|
|
447
|
+
labelPosition: e.labelPosition,
|
|
448
|
+
labelWidth: e.labelWidth,
|
|
449
|
+
labelSuffix: e.labelSuffix,
|
|
450
|
+
size: e.size
|
|
451
|
+
}, { onSubmit: i[0] ||= ue(() => {}, ["prevent"]) }), {
|
|
452
|
+
default: B(() => [x(r)]),
|
|
453
|
+
_: 1
|
|
454
|
+
}, 16));
|
|
455
|
+
}
|
|
456
|
+
}), Ve = /* @__PURE__ */ S({
|
|
457
|
+
__name: "FormItem",
|
|
458
|
+
props: {
|
|
459
|
+
content: { type: Function },
|
|
460
|
+
label: {},
|
|
461
|
+
required: { type: Boolean },
|
|
462
|
+
validator: { type: Function }
|
|
463
|
+
},
|
|
464
|
+
setup(e) {
|
|
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 = {
|
|
466
|
+
clearValidate: () => o.value = void 0,
|
|
467
|
+
id: s,
|
|
468
|
+
label: e.label,
|
|
469
|
+
required: e.required,
|
|
470
|
+
validate: () => (o.value = l.validator?.() ?? void 0, o.value && n && r && i && a?.trigger(i), !o.value),
|
|
471
|
+
validator: e.validator
|
|
472
|
+
};
|
|
473
|
+
A(Z, l), O(() => {
|
|
474
|
+
t?.some((e) => e.id === s) || t?.push(l);
|
|
475
|
+
}), ce(() => {
|
|
476
|
+
let e = t?.findIndex((e) => e.id === s);
|
|
477
|
+
e && e > -1 && t?.splice(e, 1);
|
|
478
|
+
});
|
|
479
|
+
let u = () => e.content?.();
|
|
480
|
+
return (t, n) => (k(), y(I(c), {
|
|
481
|
+
label: e.label,
|
|
482
|
+
required: e.required,
|
|
483
|
+
error: o.value
|
|
484
|
+
}, b({
|
|
485
|
+
default: B(() => [N(t.$slots, "default", {}, () => [x(u)])]),
|
|
486
|
+
_: 2
|
|
487
|
+
}, ["label" in t.$slots ? {
|
|
488
|
+
name: "label",
|
|
489
|
+
fn: B(() => [N(t.$slots, "label")]),
|
|
490
|
+
key: "0"
|
|
491
|
+
} : void 0]), 1032, [
|
|
492
|
+
"label",
|
|
493
|
+
"required",
|
|
494
|
+
"error"
|
|
495
|
+
]));
|
|
496
|
+
}
|
|
497
|
+
}), $ = /* @__PURE__ */ S({
|
|
498
|
+
__name: "Input",
|
|
499
|
+
props: /*@__PURE__*/ T({
|
|
500
|
+
autocomplete: {},
|
|
501
|
+
autosize: { type: [Object, Boolean] },
|
|
502
|
+
clearable: { type: Boolean },
|
|
503
|
+
disabled: {
|
|
504
|
+
type: Boolean,
|
|
505
|
+
default: () => void 0
|
|
506
|
+
},
|
|
507
|
+
placeholder: {},
|
|
508
|
+
prefixIcon: {},
|
|
509
|
+
showPassword: { type: Boolean },
|
|
510
|
+
size: {},
|
|
511
|
+
suffixIcon: {},
|
|
512
|
+
type: {}
|
|
513
|
+
}, {
|
|
514
|
+
modelValue: {},
|
|
515
|
+
modelModifiers: {}
|
|
516
|
+
}),
|
|
517
|
+
emits: /*@__PURE__*/ T([
|
|
518
|
+
"blur",
|
|
519
|
+
"change",
|
|
520
|
+
"focus"
|
|
521
|
+
], ["update:modelValue"]),
|
|
522
|
+
setup(e, { emit: t }) {
|
|
523
|
+
let n = t, r = L(e, "modelValue"), { t: i } = g(w(X, void 0)), a = w(Z, void 0);
|
|
524
|
+
if (a?.required) {
|
|
525
|
+
let { label: e, validator: t } = a;
|
|
526
|
+
a.validator = () => e && !r.value ? i("el.validation.input", { label: e }) : t?.();
|
|
527
|
+
}
|
|
528
|
+
let o = (e) => {
|
|
529
|
+
n("blur", e), a?.validate?.();
|
|
530
|
+
}, s = (e) => {
|
|
531
|
+
n("focus", e);
|
|
532
|
+
}, c = (e) => {
|
|
533
|
+
n("change", e);
|
|
534
|
+
};
|
|
535
|
+
return (t, n) => (k(), y(I(l), E({
|
|
536
|
+
disabled: e.disabled,
|
|
537
|
+
type: e.type,
|
|
538
|
+
size: e.size,
|
|
539
|
+
clearable: e.clearable,
|
|
540
|
+
showPassword: e.showPassword,
|
|
541
|
+
autocomplete: e.autocomplete,
|
|
542
|
+
autosize: e.autosize,
|
|
543
|
+
placeholder: e.placeholder ?? I(i)("el.input.placeholder")
|
|
544
|
+
}, {
|
|
545
|
+
modelValue: r.value,
|
|
546
|
+
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
547
|
+
onBlur: o,
|
|
548
|
+
onFocus: s,
|
|
549
|
+
onChange: c
|
|
550
|
+
}), b({ _: 2 }, [
|
|
551
|
+
"append" in t.$slots ? {
|
|
552
|
+
name: "append",
|
|
553
|
+
fn: B(() => [N(t.$slots, "append")]),
|
|
554
|
+
key: "0"
|
|
555
|
+
} : void 0,
|
|
556
|
+
"prepend" in t.$slots ? {
|
|
557
|
+
name: "prepend",
|
|
558
|
+
fn: B(() => [N(t.$slots, "prepend")]),
|
|
559
|
+
key: "1"
|
|
560
|
+
} : void 0,
|
|
561
|
+
"prefix" in t.$slots ? {
|
|
562
|
+
name: "prefix",
|
|
563
|
+
fn: B(() => [N(t.$slots, "prefix")]),
|
|
564
|
+
key: "2"
|
|
565
|
+
} : void 0,
|
|
566
|
+
"suffix" in t.$slots ? {
|
|
567
|
+
name: "suffix",
|
|
568
|
+
fn: B(() => [N(t.$slots, "suffix")]),
|
|
569
|
+
key: "3"
|
|
570
|
+
} : void 0
|
|
571
|
+
]), 1040, ["modelValue"]));
|
|
572
|
+
}
|
|
573
|
+
}), He = /* @__PURE__ */ S({
|
|
574
|
+
__name: "InputNumber",
|
|
575
|
+
props: /*@__PURE__*/ T({
|
|
576
|
+
align: {},
|
|
577
|
+
controls: { type: Boolean },
|
|
578
|
+
disabled: {
|
|
579
|
+
type: Boolean,
|
|
580
|
+
default: () => void 0
|
|
581
|
+
},
|
|
582
|
+
inputmode: {},
|
|
583
|
+
max: {},
|
|
584
|
+
min: {},
|
|
585
|
+
placeholder: {},
|
|
586
|
+
precision: {},
|
|
587
|
+
size: {},
|
|
588
|
+
step: {},
|
|
589
|
+
stepStrictly: { type: Boolean }
|
|
590
|
+
}, {
|
|
591
|
+
modelValue: {},
|
|
592
|
+
modelModifiers: {}
|
|
593
|
+
}),
|
|
594
|
+
emits: /*@__PURE__*/ T(["blur", "focus"], ["update:modelValue"]),
|
|
595
|
+
setup(e, { emit: t }) {
|
|
596
|
+
let n = t, r = L(e, "modelValue"), { t: i } = g(w(X)), a = w(Z, void 0);
|
|
597
|
+
if (a?.required) {
|
|
598
|
+
let { label: e, validator: t } = a;
|
|
599
|
+
a.validator = () => e && !r.value ? i("el.validation.inputNumber", { label: e }) : t?.();
|
|
600
|
+
}
|
|
601
|
+
let o = (e) => {
|
|
602
|
+
n("focus", e);
|
|
603
|
+
}, s = (e) => {
|
|
604
|
+
n("blur", e);
|
|
605
|
+
};
|
|
606
|
+
return (t, n) => (k(), y(I(u), E({
|
|
607
|
+
align: e.align,
|
|
608
|
+
controls: e.controls,
|
|
609
|
+
disabled: e.disabled,
|
|
610
|
+
inputmode: e.inputmode,
|
|
611
|
+
max: e.max,
|
|
612
|
+
min: e.min,
|
|
613
|
+
placeholder: e.placeholder ?? I(i)("el.inputNumber.placeholder"),
|
|
614
|
+
precision: e.precision,
|
|
615
|
+
size: e.size,
|
|
616
|
+
step: e.step,
|
|
617
|
+
stepStrictly: e.stepStrictly
|
|
618
|
+
}, {
|
|
619
|
+
modelValue: r.value,
|
|
620
|
+
"onUpdate:modelValue": n[0] ||= (e) => r.value = e,
|
|
621
|
+
onBlur: s,
|
|
622
|
+
onFocus: o
|
|
623
|
+
}), b({ _: 2 }, ["prefix" in t.$slots ? {
|
|
624
|
+
name: "prefix",
|
|
625
|
+
fn: B(() => [N(t.$slots, "prefix")]),
|
|
626
|
+
key: "0"
|
|
627
|
+
} : void 0, "suffix" in t.$slots ? {
|
|
628
|
+
name: "suffix",
|
|
629
|
+
fn: B(() => [N(t.$slots, "suffix")]),
|
|
630
|
+
key: "1"
|
|
631
|
+
} : void 0]), 1040, ["modelValue"]));
|
|
632
|
+
}
|
|
633
|
+
}), Ue = /* @__PURE__ */ S({
|
|
634
|
+
__name: "Pagination",
|
|
635
|
+
props: /*@__PURE__*/ T({
|
|
636
|
+
background: { type: Boolean },
|
|
637
|
+
layout: {},
|
|
638
|
+
pageSizes: {},
|
|
639
|
+
size: {},
|
|
640
|
+
total: {},
|
|
641
|
+
defaultPageSize: {}
|
|
642
|
+
}, {
|
|
643
|
+
currentPage: {},
|
|
644
|
+
currentPageModifiers: {},
|
|
645
|
+
pageSize: {},
|
|
646
|
+
pageSizeModifiers: {}
|
|
647
|
+
}),
|
|
648
|
+
emits: /*@__PURE__*/ T(["currentChange", "sizeChange"], ["update:currentPage", "update:pageSize"]),
|
|
649
|
+
setup(e, { emit: t }) {
|
|
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(d), E({
|
|
652
|
+
size: e.size,
|
|
653
|
+
total: e.total,
|
|
654
|
+
pageSizes: e.pageSizes,
|
|
655
|
+
background: e.background,
|
|
656
|
+
layout: o.value
|
|
657
|
+
}, {
|
|
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)
|
|
665
|
+
}), {
|
|
666
|
+
default: B(() => [N(t.$slots, "default")]),
|
|
667
|
+
_: 3
|
|
668
|
+
}, 16, [
|
|
669
|
+
"current-page",
|
|
670
|
+
"page-size",
|
|
671
|
+
"default-page-size"
|
|
672
|
+
]));
|
|
673
|
+
}
|
|
674
|
+
}), We = /* @__PURE__ */ S({
|
|
675
|
+
__name: "Select",
|
|
676
|
+
props: /*@__PURE__*/ T({
|
|
677
|
+
allowCreate: { type: Boolean },
|
|
678
|
+
clearable: { type: Boolean },
|
|
679
|
+
collapseTags: { type: Boolean },
|
|
680
|
+
collapseTagsTooltip: { type: Boolean },
|
|
681
|
+
data: {},
|
|
682
|
+
defaultFirstOption: { type: Boolean },
|
|
683
|
+
disabled: {
|
|
684
|
+
type: Boolean,
|
|
685
|
+
default: () => void 0
|
|
686
|
+
},
|
|
687
|
+
factory: { type: Function },
|
|
688
|
+
filterable: { type: Boolean },
|
|
689
|
+
identify: { type: Function },
|
|
690
|
+
loading: { type: Boolean },
|
|
691
|
+
multiple: { type: Boolean },
|
|
692
|
+
placeholder: {},
|
|
693
|
+
remote: { type: Boolean },
|
|
694
|
+
remoteMethod: { type: Function },
|
|
695
|
+
size: {},
|
|
696
|
+
supplement: { type: Function }
|
|
697
|
+
}, {
|
|
698
|
+
modelValue: {},
|
|
699
|
+
modelModifiers: {}
|
|
700
|
+
}),
|
|
701
|
+
emits: /*@__PURE__*/ T([
|
|
702
|
+
"blur",
|
|
703
|
+
"change",
|
|
704
|
+
"focus"
|
|
705
|
+
], ["update:modelValue"]),
|
|
706
|
+
setup(e, { emit: t }) {
|
|
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) => {
|
|
708
|
+
if (typeof t == "object") {
|
|
709
|
+
if (e.identify) return e.identify(t);
|
|
710
|
+
throw Error("`identify` is required when value's type extends `object` or `object[]`");
|
|
711
|
+
} else return t;
|
|
712
|
+
}, l = (e) => s.value.map((e) => e.value).find((t) => c(t) === e), u = 0;
|
|
713
|
+
z([r, o], async () => {
|
|
714
|
+
if (u++, r.value) {
|
|
715
|
+
let t = [...Array.isArray(r.value) ? r.value : [r.value]].filter((e) => !o.value.map((e) => c(e.value)).includes(c(e))), n = u, i = await e.supplement?.(t);
|
|
716
|
+
n === u && i && (a.value = i);
|
|
717
|
+
} else a.value = [];
|
|
718
|
+
}, { immediate: !0 });
|
|
719
|
+
let d = v(() => s.value.map((e) => {
|
|
720
|
+
let t = c(e.value);
|
|
721
|
+
return {
|
|
722
|
+
disabled: e.disabled,
|
|
723
|
+
key: t,
|
|
724
|
+
label: e.label,
|
|
725
|
+
render: e.render,
|
|
726
|
+
value: t
|
|
727
|
+
};
|
|
728
|
+
})), f = v({
|
|
729
|
+
get: () => r.value && (Array.isArray(r.value) ? r.value.map(c) : c(r.value)),
|
|
730
|
+
set: (t) => {
|
|
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);
|
|
732
|
+
}
|
|
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?.();
|
|
737
|
+
}
|
|
738
|
+
let ne = (e) => {
|
|
739
|
+
n("blur", e), p?.validate?.();
|
|
740
|
+
}, m = (e) => {
|
|
741
|
+
n("focus", e);
|
|
742
|
+
}, h = (e) => {
|
|
743
|
+
n("change", e);
|
|
744
|
+
}, b = (e) => x(ee, {
|
|
745
|
+
disabled: e.disabled,
|
|
746
|
+
label: e.label,
|
|
747
|
+
value: e.value
|
|
748
|
+
}, { default: () => e.render?.() ?? e.label });
|
|
749
|
+
return (t, n) => (k(), y(I(te), E({
|
|
750
|
+
placeholder: e.placeholder ?? I(i)("el.select.placeholder"),
|
|
751
|
+
disabled: e.disabled,
|
|
752
|
+
allowCreate: e.allowCreate,
|
|
753
|
+
remote: e.remote,
|
|
754
|
+
filterable: e.filterable || e.remote,
|
|
755
|
+
clearable: e.clearable,
|
|
756
|
+
remoteMethod: e.remoteMethod,
|
|
757
|
+
multiple: e.multiple,
|
|
758
|
+
loading: e.loading,
|
|
759
|
+
size: e.size,
|
|
760
|
+
collapseTags: e.collapseTags,
|
|
761
|
+
collapseTagsTooltip: e.collapseTagsTooltip,
|
|
762
|
+
defaultFirstOption: e.defaultFirstOption || e.allowCreate
|
|
763
|
+
}, {
|
|
764
|
+
modelValue: f.value,
|
|
765
|
+
"onUpdate:modelValue": n[0] ||= (e) => f.value = e,
|
|
766
|
+
onBlur: ne,
|
|
767
|
+
onFocus: m,
|
|
768
|
+
onChange: h
|
|
769
|
+
}), {
|
|
770
|
+
default: B(() => [(k(!0), re(_, null, M(d.value, (e) => (k(), y(b, {
|
|
771
|
+
key: e.key,
|
|
772
|
+
label: e.label,
|
|
773
|
+
value: e.value,
|
|
774
|
+
disabled: e.disabled,
|
|
775
|
+
render: e.render
|
|
776
|
+
}, null, 8, [
|
|
777
|
+
"label",
|
|
778
|
+
"value",
|
|
779
|
+
"disabled",
|
|
780
|
+
"render"
|
|
781
|
+
]))), 128))]),
|
|
782
|
+
_: 1
|
|
783
|
+
}, 16, ["modelValue"]));
|
|
784
|
+
}
|
|
785
|
+
}), Ge = /* @__PURE__ */ S({
|
|
786
|
+
__name: "Table",
|
|
787
|
+
props: {
|
|
788
|
+
cellClassName: { type: [Function, String] },
|
|
789
|
+
cellStyle: { type: [Function, Object] },
|
|
790
|
+
columns: {},
|
|
791
|
+
data: {},
|
|
792
|
+
height: {},
|
|
793
|
+
rowClassName: { type: [Function, String] },
|
|
794
|
+
rowKey: { type: [Function, String] },
|
|
795
|
+
rowStyle: { type: [Function, Object] },
|
|
796
|
+
showSummary: { type: Boolean },
|
|
797
|
+
size: {},
|
|
798
|
+
spanMethod: { type: Function },
|
|
799
|
+
summaryMethod: { type: Function },
|
|
800
|
+
align: {},
|
|
801
|
+
border: {
|
|
802
|
+
type: Boolean,
|
|
803
|
+
default: () => void 0
|
|
804
|
+
},
|
|
805
|
+
emptyText: {},
|
|
806
|
+
fit: {
|
|
807
|
+
type: Boolean,
|
|
808
|
+
default: () => void 0
|
|
809
|
+
},
|
|
810
|
+
headerAlign: {},
|
|
811
|
+
showOverflowTooltip: {
|
|
812
|
+
type: [Boolean, Object],
|
|
813
|
+
default: () => void 0
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
emits: [
|
|
817
|
+
"headerDragend",
|
|
818
|
+
"rowClick",
|
|
819
|
+
"rowDblclick",
|
|
820
|
+
"scroll",
|
|
821
|
+
"selectionChange"
|
|
822
|
+
],
|
|
823
|
+
setup(e, { expose: t }) {
|
|
824
|
+
let n = R("table");
|
|
825
|
+
t({
|
|
826
|
+
clearSelection: () => n.value?.clearSelection(),
|
|
827
|
+
doLayout: () => n.value?.doLayout(),
|
|
828
|
+
getSelectionRows: () => n.value?.getSelectionRows(),
|
|
829
|
+
scrollTo: (e, t) => n.value?.scrollTo(e, t),
|
|
830
|
+
setCurrentRow: (e) => n.value?.setCurrentRow(e),
|
|
831
|
+
setScrollLeft: (e) => n.value?.setScrollLeft(e),
|
|
832
|
+
setScrollTop: (e) => n.value?.setScrollTop(e),
|
|
833
|
+
toggleAllSelection: () => n.value?.toggleAllSelection(),
|
|
834
|
+
toggleRowSelection: (e, t, r) => n.value?.toggleRowSelection(e, t, r)
|
|
835
|
+
}), A(De, !0);
|
|
836
|
+
let r = /* @__PURE__ */ S((e) => () => x(ne, {
|
|
837
|
+
align: e.align,
|
|
838
|
+
columnKey: e.columnKey,
|
|
839
|
+
fixed: e.fixed,
|
|
840
|
+
headerAlign: e.headerAlign,
|
|
841
|
+
label: e.label,
|
|
842
|
+
minWidth: e.minWidth,
|
|
843
|
+
prop: e.prop,
|
|
844
|
+
selectable: e.selectable,
|
|
845
|
+
type: e.type,
|
|
846
|
+
width: e.width
|
|
847
|
+
}, {
|
|
848
|
+
default: ({ $index: t, row: n }) => e.content?.({
|
|
849
|
+
index: t,
|
|
850
|
+
row: n
|
|
851
|
+
}),
|
|
852
|
+
header: () => e.header?.({ column: { ...e } })
|
|
853
|
+
}), { props: [
|
|
854
|
+
"content",
|
|
855
|
+
"fixed",
|
|
856
|
+
"header",
|
|
857
|
+
"label",
|
|
858
|
+
"prop",
|
|
859
|
+
"selectable",
|
|
860
|
+
"type",
|
|
861
|
+
"width"
|
|
862
|
+
] }), i = Q("table"), a = v(() => e.align ?? i.value?.align), o = v(() => e.border ?? i.value?.border), s = v(() => e.showOverflowTooltip ?? i.value?.showOverflowTooltip), c = v(() => e.fit ?? i.value?.fit), l = v(() => e.headerAlign ?? i.value?.headerAlign);
|
|
863
|
+
return (t, i) => (k(), y(I(p), E({
|
|
864
|
+
ref_key: "table",
|
|
865
|
+
ref: n,
|
|
866
|
+
data: e.data
|
|
867
|
+
}, {
|
|
868
|
+
height: e.height,
|
|
869
|
+
rowClassName: e.rowClassName,
|
|
870
|
+
rowStyle: e.rowStyle,
|
|
871
|
+
cellClassName: e.cellClassName,
|
|
872
|
+
cellStyle: e.cellStyle,
|
|
873
|
+
showSummary: e.showSummary,
|
|
874
|
+
spanMethod: e.spanMethod,
|
|
875
|
+
summaryMethod: e.summaryMethod,
|
|
876
|
+
size: e.size,
|
|
877
|
+
rowKey: e.rowKey,
|
|
878
|
+
showOverflowTooltip: s.value,
|
|
879
|
+
fit: c.value,
|
|
880
|
+
border: o.value
|
|
881
|
+
}, {
|
|
882
|
+
onScroll: i[0] ||= ({ scrollLeft: e, scrollTop: n }) => t.$emit("scroll", {
|
|
883
|
+
scrollLeft: e,
|
|
884
|
+
scrollTop: n
|
|
885
|
+
}),
|
|
886
|
+
onRowClick: i[1] ||= (e) => t.$emit("rowClick", e),
|
|
887
|
+
onRowDblclick: i[2] ||= (e) => t.$emit("rowDblclick", e),
|
|
888
|
+
onSelectionChange: i[3] ||= (e) => t.$emit("selectionChange", e),
|
|
889
|
+
onHeaderDragend: i[4] ||= (e, n, r) => t.$emit("headerDragend", e, n, r)
|
|
890
|
+
}), {
|
|
891
|
+
default: B(() => [(k(!0), re(_, null, M(e.columns, (e) => (k(), y(I(r), E({ ref_for: !0 }, {
|
|
892
|
+
align: a.value,
|
|
893
|
+
headerAlign: l.value,
|
|
894
|
+
...e
|
|
895
|
+
}), null, 16))), 256))]),
|
|
896
|
+
_: 1
|
|
897
|
+
}, 16, ["data"]));
|
|
898
|
+
}
|
|
899
|
+
}), Ke = /* @__PURE__ */ S({
|
|
900
|
+
__name: "TabPane",
|
|
901
|
+
props: {
|
|
902
|
+
closable: { type: Boolean },
|
|
903
|
+
disabled: { type: Boolean },
|
|
904
|
+
label: {},
|
|
905
|
+
lazy: { type: Boolean },
|
|
906
|
+
name: {}
|
|
907
|
+
},
|
|
908
|
+
setup(e, { expose: t }) {
|
|
909
|
+
return t({
|
|
910
|
+
label: e.label,
|
|
911
|
+
name: e.name
|
|
912
|
+
}), A(Ae, !0), A(Me, e.name), (t, n) => (k(), y(I(f), D(C({
|
|
913
|
+
label: e.label,
|
|
914
|
+
name: e.name,
|
|
915
|
+
disabled: e.disabled,
|
|
916
|
+
closable: e.closable,
|
|
917
|
+
lazy: e.lazy
|
|
918
|
+
})), {
|
|
919
|
+
default: B(() => [N(t.$slots, "default")]),
|
|
920
|
+
_: 3
|
|
921
|
+
}, 16));
|
|
922
|
+
}
|
|
923
|
+
}), qe = /* @__PURE__ */ S({
|
|
924
|
+
__name: "Tabs",
|
|
925
|
+
props: /*@__PURE__*/ T({
|
|
926
|
+
addable: { type: Boolean },
|
|
927
|
+
editable: { type: Boolean },
|
|
928
|
+
tabPosition: {},
|
|
929
|
+
type: {}
|
|
930
|
+
}, {
|
|
931
|
+
modelValue: {},
|
|
932
|
+
modelModifiers: {}
|
|
933
|
+
}),
|
|
934
|
+
emits: /*@__PURE__*/ T([
|
|
935
|
+
"change",
|
|
936
|
+
"edit",
|
|
937
|
+
"remove"
|
|
938
|
+
], ["update:modelValue"]),
|
|
939
|
+
setup(e) {
|
|
940
|
+
let t = L(e, "modelValue");
|
|
941
|
+
A(ke, !0);
|
|
942
|
+
let n = de();
|
|
943
|
+
return A(Ne, n), n.on((e) => t.value = e), (n, r) => (k(), y(I(m), E({
|
|
944
|
+
addable: e.addable,
|
|
945
|
+
editable: e.editable,
|
|
946
|
+
tabPosition: e.tabPosition,
|
|
947
|
+
type: e.type
|
|
948
|
+
}, {
|
|
949
|
+
modelValue: t.value,
|
|
950
|
+
"onUpdate:modelValue": r[0] ||= (e) => t.value = e,
|
|
951
|
+
onTabChange: r[1] ||= (e) => n.$emit("change", e),
|
|
952
|
+
onTabRemove: r[2] ||= (e) => n.$emit("remove", e),
|
|
953
|
+
onEdit: r[3] ||= (e, t) => n.$emit("edit", e, t)
|
|
954
|
+
}), b({
|
|
955
|
+
default: B(() => [N(n.$slots, "default")]),
|
|
956
|
+
_: 2
|
|
957
|
+
}, ["addIcon" in n.$slots ? {
|
|
958
|
+
name: "add-icon",
|
|
959
|
+
fn: B(() => [N(n.$slots, "addIcon")]),
|
|
960
|
+
key: "0"
|
|
961
|
+
} : void 0]), 1040, ["modelValue"]));
|
|
962
|
+
}
|
|
963
|
+
}), Je = /* @__PURE__ */ S({
|
|
964
|
+
__name: "Upload",
|
|
965
|
+
props: {
|
|
966
|
+
accept: {},
|
|
967
|
+
action: {},
|
|
968
|
+
beforeUpload: { type: Function },
|
|
969
|
+
data: { type: [Promise, Function] },
|
|
970
|
+
disabled: { type: Boolean },
|
|
971
|
+
fileList: {},
|
|
972
|
+
limit: {},
|
|
973
|
+
multiple: { type: Boolean },
|
|
974
|
+
onPreview: { type: Function },
|
|
975
|
+
onRemove: { type: Function },
|
|
976
|
+
onSuccess: { type: Function },
|
|
977
|
+
showFileList: {
|
|
978
|
+
type: Boolean,
|
|
979
|
+
default: () => void 0
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
setup(e) {
|
|
983
|
+
let t = w(Z, void 0);
|
|
984
|
+
if (t?.required) {
|
|
985
|
+
let { validator: e } = t;
|
|
986
|
+
t.validator = () => e?.();
|
|
987
|
+
}
|
|
988
|
+
let n = (t, n, r) => {
|
|
989
|
+
e.onSuccess?.(t, n, r);
|
|
990
|
+
}, r = (t, n) => {
|
|
991
|
+
e.onRemove?.(t, n);
|
|
992
|
+
}, i = (t) => {
|
|
993
|
+
e.onPreview?.(t);
|
|
994
|
+
};
|
|
995
|
+
return (t, a) => (k(), y(I(h), D(C({
|
|
996
|
+
action: e.action,
|
|
997
|
+
disabled: e.disabled,
|
|
998
|
+
accept: e.accept,
|
|
999
|
+
data: e.data,
|
|
1000
|
+
limit: e.limit,
|
|
1001
|
+
fileList: e.fileList,
|
|
1002
|
+
showFileList: e.showFileList,
|
|
1003
|
+
multiple: e.multiple,
|
|
1004
|
+
beforeUpload: e.beforeUpload,
|
|
1005
|
+
onPreview: i,
|
|
1006
|
+
onSuccess: n,
|
|
1007
|
+
onRemove: r
|
|
1008
|
+
})), b({
|
|
1009
|
+
default: B(() => [N(t.$slots, "default")]),
|
|
1010
|
+
_: 2
|
|
1011
|
+
}, [
|
|
1012
|
+
"file" in t.$slots ? {
|
|
1013
|
+
name: "file",
|
|
1014
|
+
fn: B(({ file: e, index: n }) => [N(t.$slots, "file", {
|
|
1015
|
+
file: e,
|
|
1016
|
+
index: n
|
|
1017
|
+
})]),
|
|
1018
|
+
key: "0"
|
|
1019
|
+
} : void 0,
|
|
1020
|
+
"tip" in t.$slots ? {
|
|
1021
|
+
name: "tip",
|
|
1022
|
+
fn: B(() => [N(t.$slots, "tip")]),
|
|
1023
|
+
key: "1"
|
|
1024
|
+
} : void 0,
|
|
1025
|
+
"trigger" in t.$slots ? {
|
|
1026
|
+
name: "trigger",
|
|
1027
|
+
fn: B(() => [N(t.$slots, "trigger")]),
|
|
1028
|
+
key: "2"
|
|
1029
|
+
} : void 0
|
|
1030
|
+
]), 1040));
|
|
1031
|
+
}
|
|
1032
|
+
}), Ye = /* @__PURE__ */ H({
|
|
1033
|
+
XButton: () => we,
|
|
1034
|
+
XCascader: () => Pe,
|
|
1035
|
+
XCheckbox: () => Fe,
|
|
1036
|
+
XConfigProvider: () => Ie,
|
|
1037
|
+
XDatePicker: () => Re,
|
|
1038
|
+
XDialog: () => ze,
|
|
1039
|
+
XForm: () => Be,
|
|
1040
|
+
XFormItem: () => Ve,
|
|
1041
|
+
XInput: () => $,
|
|
1042
|
+
XInputNumber: () => He,
|
|
1043
|
+
XPagination: () => Ue,
|
|
1044
|
+
XSelect: () => We,
|
|
1045
|
+
XTabPane: () => Ke,
|
|
1046
|
+
XTable: () => Ge,
|
|
1047
|
+
XTabs: () => qe,
|
|
1048
|
+
XUpload: () => Je
|
|
1049
|
+
});
|
|
1050
|
+
//#endregion
|
|
1051
|
+
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 };
|