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