@pungfe/element 0.0.1-alpha.7 → 0.0.1-alpha.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/basic/XTag.vue.d.ts +28 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +261 -239
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TagProps } from 'element-plus';
|
|
2
|
+
export interface XTagProps {
|
|
3
|
+
type?: TagProps['type'];
|
|
4
|
+
color?: TagProps['color'];
|
|
5
|
+
closable?: TagProps['closable'];
|
|
6
|
+
round?: TagProps['round'];
|
|
7
|
+
}
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
slots: {
|
|
11
|
+
default?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<XTagProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
close: () => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<XTagProps> & Readonly<{
|
|
20
|
+
onClose?: (() => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export { default as XTable } from './basic/XTable.vue';
|
|
|
33
33
|
export * from './basic/XTable.vue';
|
|
34
34
|
export { default as XTabs } from './basic/XTabs.vue';
|
|
35
35
|
export * from './basic/XTabs.vue';
|
|
36
|
+
export { default as XTag } from './basic/XTag.vue';
|
|
37
|
+
export * from './basic/XTag.vue';
|
|
36
38
|
export { default as XText } from './basic/XText.vue';
|
|
37
39
|
export * from './basic/XText.vue';
|
|
38
40
|
export { default as XUpload } from './basic/XUpload.vue';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as b, openBlock as m, createBlock as y, unref as h, mergeProps as
|
|
2
|
-
import { ElButton as pe, ElCascader as be, ElCheckboxGroup as ye, ElCheckbox as ve, ElColorPicker as ge, ElDialog as he, ElDivider as Be, ElForm as we, ElFormItem as Ve, ElMessage as ee, ElImage as Ce, ElInput as Ee, ElPagination as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as b, openBlock as m, createBlock as y, unref as h, mergeProps as V, withCtx as v, renderSlot as E, useModel as T, inject as p, mergeModels as B, computed as C, toValue as L, onMounted as K, nextTick as de, getCurrentScope as re, onScopeDispose as ue, getCurrentInstance as G, shallowRef as N, watch as W, createElementBlock as j, Fragment as Y, renderList as J, useSlots as se, createSlots as ce, normalizeProps as O, guardReactiveProps as M, ref as F, provide as $, createVNode as z, resolveComponent as U, createTextVNode as q, useTemplateRef as Z, toDisplayString as fe, normalizeClass as me } from "vue";
|
|
2
|
+
import { ElButton as pe, ElCascader as be, ElCheckboxGroup as ye, ElCheckbox as ve, ElColorPicker as ge, ElDialog as he, ElDivider as Be, ElForm as we, ElFormItem as Ve, ElMessage as ee, ElImage as Ce, ElInput as Ee, ElPagination as Te, ElRate as xe, ElPopconfirm as Xe, ElScrollbar as Se, ElSpace as ze, ElTable as ke, ElTableColumn as Ie, ElTabs as Ae, ElTabPane as $e, ElTag as Oe, ElText as Me, ElUpload as Pe } from "element-plus";
|
|
3
|
+
const Ke = /* @__PURE__ */ b({
|
|
4
4
|
__name: "XButton",
|
|
5
5
|
props: {
|
|
6
6
|
size: {},
|
|
@@ -24,25 +24,25 @@ const je = /* @__PURE__ */ b({
|
|
|
24
24
|
},
|
|
25
25
|
emits: ["click"],
|
|
26
26
|
setup(e, { emit: t }) {
|
|
27
|
-
const
|
|
28
|
-
return (
|
|
29
|
-
onClick: i[0] || (i[0] = (
|
|
27
|
+
const l = e, n = t;
|
|
28
|
+
return (o, i) => (m(), y(h(pe), V(l, {
|
|
29
|
+
onClick: i[0] || (i[0] = (d) => n("click", d))
|
|
30
30
|
}), {
|
|
31
|
-
default:
|
|
32
|
-
E(
|
|
31
|
+
default: v(() => [
|
|
32
|
+
E(o.$slots, "default")
|
|
33
33
|
]),
|
|
34
34
|
_: 3
|
|
35
35
|
}, 16));
|
|
36
36
|
}
|
|
37
37
|
}), P = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL"), te = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS"), k = /* @__PURE__ */ Symbol(
|
|
38
38
|
"X_FORM_ITEM_VALIDATION"
|
|
39
|
-
),
|
|
39
|
+
), Re = /* @__PURE__ */ Symbol(
|
|
40
40
|
"X_FORM_TAB_UPDATE_HOOK"
|
|
41
41
|
), ae = /* @__PURE__ */ Symbol("X_TAB_PANES"), le = /* @__PURE__ */ Symbol("X_TAB_PANE"), D = /* @__PURE__ */ Symbol(
|
|
42
42
|
"X_TABLE_QUERY_UPDATE_HOOK"
|
|
43
43
|
), H = /* @__PURE__ */ Symbol(
|
|
44
44
|
"X_TABLE_QUERY_EXECUTE_HOOK"
|
|
45
|
-
),
|
|
45
|
+
), Ge = /* @__PURE__ */ b({
|
|
46
46
|
__name: "XCascader",
|
|
47
47
|
props: /* @__PURE__ */ B({
|
|
48
48
|
clearable: {
|
|
@@ -64,74 +64,74 @@ const je = /* @__PURE__ */ b({
|
|
|
64
64
|
setup(e, {
|
|
65
65
|
emit: t
|
|
66
66
|
}) {
|
|
67
|
-
const
|
|
67
|
+
const l = e, n = t, o = T(e, "modelValue"), i = p(k, void 0);
|
|
68
68
|
if (i?.required) {
|
|
69
69
|
const {
|
|
70
70
|
validator: c,
|
|
71
|
-
label:
|
|
71
|
+
label: r
|
|
72
72
|
} = i;
|
|
73
|
-
i.validator = () =>
|
|
73
|
+
i.validator = () => o.value ? c?.() : `请输入${r}`;
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
a?.on(([c,
|
|
75
|
+
const d = p(P, void 0), a = p(D, void 0), u = p(H, void 0);
|
|
76
|
+
a?.on(([c, r]) => d === c && r === void 0 && (o.value = void 0)), u?.on(() => d && a?.trigger([d, o.value]));
|
|
77
77
|
const s = () => {
|
|
78
78
|
i?.validate(), n("blur");
|
|
79
79
|
};
|
|
80
|
-
return (c,
|
|
81
|
-
modelValue:
|
|
82
|
-
"onUpdate:modelValue":
|
|
80
|
+
return (c, r) => (m(), y(h(be), V(l, {
|
|
81
|
+
modelValue: o.value,
|
|
82
|
+
"onUpdate:modelValue": r[0] || (r[0] = (w) => o.value = w),
|
|
83
83
|
onBlur: s
|
|
84
84
|
}), null, 16, ["modelValue"]));
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
|
-
function
|
|
88
|
-
return
|
|
87
|
+
function Le(e, t) {
|
|
88
|
+
return re() ? (ue(e, t), !0) : !1;
|
|
89
89
|
}
|
|
90
|
-
const
|
|
90
|
+
const Ue = typeof window < "u" && typeof document < "u";
|
|
91
91
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
92
|
-
function
|
|
92
|
+
function Fe(e) {
|
|
93
93
|
return Array.isArray(e) ? e : [e];
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function De(e) {
|
|
96
96
|
return G();
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
98
|
+
function He(e, t = !0, l) {
|
|
99
|
+
De() ? K(e, l) : t ? e() : de(e);
|
|
100
100
|
}
|
|
101
101
|
// @__NO_SIDE_EFFECTS__
|
|
102
102
|
function Q(e, t) {
|
|
103
|
-
return
|
|
103
|
+
return C(() => L(e).map((l) => L(l)).map(t));
|
|
104
104
|
}
|
|
105
|
-
const oe =
|
|
105
|
+
const oe = Ue ? window : void 0;
|
|
106
106
|
function I(e) {
|
|
107
107
|
var t;
|
|
108
|
-
const
|
|
109
|
-
return (t =
|
|
108
|
+
const l = L(e);
|
|
109
|
+
return (t = l?.$el) !== null && t !== void 0 ? t : l;
|
|
110
110
|
}
|
|
111
111
|
// @__NO_SIDE_EFFECTS__
|
|
112
|
-
function
|
|
112
|
+
function _e() {
|
|
113
113
|
const e = N(!1), t = G();
|
|
114
114
|
return t && K(() => {
|
|
115
115
|
e.value = !0;
|
|
116
116
|
}, t), e;
|
|
117
117
|
}
|
|
118
118
|
// @__NO_SIDE_EFFECTS__
|
|
119
|
-
function
|
|
120
|
-
const t = /* @__PURE__ */
|
|
121
|
-
return
|
|
119
|
+
function Ne(e) {
|
|
120
|
+
const t = /* @__PURE__ */ _e();
|
|
121
|
+
return C(() => (t.value, !!e()));
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
const { window: n = oe, ...
|
|
123
|
+
function qe(e, t, l = {}) {
|
|
124
|
+
const { window: n = oe, ...o } = l;
|
|
125
125
|
let i;
|
|
126
|
-
const
|
|
126
|
+
const d = /* @__PURE__ */ Ne(() => n && "ResizeObserver" in n), a = () => {
|
|
127
127
|
i && (i.disconnect(), i = void 0);
|
|
128
|
-
}, u = W(
|
|
128
|
+
}, u = W(C(() => {
|
|
129
129
|
const c = L(e);
|
|
130
|
-
return Array.isArray(c) ? c.map((
|
|
130
|
+
return Array.isArray(c) ? c.map((r) => I(r)) : [I(c)];
|
|
131
131
|
}), (c) => {
|
|
132
|
-
if (a(),
|
|
132
|
+
if (a(), d.value && n) {
|
|
133
133
|
i = new ResizeObserver(t);
|
|
134
|
-
for (const
|
|
134
|
+
for (const r of c) r && i.observe(r, o);
|
|
135
135
|
}
|
|
136
136
|
}, {
|
|
137
137
|
immediate: !0,
|
|
@@ -139,49 +139,49 @@ function Ne(e, t, o = {}) {
|
|
|
139
139
|
}), s = () => {
|
|
140
140
|
a(), u();
|
|
141
141
|
};
|
|
142
|
-
return
|
|
143
|
-
isSupported:
|
|
142
|
+
return Le(s), {
|
|
143
|
+
isSupported: d,
|
|
144
144
|
stop: s
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Qe(e, t = {
|
|
148
148
|
width: 0,
|
|
149
149
|
height: 0
|
|
150
|
-
},
|
|
151
|
-
const { window: n = oe, box:
|
|
152
|
-
var
|
|
153
|
-
return (
|
|
154
|
-
}),
|
|
155
|
-
const w =
|
|
150
|
+
}, l = {}) {
|
|
151
|
+
const { window: n = oe, box: o = "content-box" } = l, i = C(() => {
|
|
152
|
+
var r;
|
|
153
|
+
return (r = I(e)) === null || r === void 0 || (r = r.namespaceURI) === null || r === void 0 ? void 0 : r.includes("svg");
|
|
154
|
+
}), d = N(t.width), a = N(t.height), { stop: u } = qe(e, ([r]) => {
|
|
155
|
+
const w = o === "border-box" ? r.borderBoxSize : o === "content-box" ? r.contentBoxSize : r.devicePixelContentBoxSize;
|
|
156
156
|
if (n && i.value) {
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
159
|
-
const X =
|
|
160
|
-
|
|
157
|
+
const x = I(e);
|
|
158
|
+
if (x) {
|
|
159
|
+
const X = x.getBoundingClientRect();
|
|
160
|
+
d.value = X.width, a.value = X.height;
|
|
161
161
|
}
|
|
162
162
|
} else if (w) {
|
|
163
|
-
const
|
|
164
|
-
|
|
163
|
+
const x = Fe(w);
|
|
164
|
+
d.value = x.reduce((X, { inlineSize: A }) => X + A, 0), a.value = x.reduce((X, { blockSize: A }) => X + A, 0);
|
|
165
165
|
} else
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
|
|
166
|
+
d.value = r.contentRect.width, a.value = r.contentRect.height;
|
|
167
|
+
}, l);
|
|
168
|
+
He(() => {
|
|
169
|
+
const r = I(e);
|
|
170
|
+
r && (d.value = "offsetWidth" in r ? r.offsetWidth : t.width, a.value = "offsetHeight" in r ? r.offsetHeight : t.height);
|
|
171
171
|
});
|
|
172
|
-
const s = W(() => I(e), (
|
|
173
|
-
|
|
172
|
+
const s = W(() => I(e), (r) => {
|
|
173
|
+
d.value = r ? t.width : 0, a.value = r ? t.height : 0;
|
|
174
174
|
});
|
|
175
175
|
function c() {
|
|
176
176
|
u(), s();
|
|
177
177
|
}
|
|
178
178
|
return {
|
|
179
|
-
width:
|
|
179
|
+
width: d,
|
|
180
180
|
height: a,
|
|
181
181
|
stop: c
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
const
|
|
184
|
+
const Ye = /* @__PURE__ */ b({
|
|
185
185
|
__name: "XCheckbox",
|
|
186
186
|
props: /* @__PURE__ */ B({
|
|
187
187
|
data: {},
|
|
@@ -224,22 +224,22 @@ const Ge = /* @__PURE__ */ b({
|
|
|
224
224
|
}),
|
|
225
225
|
emits: ["update:modelValue"],
|
|
226
226
|
setup(e) {
|
|
227
|
-
const t =
|
|
227
|
+
const t = T(e, "modelValue"), l = /* @__PURE__ */ Q(() => e.data, e.factory), n = C(() => [...l.value]), o = (s) => {
|
|
228
228
|
if (typeof s == "object") {
|
|
229
229
|
if (e.identify)
|
|
230
230
|
return e.identify(s);
|
|
231
231
|
throw new Error("`identify` is required when value's type extends `object` or `object[]`");
|
|
232
232
|
} else
|
|
233
233
|
return s;
|
|
234
|
-
}, i = (s) => n.value.map((c) => c.value).find((c) =>
|
|
235
|
-
const c =
|
|
234
|
+
}, i = (s) => n.value.map((c) => c.value).find((c) => o(c) === s), d = C(() => n.value.map((s) => {
|
|
235
|
+
const c = o(s.value);
|
|
236
236
|
return {
|
|
237
237
|
...s,
|
|
238
238
|
key: c,
|
|
239
239
|
value: c
|
|
240
240
|
};
|
|
241
|
-
})), a =
|
|
242
|
-
get: () => t.value && t.value.map(
|
|
241
|
+
})), a = C({
|
|
242
|
+
get: () => t.value && t.value.map(o),
|
|
243
243
|
set: (s) => t.value = Array.isArray(s) ? s.map((c) => i(c)) : []
|
|
244
244
|
}), u = p(k, void 0);
|
|
245
245
|
if (u?.required) {
|
|
@@ -249,23 +249,23 @@ const Ge = /* @__PURE__ */ b({
|
|
|
249
249
|
} = u;
|
|
250
250
|
u.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请选择${c}` : s?.();
|
|
251
251
|
}
|
|
252
|
-
return (s, c) => (m(), y(h(ye),
|
|
252
|
+
return (s, c) => (m(), y(h(ye), V({
|
|
253
253
|
modelValue: a.value,
|
|
254
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
254
|
+
"onUpdate:modelValue": c[0] || (c[0] = (r) => a.value = r)
|
|
255
255
|
}, {
|
|
256
256
|
disabled: e.disabled,
|
|
257
257
|
size: e.size
|
|
258
258
|
}), {
|
|
259
|
-
default:
|
|
260
|
-
key:
|
|
261
|
-
disabled:
|
|
262
|
-
label:
|
|
263
|
-
value:
|
|
259
|
+
default: v(() => [(m(!0), j(Y, null, J(d.value, (r) => (m(), y(h(ve), {
|
|
260
|
+
key: r.key,
|
|
261
|
+
disabled: r.disabled,
|
|
262
|
+
label: r.label,
|
|
263
|
+
value: r.value
|
|
264
264
|
}, null, 8, ["disabled", "label", "value"]))), 128))]),
|
|
265
265
|
_: 1
|
|
266
266
|
}, 16, ["modelValue"]));
|
|
267
267
|
}
|
|
268
|
-
}),
|
|
268
|
+
}), Je = /* @__PURE__ */ b({
|
|
269
269
|
__name: "XColorPicker",
|
|
270
270
|
props: /* @__PURE__ */ B({
|
|
271
271
|
clearable: {
|
|
@@ -281,21 +281,21 @@ const Ge = /* @__PURE__ */ b({
|
|
|
281
281
|
}),
|
|
282
282
|
emits: ["update:modelValue"],
|
|
283
283
|
setup(e) {
|
|
284
|
-
const t = e,
|
|
284
|
+
const t = e, l = T(e, "modelValue"), n = p(k, void 0);
|
|
285
285
|
if (n?.required) {
|
|
286
286
|
const {
|
|
287
287
|
validator: a,
|
|
288
288
|
label: u
|
|
289
289
|
} = n;
|
|
290
|
-
n.validator = () =>
|
|
290
|
+
n.validator = () => l.value ? a?.() : `请输入${u}`;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
return i?.on(([a, u]) =>
|
|
294
|
-
modelValue:
|
|
295
|
-
"onUpdate:modelValue": u[0] || (u[0] = (s) =>
|
|
292
|
+
const o = p(P, void 0), i = p(D, void 0), d = p(H, void 0);
|
|
293
|
+
return i?.on(([a, u]) => o === a && u === void 0 && (l.value = void 0)), d?.on(() => o && i?.trigger([o, l.value])), (a, u) => (m(), y(h(ge), V(t, {
|
|
294
|
+
modelValue: l.value,
|
|
295
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => l.value = s)
|
|
296
296
|
}), null, 16, ["modelValue"]));
|
|
297
297
|
}
|
|
298
|
-
}),
|
|
298
|
+
}), Ze = /* @__PURE__ */ b({
|
|
299
299
|
__name: "XDialog",
|
|
300
300
|
props: /* @__PURE__ */ B({
|
|
301
301
|
title: {},
|
|
@@ -310,27 +310,27 @@ const Ge = /* @__PURE__ */ b({
|
|
|
310
310
|
setup(e) {
|
|
311
311
|
const {
|
|
312
312
|
header: t,
|
|
313
|
-
footer:
|
|
314
|
-
} = se(), n =
|
|
315
|
-
return (
|
|
313
|
+
footer: l
|
|
314
|
+
} = se(), n = T(e, "modelValue");
|
|
315
|
+
return (o, i) => (m(), y(h(he), {
|
|
316
316
|
modelValue: n.value,
|
|
317
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
317
|
+
"onUpdate:modelValue": i[0] || (i[0] = (d) => n.value = d),
|
|
318
318
|
title: e.title,
|
|
319
319
|
"body-class": `flex flex-col ${e.bodyClass}`
|
|
320
320
|
}, ce({
|
|
321
|
-
default:
|
|
321
|
+
default: v(() => [E(o.$slots, "default")]),
|
|
322
322
|
_: 2
|
|
323
323
|
}, [t ? {
|
|
324
324
|
name: "header",
|
|
325
|
-
fn:
|
|
325
|
+
fn: v(() => [E(o.$slots, "header")]),
|
|
326
326
|
key: "0"
|
|
327
|
-
} : void 0,
|
|
327
|
+
} : void 0, l ? {
|
|
328
328
|
name: "footer",
|
|
329
|
-
fn:
|
|
329
|
+
fn: v(() => [E(o.$slots, "footer")]),
|
|
330
330
|
key: "1"
|
|
331
331
|
} : void 0]), 1032, ["modelValue", "title", "body-class"]));
|
|
332
332
|
}
|
|
333
|
-
}),
|
|
333
|
+
}), et = /* @__PURE__ */ b({
|
|
334
334
|
__name: "XDivider",
|
|
335
335
|
props: {
|
|
336
336
|
direction: {},
|
|
@@ -339,46 +339,46 @@ const Ge = /* @__PURE__ */ b({
|
|
|
339
339
|
},
|
|
340
340
|
setup(e) {
|
|
341
341
|
const t = e;
|
|
342
|
-
return (
|
|
343
|
-
default:
|
|
344
|
-
E(
|
|
342
|
+
return (l, n) => (m(), y(h(Be), O(M(t)), {
|
|
343
|
+
default: v(() => [
|
|
344
|
+
E(l.$slots, "default")
|
|
345
345
|
]),
|
|
346
346
|
_: 3
|
|
347
347
|
}, 16));
|
|
348
348
|
}
|
|
349
|
-
}),
|
|
349
|
+
}), tt = /* @__PURE__ */ b((e, {
|
|
350
350
|
expose: t
|
|
351
351
|
}) => {
|
|
352
|
-
const
|
|
352
|
+
const l = p(le, void 0), n = p(Re, void 0), o = F(), i = {
|
|
353
353
|
label: e.label,
|
|
354
354
|
required: e.required,
|
|
355
355
|
clearValidate() {
|
|
356
|
-
|
|
356
|
+
o.value = void 0;
|
|
357
357
|
},
|
|
358
358
|
validate() {
|
|
359
|
-
return
|
|
359
|
+
return o.value = i.validator?.() ?? void 0, o.value && l?.name && (ee({
|
|
360
360
|
plain: !0,
|
|
361
361
|
type: "warning",
|
|
362
|
-
message:
|
|
363
|
-
}), n?.trigger(
|
|
362
|
+
message: o.value
|
|
363
|
+
}), n?.trigger(l.name)), !o.value;
|
|
364
364
|
}
|
|
365
365
|
};
|
|
366
366
|
return p(te, void 0)?.push(i), $(k, i), t({
|
|
367
367
|
...i
|
|
368
|
-
}), $(P, e.label), () => z(Ve,
|
|
368
|
+
}), $(P, e.label), () => z(Ve, V({
|
|
369
369
|
label: e.label,
|
|
370
370
|
labelPosition: e.labelPosition,
|
|
371
371
|
labelWidth: e.labelWidth,
|
|
372
372
|
required: e.required
|
|
373
373
|
}, {
|
|
374
|
-
error:
|
|
374
|
+
error: o.value
|
|
375
375
|
}), {
|
|
376
376
|
label: () => e.label,
|
|
377
377
|
default: () => e.content?.()
|
|
378
378
|
});
|
|
379
379
|
}, {
|
|
380
380
|
props: ["label", "required", "content", "tooltip"]
|
|
381
|
-
}),
|
|
381
|
+
}), at = /* @__PURE__ */ b({
|
|
382
382
|
__name: "XForm",
|
|
383
383
|
props: {
|
|
384
384
|
content: {
|
|
@@ -404,22 +404,22 @@ const Ge = /* @__PURE__ */ b({
|
|
|
404
404
|
setup(e, {
|
|
405
405
|
expose: t
|
|
406
406
|
}) {
|
|
407
|
-
const
|
|
407
|
+
const l = F(), n = [];
|
|
408
408
|
$(te, n);
|
|
409
|
-
const
|
|
410
|
-
|
|
409
|
+
const o = () => n.every((a) => a.validate()), i = () => {
|
|
410
|
+
l.value?.resetFields(), n.forEach((a) => a.clearValidate());
|
|
411
411
|
};
|
|
412
412
|
t({
|
|
413
413
|
data: e.data,
|
|
414
|
-
validate:
|
|
414
|
+
validate: o,
|
|
415
415
|
resetFields: i
|
|
416
416
|
});
|
|
417
|
-
const
|
|
417
|
+
const d = () => e.content?.({
|
|
418
418
|
data: e.data
|
|
419
419
|
});
|
|
420
|
-
return (a, u) => (m(), y(h(we),
|
|
420
|
+
return (a, u) => (m(), y(h(we), V({
|
|
421
421
|
ref_key: "form",
|
|
422
|
-
ref:
|
|
422
|
+
ref: l
|
|
423
423
|
}, {
|
|
424
424
|
inline: e.inline,
|
|
425
425
|
disabled: e.disabled,
|
|
@@ -428,11 +428,11 @@ const Ge = /* @__PURE__ */ b({
|
|
|
428
428
|
labelPosition: e.labelPosition,
|
|
429
429
|
statusIcon: e.statusIcon
|
|
430
430
|
}), {
|
|
431
|
-
default:
|
|
431
|
+
default: v(() => [z(d)]),
|
|
432
432
|
_: 1
|
|
433
433
|
}, 16));
|
|
434
434
|
}
|
|
435
|
-
}),
|
|
435
|
+
}), lt = /* @__PURE__ */ b({
|
|
436
436
|
__name: "XImage",
|
|
437
437
|
props: {
|
|
438
438
|
hideOnClickModal: { type: Boolean },
|
|
@@ -456,9 +456,9 @@ const Ge = /* @__PURE__ */ b({
|
|
|
456
456
|
},
|
|
457
457
|
setup(e) {
|
|
458
458
|
const t = e;
|
|
459
|
-
return (
|
|
459
|
+
return (l, n) => (m(), y(h(Ce), O(M(t)), null, 16));
|
|
460
460
|
}
|
|
461
|
-
}),
|
|
461
|
+
}), ot = /* @__PURE__ */ b({
|
|
462
462
|
__name: "XInput",
|
|
463
463
|
props: /* @__PURE__ */ B({
|
|
464
464
|
clearable: {
|
|
@@ -485,27 +485,27 @@ const Ge = /* @__PURE__ */ b({
|
|
|
485
485
|
setup(e, {
|
|
486
486
|
emit: t
|
|
487
487
|
}) {
|
|
488
|
-
const
|
|
488
|
+
const l = e, n = t, o = T(e, "modelValue"), i = p(k, void 0);
|
|
489
489
|
if (i?.required) {
|
|
490
490
|
const {
|
|
491
|
-
validator:
|
|
491
|
+
validator: r,
|
|
492
492
|
label: w
|
|
493
493
|
} = i;
|
|
494
|
-
i.validator = () =>
|
|
494
|
+
i.validator = () => o.value ? r?.() : `请输入${w}`;
|
|
495
495
|
}
|
|
496
|
-
const
|
|
497
|
-
a?.on(([
|
|
498
|
-
const s = (
|
|
496
|
+
const d = p(P, void 0), a = p(D, void 0), u = p(H, void 0);
|
|
497
|
+
a?.on(([r, w]) => d === r && w === void 0 && (o.value = void 0)), u?.on(() => d && a?.trigger([d, o.value]));
|
|
498
|
+
const s = (r) => n("change", r), c = () => {
|
|
499
499
|
i?.validate(), n("blur");
|
|
500
500
|
};
|
|
501
|
-
return (
|
|
502
|
-
modelValue:
|
|
503
|
-
"onUpdate:modelValue": w[0] || (w[0] = (
|
|
501
|
+
return (r, w) => (m(), y(h(Ee), V(l, {
|
|
502
|
+
modelValue: o.value,
|
|
503
|
+
"onUpdate:modelValue": w[0] || (w[0] = (x) => o.value = x),
|
|
504
504
|
onBlur: c,
|
|
505
505
|
onChange: s
|
|
506
506
|
}), null, 16, ["modelValue"]));
|
|
507
507
|
}
|
|
508
|
-
}),
|
|
508
|
+
}), nt = /* @__PURE__ */ b({
|
|
509
509
|
__name: "XInputNumber",
|
|
510
510
|
props: /* @__PURE__ */ B({
|
|
511
511
|
placeholder: {
|
|
@@ -537,27 +537,27 @@ const Ge = /* @__PURE__ */ b({
|
|
|
537
537
|
setup(e, {
|
|
538
538
|
emit: t
|
|
539
539
|
}) {
|
|
540
|
-
const
|
|
540
|
+
const l = e, n = t, o = T(e, "modelValue"), i = p(k, void 0);
|
|
541
541
|
if (i?.required) {
|
|
542
542
|
const {
|
|
543
543
|
validator: a,
|
|
544
544
|
label: u
|
|
545
545
|
} = i;
|
|
546
|
-
i.validator = () =>
|
|
546
|
+
i.validator = () => o.value === void 0 ? `请输入${u}` : a?.();
|
|
547
547
|
}
|
|
548
|
-
const
|
|
548
|
+
const d = () => {
|
|
549
549
|
i?.validate(), n("blur");
|
|
550
550
|
};
|
|
551
551
|
return (a, u) => {
|
|
552
552
|
const s = U("ElInputNumber");
|
|
553
|
-
return m(), y(s,
|
|
554
|
-
modelValue:
|
|
555
|
-
"onUpdate:modelValue": u[0] || (u[0] = (c) =>
|
|
556
|
-
onBlur:
|
|
553
|
+
return m(), y(s, V(l, {
|
|
554
|
+
modelValue: o.value,
|
|
555
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
|
|
556
|
+
onBlur: d
|
|
557
557
|
}), null, 16, ["modelValue"]);
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
|
-
}),
|
|
560
|
+
}), it = /* @__PURE__ */ b({
|
|
561
561
|
__name: "XPagination",
|
|
562
562
|
props: /* @__PURE__ */ B({
|
|
563
563
|
sizes: { default: () => [20, 50, 100] },
|
|
@@ -590,17 +590,17 @@ const Ge = /* @__PURE__ */ b({
|
|
|
590
590
|
}),
|
|
591
591
|
emits: /* @__PURE__ */ B(["sizeChange", "currentChange"], ["update:size", "update:current"]),
|
|
592
592
|
setup(e, { emit: t }) {
|
|
593
|
-
const
|
|
594
|
-
return (i,
|
|
595
|
-
"current-page":
|
|
596
|
-
"onUpdate:currentPage":
|
|
593
|
+
const l = t, n = T(e, "size"), o = T(e, "current");
|
|
594
|
+
return (i, d) => (m(), y(h(Te), V({ background: e.background, pageSizes: e.sizes, layout: e.layout, total: e.total }, {
|
|
595
|
+
"current-page": o.value,
|
|
596
|
+
"onUpdate:currentPage": d[0] || (d[0] = (a) => o.value = a),
|
|
597
597
|
"page-size": n.value,
|
|
598
|
-
"onUpdate:pageSize":
|
|
599
|
-
onSizeChange:
|
|
600
|
-
onCurrentChange:
|
|
598
|
+
"onUpdate:pageSize": d[1] || (d[1] = (a) => n.value = a),
|
|
599
|
+
onSizeChange: d[2] || (d[2] = (a) => l("sizeChange", a)),
|
|
600
|
+
onCurrentChange: d[3] || (d[3] = (a) => l("currentChange", a))
|
|
601
601
|
}), null, 16, ["current-page", "page-size"]));
|
|
602
602
|
}
|
|
603
|
-
}),
|
|
603
|
+
}), dt = /* @__PURE__ */ b({
|
|
604
604
|
__name: "XRate",
|
|
605
605
|
props: /* @__PURE__ */ B({
|
|
606
606
|
ariaLabel: {},
|
|
@@ -640,10 +640,10 @@ const Ge = /* @__PURE__ */ b({
|
|
|
640
640
|
}),
|
|
641
641
|
emits: ["update:modelValue"],
|
|
642
642
|
setup(e) {
|
|
643
|
-
const t = e,
|
|
644
|
-
return (n,
|
|
645
|
-
modelValue:
|
|
646
|
-
"onUpdate:modelValue":
|
|
643
|
+
const t = e, l = T(e, "modelValue");
|
|
644
|
+
return (n, o) => (m(), y(h(xe), V(t, {
|
|
645
|
+
modelValue: l.value,
|
|
646
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => l.value = i)
|
|
647
647
|
}), null, 16, ["modelValue"]));
|
|
648
648
|
}
|
|
649
649
|
}), rt = /* @__PURE__ */ b({
|
|
@@ -653,23 +653,23 @@ const Ge = /* @__PURE__ */ b({
|
|
|
653
653
|
},
|
|
654
654
|
emits: ["cancel", "confirm"],
|
|
655
655
|
setup(e, { emit: t }) {
|
|
656
|
-
const
|
|
657
|
-
return (n,
|
|
656
|
+
const l = t;
|
|
657
|
+
return (n, o) => {
|
|
658
658
|
const i = U("XButton");
|
|
659
659
|
return m(), y(h(Xe), {
|
|
660
660
|
title: e.title,
|
|
661
|
-
onCancel:
|
|
662
|
-
onConfirm:
|
|
661
|
+
onCancel: o[0] || (o[0] = () => l("cancel")),
|
|
662
|
+
onConfirm: o[1] || (o[1] = () => l("confirm"))
|
|
663
663
|
}, {
|
|
664
|
-
reference:
|
|
664
|
+
reference: v(() => [
|
|
665
665
|
E(n.$slots, "default")
|
|
666
666
|
]),
|
|
667
|
-
actions:
|
|
667
|
+
actions: v(({ confirm: d, cancel: a }) => [
|
|
668
668
|
z(i, {
|
|
669
669
|
size: "small",
|
|
670
670
|
onClick: a
|
|
671
671
|
}, {
|
|
672
|
-
default:
|
|
672
|
+
default: v(() => [...o[2] || (o[2] = [
|
|
673
673
|
q(" 取消 ", -1)
|
|
674
674
|
])]),
|
|
675
675
|
_: 1
|
|
@@ -677,9 +677,9 @@ const Ge = /* @__PURE__ */ b({
|
|
|
677
677
|
z(i, {
|
|
678
678
|
type: "danger",
|
|
679
679
|
size: "small",
|
|
680
|
-
onClick:
|
|
680
|
+
onClick: d
|
|
681
681
|
}, {
|
|
682
|
-
default:
|
|
682
|
+
default: v(() => [...o[3] || (o[3] = [
|
|
683
683
|
q(" 确定 ", -1)
|
|
684
684
|
])]),
|
|
685
685
|
_: 1
|
|
@@ -689,7 +689,7 @@ const Ge = /* @__PURE__ */ b({
|
|
|
689
689
|
}, 8, ["title"]);
|
|
690
690
|
};
|
|
691
691
|
}
|
|
692
|
-
}),
|
|
692
|
+
}), ut = /* @__PURE__ */ b({
|
|
693
693
|
__name: "XScrollbar",
|
|
694
694
|
props: {
|
|
695
695
|
ariaLabel: {},
|
|
@@ -719,18 +719,18 @@ const Ge = /* @__PURE__ */ b({
|
|
|
719
719
|
setup(e, {
|
|
720
720
|
expose: t
|
|
721
721
|
}) {
|
|
722
|
-
const
|
|
722
|
+
const l = e, n = Z("scrollbar"), o = C(() => n.value?.wrapRef), i = C(() => o.value?.firstElementChild);
|
|
723
723
|
return t({
|
|
724
|
-
wrapRef:
|
|
724
|
+
wrapRef: o,
|
|
725
725
|
viewRef: i
|
|
726
|
-
}), (
|
|
726
|
+
}), (d, a) => (m(), y(h(Se), V({
|
|
727
727
|
ref: "scrollbar"
|
|
728
|
-
},
|
|
729
|
-
default:
|
|
728
|
+
}, l), {
|
|
729
|
+
default: v(() => [E(d.$slots, "default")]),
|
|
730
730
|
_: 3
|
|
731
731
|
}, 16));
|
|
732
732
|
}
|
|
733
|
-
}),
|
|
733
|
+
}), st = /* @__PURE__ */ b({
|
|
734
734
|
__name: "XSelect",
|
|
735
735
|
props: /* @__PURE__ */ B({
|
|
736
736
|
data: {},
|
|
@@ -841,52 +841,52 @@ const Ge = /* @__PURE__ */ b({
|
|
|
841
841
|
setup(e, {
|
|
842
842
|
emit: t
|
|
843
843
|
}) {
|
|
844
|
-
const
|
|
844
|
+
const l = t, n = T(e, "modelValue"), o = F([]), i = /* @__PURE__ */ Q(() => e.data, e.factory), d = C(() => [...(/* @__PURE__ */ Q(o, e.factory)).value, ...i.value]), a = (f) => {
|
|
845
845
|
if (typeof f == "object") {
|
|
846
846
|
if (e.identify)
|
|
847
847
|
return e.identify(f);
|
|
848
848
|
throw new Error("`identify` is required when value's type extends `object` or `object[]`");
|
|
849
849
|
} else
|
|
850
850
|
return f;
|
|
851
|
-
}, u = (f) =>
|
|
851
|
+
}, u = (f) => d.value.map((g) => g.value).find((g) => a(g) === f);
|
|
852
852
|
let s = 0;
|
|
853
853
|
W([n, i], async () => {
|
|
854
854
|
if (s++, n.value) {
|
|
855
|
-
const f = [].concat(n.value).filter((_) => !i.value.map((S) => a(S.value)).includes(a(_))),
|
|
856
|
-
|
|
855
|
+
const f = [].concat(n.value).filter((_) => !i.value.map((S) => a(S.value)).includes(a(_))), g = s, R = await e.supplement?.(f);
|
|
856
|
+
g === s && R && (o.value = R);
|
|
857
857
|
} else
|
|
858
|
-
|
|
858
|
+
o.value = [];
|
|
859
859
|
}, {
|
|
860
860
|
immediate: !0
|
|
861
861
|
});
|
|
862
|
-
const c =
|
|
863
|
-
const
|
|
862
|
+
const c = C(() => d.value.map((f) => {
|
|
863
|
+
const g = a(f.value);
|
|
864
864
|
return {
|
|
865
865
|
...f,
|
|
866
|
-
key:
|
|
867
|
-
value:
|
|
866
|
+
key: g,
|
|
867
|
+
value: g
|
|
868
868
|
};
|
|
869
|
-
})),
|
|
869
|
+
})), r = C({
|
|
870
870
|
get: () => n.value && (Array.isArray(n.value) ? n.value.map(a) : a(n.value)),
|
|
871
871
|
set: (f) => {
|
|
872
|
-
Array.isArray(f) ? n.value = f.map((
|
|
872
|
+
Array.isArray(f) ? n.value = f.map((g) => u(g)) : n.value = f === void 0 ? void 0 : u(f) || (e.allowCreate ? f : void 0);
|
|
873
873
|
}
|
|
874
874
|
}), w = p(k, void 0);
|
|
875
875
|
if (w?.required) {
|
|
876
876
|
const {
|
|
877
877
|
validator: f,
|
|
878
|
-
label:
|
|
878
|
+
label: g
|
|
879
879
|
} = w;
|
|
880
|
-
w.validator = () => !n.value || Array.isArray(n.value) && n.value.length === 0 ? `请选择${
|
|
880
|
+
w.validator = () => !n.value || Array.isArray(n.value) && n.value.length === 0 ? `请选择${g}` : f?.();
|
|
881
881
|
}
|
|
882
|
-
const
|
|
883
|
-
X?.on(([f,
|
|
884
|
-
const ne = (f) =>
|
|
885
|
-
w?.validate(),
|
|
882
|
+
const x = p(P, void 0), X = p(D, void 0), A = p(H, void 0);
|
|
883
|
+
X?.on(([f, g]) => x === f && g === void 0 && (r.value = void 0)), A?.on(() => x && X?.trigger([x, r.value === void 0 ? void 0 : [].concat(r.value).map((f) => c.value.find((g) => g.value === f).label).join(",")]));
|
|
884
|
+
const ne = (f) => l("change", f), ie = () => {
|
|
885
|
+
w?.validate(), l("blur");
|
|
886
886
|
};
|
|
887
|
-
return (f,
|
|
887
|
+
return (f, g) => {
|
|
888
888
|
const R = U("ElOption"), _ = U("ElSelect");
|
|
889
|
-
return m(), y(_,
|
|
889
|
+
return m(), y(_, V({
|
|
890
890
|
allowCreate: e.allowCreate,
|
|
891
891
|
clearable: e.clearable,
|
|
892
892
|
filterable: e.filterable,
|
|
@@ -900,24 +900,24 @@ const Ge = /* @__PURE__ */ b({
|
|
|
900
900
|
collapseTags: e.collapseTags,
|
|
901
901
|
collapseTagsTooltip: e.collapseTags
|
|
902
902
|
}, {
|
|
903
|
-
modelValue:
|
|
904
|
-
"onUpdate:modelValue":
|
|
903
|
+
modelValue: r.value,
|
|
904
|
+
"onUpdate:modelValue": g[0] || (g[0] = (S) => r.value = S),
|
|
905
905
|
onBlur: ie,
|
|
906
906
|
onChange: ne
|
|
907
907
|
}), {
|
|
908
|
-
default:
|
|
908
|
+
default: v(() => [(m(!0), j(Y, null, J(c.value, (S) => (m(), y(R, {
|
|
909
909
|
key: S.key,
|
|
910
910
|
label: S.label,
|
|
911
911
|
value: S.value
|
|
912
912
|
}, {
|
|
913
|
-
default:
|
|
913
|
+
default: v(() => [q(fe(S.label), 1)]),
|
|
914
914
|
_: 2
|
|
915
915
|
}, 1032, ["label", "value"]))), 128))]),
|
|
916
916
|
_: 1
|
|
917
917
|
}, 16, ["modelValue"]);
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
|
-
}),
|
|
920
|
+
}), ct = /* @__PURE__ */ b({
|
|
921
921
|
__name: "XSpace",
|
|
922
922
|
props: {
|
|
923
923
|
direction: {},
|
|
@@ -937,12 +937,12 @@ const Ge = /* @__PURE__ */ b({
|
|
|
937
937
|
},
|
|
938
938
|
setup(e) {
|
|
939
939
|
const t = e;
|
|
940
|
-
return (
|
|
941
|
-
default:
|
|
940
|
+
return (l, n) => (m(), y(h(ze), O(M(t)), {
|
|
941
|
+
default: v(() => [E(l.$slots, "default")]),
|
|
942
942
|
_: 3
|
|
943
943
|
}, 16));
|
|
944
944
|
}
|
|
945
|
-
}),
|
|
945
|
+
}), ft = /* @__PURE__ */ b({
|
|
946
946
|
__name: "XTable",
|
|
947
947
|
props: {
|
|
948
948
|
data: {},
|
|
@@ -965,19 +965,19 @@ const Ge = /* @__PURE__ */ b({
|
|
|
965
965
|
setup(e, {
|
|
966
966
|
emit: t
|
|
967
967
|
}) {
|
|
968
|
-
const
|
|
969
|
-
ref:
|
|
968
|
+
const l = t, n = Z("container"), o = F(), i = Qe(n), d = C(() => e.height ?? i.height.value), a = () => z(ke, V({
|
|
969
|
+
ref: o
|
|
970
970
|
}, {
|
|
971
971
|
data: e.data,
|
|
972
|
-
height:
|
|
972
|
+
height: d.value,
|
|
973
973
|
showOverflowTooltip: e.showOverflowTooltip,
|
|
974
974
|
border: e.border,
|
|
975
975
|
highlightCurrentRow: e.highlightCurrentRow,
|
|
976
976
|
spanMethod: e.spanMethod
|
|
977
977
|
}, {
|
|
978
|
-
"onRow-click": (u) =>
|
|
979
|
-
"onSelection-change": (u) =>
|
|
980
|
-
"onHeader-dragend": (u, s, c) =>
|
|
978
|
+
"onRow-click": (u) => l("rowClick", u),
|
|
979
|
+
"onSelection-change": (u) => l("selectionChange", u),
|
|
980
|
+
"onHeader-dragend": (u, s, c) => l("headerDragend", u, s, c)
|
|
981
981
|
}), {
|
|
982
982
|
default: () => e.columns.map((u) => z(Ie, u, {
|
|
983
983
|
default: ({
|
|
@@ -998,18 +998,18 @@ const Ge = /* @__PURE__ */ b({
|
|
|
998
998
|
class: me([e.height === void 0 && "h-full"])
|
|
999
999
|
}, [z(a)], 2));
|
|
1000
1000
|
}
|
|
1001
|
-
}),
|
|
1001
|
+
}), mt = /* @__PURE__ */ b((e, {
|
|
1002
1002
|
slots: t
|
|
1003
1003
|
}) => {
|
|
1004
|
-
const
|
|
1004
|
+
const l = {
|
|
1005
1005
|
...e
|
|
1006
1006
|
};
|
|
1007
|
-
return p(ae, void 0)?.push(
|
|
1007
|
+
return p(ae, void 0)?.push(l), $(le, l), () => z($e, e, {
|
|
1008
1008
|
...t
|
|
1009
1009
|
});
|
|
1010
1010
|
}, {
|
|
1011
1011
|
props: ["label", "name", "closable", "lazy", "disabled"]
|
|
1012
|
-
}),
|
|
1012
|
+
}), pt = /* @__PURE__ */ b({
|
|
1013
1013
|
__name: "XTabs",
|
|
1014
1014
|
props: /* @__PURE__ */ B({
|
|
1015
1015
|
type: {},
|
|
@@ -1033,8 +1033,8 @@ const Ge = /* @__PURE__ */ b({
|
|
|
1033
1033
|
setup(e, {
|
|
1034
1034
|
emit: t
|
|
1035
1035
|
}) {
|
|
1036
|
-
const
|
|
1037
|
-
return $(ae, []), (i,
|
|
1036
|
+
const l = t, n = T(e, "modelValue");
|
|
1037
|
+
return $(ae, []), (i, d) => (m(), y(h(Ae), V({
|
|
1038
1038
|
addable: e.addable,
|
|
1039
1039
|
editable: e.editable,
|
|
1040
1040
|
type: e.type,
|
|
@@ -1042,15 +1042,36 @@ const Ge = /* @__PURE__ */ b({
|
|
|
1042
1042
|
tabPosition: e.tabPosition
|
|
1043
1043
|
}, {
|
|
1044
1044
|
modelValue: n.value,
|
|
1045
|
-
"onUpdate:modelValue":
|
|
1046
|
-
onTabChange:
|
|
1047
|
-
onTabRemove:
|
|
1045
|
+
"onUpdate:modelValue": d[0] || (d[0] = (a) => n.value = a),
|
|
1046
|
+
onTabChange: d[1] || (d[1] = (a) => l("tabChange", a)),
|
|
1047
|
+
onTabRemove: d[2] || (d[2] = (a) => l("tabRemove", a))
|
|
1048
1048
|
}), {
|
|
1049
|
-
default:
|
|
1049
|
+
default: v(() => [E(i.$slots, "default")]),
|
|
1050
1050
|
_: 3
|
|
1051
1051
|
}, 16, ["modelValue"]));
|
|
1052
1052
|
}
|
|
1053
|
-
}),
|
|
1053
|
+
}), bt = /* @__PURE__ */ b({
|
|
1054
|
+
__name: "XTag",
|
|
1055
|
+
props: {
|
|
1056
|
+
type: {},
|
|
1057
|
+
color: {},
|
|
1058
|
+
closable: { type: Boolean, default: () => {
|
|
1059
|
+
} },
|
|
1060
|
+
round: { type: Boolean, default: () => {
|
|
1061
|
+
} }
|
|
1062
|
+
},
|
|
1063
|
+
emits: ["close"],
|
|
1064
|
+
setup(e) {
|
|
1065
|
+
return (t, l) => (m(), y(h(Oe), V({ type: e.type, color: e.color, closable: e.closable, round: e.round }, {
|
|
1066
|
+
onClose: l[0] || (l[0] = (n) => t.$emit("close"))
|
|
1067
|
+
}), {
|
|
1068
|
+
default: v(() => [
|
|
1069
|
+
E(t.$slots, "default")
|
|
1070
|
+
]),
|
|
1071
|
+
_: 3
|
|
1072
|
+
}, 16));
|
|
1073
|
+
}
|
|
1074
|
+
}), yt = /* @__PURE__ */ b({
|
|
1054
1075
|
__name: "XText",
|
|
1055
1076
|
props: {
|
|
1056
1077
|
type: {},
|
|
@@ -1059,14 +1080,14 @@ const Ge = /* @__PURE__ */ b({
|
|
|
1059
1080
|
} }
|
|
1060
1081
|
},
|
|
1061
1082
|
setup(e) {
|
|
1062
|
-
return (t,
|
|
1063
|
-
default:
|
|
1083
|
+
return (t, l) => (m(), y(h(Me), O(M({ type: e.type, size: e.size, truncated: e.truncated })), {
|
|
1084
|
+
default: v(() => [
|
|
1064
1085
|
E(t.$slots, "default")
|
|
1065
1086
|
]),
|
|
1066
1087
|
_: 3
|
|
1067
1088
|
}, 16));
|
|
1068
1089
|
}
|
|
1069
|
-
}),
|
|
1090
|
+
}), vt = /* @__PURE__ */ b({
|
|
1070
1091
|
__name: "XUpload",
|
|
1071
1092
|
props: /* @__PURE__ */ B({
|
|
1072
1093
|
action: {},
|
|
@@ -1100,7 +1121,7 @@ const Ge = /* @__PURE__ */ b({
|
|
|
1100
1121
|
}),
|
|
1101
1122
|
emits: ["update:modelValue"],
|
|
1102
1123
|
setup(e) {
|
|
1103
|
-
const t =
|
|
1124
|
+
const t = T(e, "modelValue"), l = C(() => [].concat(t.value ?? []).reverse().map((a) => ({
|
|
1104
1125
|
name: a.split("/").findLast(() => !0),
|
|
1105
1126
|
url: a,
|
|
1106
1127
|
uid: Number(a.slice(0, a.lastIndexOf("/")).split("/").findLast(() => !0))
|
|
@@ -1112,56 +1133,57 @@ const Ge = /* @__PURE__ */ b({
|
|
|
1112
1133
|
} = n;
|
|
1113
1134
|
n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${u}` : a?.();
|
|
1114
1135
|
}
|
|
1115
|
-
const
|
|
1136
|
+
const o = (a) => (a.size > e.maxSize && ee.warning("文件过大,请重新选择"), a.size < e.maxSize), i = (a) => window.open(a.url), d = (a, u) => {
|
|
1116
1137
|
t.value = Array.isArray(t.value) ? u.map((s) => s.url) : void 0;
|
|
1117
1138
|
};
|
|
1118
|
-
return (a, u) => (m(), y(h(
|
|
1139
|
+
return (a, u) => (m(), y(h(Pe), O(M({
|
|
1119
1140
|
limit: e.limit,
|
|
1120
1141
|
disabled: e.disabled,
|
|
1121
1142
|
data: e.data,
|
|
1122
1143
|
maxSize: e.maxSize,
|
|
1123
1144
|
showFileList: e.showFileList,
|
|
1124
|
-
fileList:
|
|
1125
|
-
beforeUpload:
|
|
1145
|
+
fileList: l.value,
|
|
1146
|
+
beforeUpload: o,
|
|
1126
1147
|
onPreview: i,
|
|
1127
|
-
onRemove:
|
|
1148
|
+
onRemove: d
|
|
1128
1149
|
})), {
|
|
1129
|
-
file:
|
|
1150
|
+
file: v(({
|
|
1130
1151
|
file: s
|
|
1131
1152
|
}) => [E(a.$slots, "file", {
|
|
1132
1153
|
file: s
|
|
1133
1154
|
})]),
|
|
1134
|
-
default:
|
|
1155
|
+
default: v(() => [E(a.$slots, "default")]),
|
|
1135
1156
|
_: 3
|
|
1136
1157
|
}, 16));
|
|
1137
1158
|
}
|
|
1138
1159
|
});
|
|
1139
1160
|
export {
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1161
|
+
Ke as XButton,
|
|
1162
|
+
Ge as XCascader,
|
|
1163
|
+
Ye as XCheckbox,
|
|
1164
|
+
Je as XColorPicker,
|
|
1165
|
+
Ze as XDialog,
|
|
1166
|
+
et as XDivider,
|
|
1167
|
+
at as XForm,
|
|
1168
|
+
tt as XFormItem,
|
|
1169
|
+
lt as XImage,
|
|
1170
|
+
ot as XInput,
|
|
1171
|
+
nt as XInputNumber,
|
|
1172
|
+
it as XPagination,
|
|
1173
|
+
dt as XRate,
|
|
1153
1174
|
rt as XReconfirm,
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1175
|
+
ut as XScrollbar,
|
|
1176
|
+
st as XSelect,
|
|
1177
|
+
ct as XSpace,
|
|
1178
|
+
mt as XTabPane,
|
|
1179
|
+
ft as XTable,
|
|
1180
|
+
pt as XTabs,
|
|
1181
|
+
bt as XTag,
|
|
1182
|
+
yt as XText,
|
|
1183
|
+
vt as XUpload,
|
|
1162
1184
|
P as X_FORM_ITEM_LABEL,
|
|
1163
1185
|
k as X_FORM_ITEM_VALIDATION,
|
|
1164
|
-
|
|
1186
|
+
Re as X_FORM_TAB_UPDATE_HOOK,
|
|
1165
1187
|
te as X_FORM_VALIDATIONS,
|
|
1166
1188
|
H as X_TABLE_QUERY_EXECUTE_HOOK,
|
|
1167
1189
|
D as X_TABLE_QUERY_UPDATE_HOOK,
|
package/package.json
CHANGED