@pungfe/element 0.0.1-alpha.4 → 0.0.1-alpha.6
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/index.d.ts +1 -0
- package/dist/index.js +571 -795
- package/dist/resolver.d.ts +3 -0
- package/dist/resolver.js +34 -0
- package/package.json +10 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, useModel, inject, mergeModels, computed, toValue, onMounted, nextTick, getCurrentScope, onScopeDispose, getCurrentInstance, shallowRef, watch, createElementBlock, Fragment, renderList, useSlots, createSlots, normalizeProps
|
|
2
|
-
import { ElButton, ElCascader, ElCheckboxGroup, ElCheckbox, ElColorPicker, ElDialog, ElDivider, ElForm, ElFormItem, ElMessage, ElImage, ElInput, ElPagination, ElRate, ElPopconfirm, ElScrollbar, ElSpace, ElTable, ElTableColumn, ElTabs, ElText, ElUpload } from "element-plus";
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as y, openBlock as m, createBlock as b, unref as h, mergeProps as C, withCtx as g, renderSlot as E, useModel as x, inject as p, mergeModels as B, computed as V, toValue as P, onMounted as K, nextTick as ne, getCurrentScope as ie, onScopeDispose as re, getCurrentInstance as G, shallowRef as N, watch as W, createElementBlock as j, Fragment as Y, renderList as J, useSlots as de, createSlots as ue, normalizeProps as $, guardReactiveProps as O, ref as F, provide as L, createVNode as k, resolveComponent as U, createTextVNode as q, useTemplateRef as Z, toDisplayString as se, normalizeClass as ce } from "vue";
|
|
2
|
+
import { ElButton as fe, ElCascader as me, ElCheckboxGroup as pe, ElCheckbox as be, ElColorPicker as ye, ElDialog as ve, ElDivider as ge, ElForm as he, ElFormItem as Be, ElMessage as ee, ElImage as we, ElInput as Ve, ElPagination as Ce, ElRate as Ee, ElPopconfirm as xe, ElScrollbar as Te, ElSpace as Se, ElTable as Xe, ElTableColumn as ze, ElTabs as ke, ElText as Ie, ElUpload as Ae } from "element-plus";
|
|
3
|
+
const We = /* @__PURE__ */ y({
|
|
4
4
|
__name: "XButton",
|
|
5
5
|
props: {
|
|
6
6
|
size: {},
|
|
@@ -23,40 +23,28 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
tag: {}
|
|
24
24
|
},
|
|
25
25
|
emits: ["click"],
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
_: 3
|
|
37
|
-
}, 16);
|
|
38
|
-
};
|
|
26
|
+
setup(e, { emit: t }) {
|
|
27
|
+
const o = e, n = t;
|
|
28
|
+
return (l, i) => (m(), b(h(fe), C(o, {
|
|
29
|
+
onClick: i[0] || (i[0] = (r) => n("click", r))
|
|
30
|
+
}), {
|
|
31
|
+
default: g(() => [
|
|
32
|
+
E(l.$slots, "default")
|
|
33
|
+
]),
|
|
34
|
+
_: 3
|
|
35
|
+
}, 16));
|
|
39
36
|
}
|
|
40
|
-
})
|
|
41
|
-
const X_FORM_ITEM_LABEL = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL");
|
|
42
|
-
const X_FORM_VALIDATIONS = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS");
|
|
43
|
-
const X_FORM_ITEM_VALIDATION = /* @__PURE__ */ Symbol(
|
|
37
|
+
}), M = /* @__PURE__ */ Symbol("X_FORM_ITEM_LABEL"), te = /* @__PURE__ */ Symbol("X_FORM_VALIDATIONS"), z = /* @__PURE__ */ Symbol(
|
|
44
38
|
"X_FORM_ITEM_VALIDATION"
|
|
45
|
-
)
|
|
46
|
-
const X_FORM_TAB_UPDATE_HOOK = /* @__PURE__ */ Symbol(
|
|
39
|
+
), $e = /* @__PURE__ */ Symbol(
|
|
47
40
|
"X_FORM_TAB_UPDATE_HOOK"
|
|
48
|
-
)
|
|
49
|
-
const X_TAB_PANES = /* @__PURE__ */ Symbol("X_TAB_PANES");
|
|
50
|
-
const X_TAB_PANE = /* @__PURE__ */ Symbol("X_TAB_PANE");
|
|
51
|
-
const X_TABLE_QUERY_UPDATE_HOOK = /* @__PURE__ */ Symbol(
|
|
41
|
+
), Oe = /* @__PURE__ */ Symbol("X_TAB_PANES"), Me = /* @__PURE__ */ Symbol("X_TAB_PANE"), D = /* @__PURE__ */ Symbol(
|
|
52
42
|
"X_TABLE_QUERY_UPDATE_HOOK"
|
|
53
|
-
)
|
|
54
|
-
const X_TABLE_QUERY_EXECUTE_HOOK = /* @__PURE__ */ Symbol(
|
|
43
|
+
), H = /* @__PURE__ */ Symbol(
|
|
55
44
|
"X_TABLE_QUERY_EXECUTE_HOOK"
|
|
56
|
-
)
|
|
57
|
-
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
45
|
+
), je = /* @__PURE__ */ y({
|
|
58
46
|
__name: "XCascader",
|
|
59
|
-
props: /* @__PURE__ */
|
|
47
|
+
props: /* @__PURE__ */ B({
|
|
60
48
|
clearable: {
|
|
61
49
|
type: Boolean
|
|
62
50
|
},
|
|
@@ -69,180 +57,133 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
69
57
|
},
|
|
70
58
|
props: {}
|
|
71
59
|
}, {
|
|
72
|
-
|
|
73
|
-
|
|
60
|
+
modelValue: {},
|
|
61
|
+
modelModifiers: {}
|
|
74
62
|
}),
|
|
75
|
-
emits: /* @__PURE__ */
|
|
76
|
-
setup(
|
|
77
|
-
emit:
|
|
63
|
+
emits: /* @__PURE__ */ B(["blur", "change"], ["update:modelValue"]),
|
|
64
|
+
setup(e, {
|
|
65
|
+
emit: t
|
|
78
66
|
}) {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
const model = useModel(__props, "modelValue");
|
|
82
|
-
const formItemValidation = inject(X_FORM_ITEM_VALIDATION, void 0);
|
|
83
|
-
if (formItemValidation?.required) {
|
|
67
|
+
const o = e, n = t, l = x(e, "modelValue"), i = p(z, void 0);
|
|
68
|
+
if (i?.required) {
|
|
84
69
|
const {
|
|
85
|
-
validator,
|
|
86
|
-
label
|
|
87
|
-
} =
|
|
88
|
-
|
|
89
|
-
if (!model.value) {
|
|
90
|
-
return `请输入${label}`;
|
|
91
|
-
}
|
|
92
|
-
return validator?.();
|
|
93
|
-
};
|
|
70
|
+
validator: c,
|
|
71
|
+
label: d
|
|
72
|
+
} = i;
|
|
73
|
+
i.validator = () => l.value ? c?.() : `请输入${d}`;
|
|
94
74
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
tableQueryExecuteHook?.on(() => formItemLabel && tableQueryUpdateHook?.trigger([formItemLabel, model.value]));
|
|
100
|
-
const blur = () => {
|
|
101
|
-
formItemValidation?.validate();
|
|
102
|
-
emit("blur");
|
|
103
|
-
};
|
|
104
|
-
return (_ctx, _cache) => {
|
|
105
|
-
return openBlock(), createBlock(unref(ElCascader), mergeProps(props, {
|
|
106
|
-
modelValue: model.value,
|
|
107
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
108
|
-
onBlur: blur
|
|
109
|
-
}), null, 16, ["modelValue"]);
|
|
75
|
+
const r = p(M, void 0), a = p(D, void 0), u = p(H, void 0);
|
|
76
|
+
a?.on(([c, d]) => r === c && d === void 0 && (l.value = void 0)), u?.on(() => r && a?.trigger([r, l.value]));
|
|
77
|
+
const s = () => {
|
|
78
|
+
i?.validate(), n("blur");
|
|
110
79
|
};
|
|
80
|
+
return (c, d) => (m(), b(h(me), C(o, {
|
|
81
|
+
modelValue: l.value,
|
|
82
|
+
"onUpdate:modelValue": d[0] || (d[0] = (w) => l.value = w),
|
|
83
|
+
onBlur: s
|
|
84
|
+
}), null, 16, ["modelValue"]));
|
|
111
85
|
}
|
|
112
86
|
});
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
onScopeDispose(fn, failSilently);
|
|
116
|
-
return true;
|
|
117
|
-
}
|
|
118
|
-
return false;
|
|
87
|
+
function Re(e, t) {
|
|
88
|
+
return ie() ? (re(e, t), !0) : !1;
|
|
119
89
|
}
|
|
120
|
-
const
|
|
121
|
-
typeof WorkerGlobalScope
|
|
122
|
-
function
|
|
123
|
-
return Array.isArray(
|
|
90
|
+
const Pe = typeof window < "u" && typeof document < "u";
|
|
91
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
92
|
+
function Le(e) {
|
|
93
|
+
return Array.isArray(e) ? e : [e];
|
|
124
94
|
}
|
|
125
|
-
function
|
|
126
|
-
return
|
|
95
|
+
function Ue(e) {
|
|
96
|
+
return G();
|
|
127
97
|
}
|
|
128
|
-
function
|
|
129
|
-
|
|
130
|
-
else if (sync) fn();
|
|
131
|
-
else nextTick(fn);
|
|
98
|
+
function Fe(e, t = !0, o) {
|
|
99
|
+
Ue() ? K(e, o) : t ? e() : ne(e);
|
|
132
100
|
}
|
|
133
101
|
// @__NO_SIDE_EFFECTS__
|
|
134
|
-
function
|
|
135
|
-
return
|
|
102
|
+
function Q(e, t) {
|
|
103
|
+
return V(() => P(e).map((o) => P(o)).map(t));
|
|
136
104
|
}
|
|
137
|
-
const
|
|
138
|
-
function
|
|
139
|
-
var
|
|
140
|
-
const
|
|
141
|
-
return (
|
|
105
|
+
const ae = Pe ? window : void 0;
|
|
106
|
+
function I(e) {
|
|
107
|
+
var t;
|
|
108
|
+
const o = P(e);
|
|
109
|
+
return (t = o?.$el) !== null && t !== void 0 ? t : o;
|
|
142
110
|
}
|
|
143
111
|
// @__NO_SIDE_EFFECTS__
|
|
144
|
-
function
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}, instance);
|
|
150
|
-
return isMounted;
|
|
112
|
+
function De() {
|
|
113
|
+
const e = N(!1), t = G();
|
|
114
|
+
return t && K(() => {
|
|
115
|
+
e.value = !0;
|
|
116
|
+
}, t), e;
|
|
151
117
|
}
|
|
152
118
|
// @__NO_SIDE_EFFECTS__
|
|
153
|
-
function
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
-
isMounted.value;
|
|
157
|
-
return Boolean(callback());
|
|
158
|
-
});
|
|
119
|
+
function He(e) {
|
|
120
|
+
const t = /* @__PURE__ */ De();
|
|
121
|
+
return V(() => (t.value, !!e()));
|
|
159
122
|
}
|
|
160
|
-
function
|
|
161
|
-
const { window:
|
|
162
|
-
let
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
|
|
173
|
-
}), (els) => {
|
|
174
|
-
cleanup();
|
|
175
|
-
if (isSupported.value && window$1) {
|
|
176
|
-
observer = new ResizeObserver(callback);
|
|
177
|
-
for (const _el of els) if (_el) observer.observe(_el, observerOptions);
|
|
123
|
+
function _e(e, t, o = {}) {
|
|
124
|
+
const { window: n = ae, ...l } = o;
|
|
125
|
+
let i;
|
|
126
|
+
const r = /* @__PURE__ */ He(() => n && "ResizeObserver" in n), a = () => {
|
|
127
|
+
i && (i.disconnect(), i = void 0);
|
|
128
|
+
}, u = W(V(() => {
|
|
129
|
+
const c = P(e);
|
|
130
|
+
return Array.isArray(c) ? c.map((d) => I(d)) : [I(c)];
|
|
131
|
+
}), (c) => {
|
|
132
|
+
if (a(), r.value && n) {
|
|
133
|
+
i = new ResizeObserver(t);
|
|
134
|
+
for (const d of c) d && i.observe(d, l);
|
|
178
135
|
}
|
|
179
136
|
}, {
|
|
180
|
-
immediate:
|
|
137
|
+
immediate: !0,
|
|
181
138
|
flush: "post"
|
|
182
|
-
})
|
|
183
|
-
|
|
184
|
-
cleanup();
|
|
185
|
-
stopWatch();
|
|
139
|
+
}), s = () => {
|
|
140
|
+
a(), u();
|
|
186
141
|
};
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
stop
|
|
142
|
+
return Re(s), {
|
|
143
|
+
isSupported: r,
|
|
144
|
+
stop: s
|
|
191
145
|
};
|
|
192
146
|
}
|
|
193
|
-
function
|
|
147
|
+
function Ne(e, t = {
|
|
194
148
|
width: 0,
|
|
195
149
|
height: 0
|
|
196
|
-
},
|
|
197
|
-
const { window:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const $elem = unrefElement(target);
|
|
208
|
-
if ($elem) {
|
|
209
|
-
const rect = $elem.getBoundingClientRect();
|
|
210
|
-
width.value = rect.width;
|
|
211
|
-
height.value = rect.height;
|
|
150
|
+
}, o = {}) {
|
|
151
|
+
const { window: n = ae, box: l = "content-box" } = o, i = V(() => {
|
|
152
|
+
var d;
|
|
153
|
+
return (d = I(e)) === null || d === void 0 || (d = d.namespaceURI) === null || d === void 0 ? void 0 : d.includes("svg");
|
|
154
|
+
}), r = N(t.width), a = N(t.height), { stop: u } = _e(e, ([d]) => {
|
|
155
|
+
const w = l === "border-box" ? d.borderBoxSize : l === "content-box" ? d.contentBoxSize : d.devicePixelContentBoxSize;
|
|
156
|
+
if (n && i.value) {
|
|
157
|
+
const T = I(e);
|
|
158
|
+
if (T) {
|
|
159
|
+
const S = T.getBoundingClientRect();
|
|
160
|
+
r.value = S.width, a.value = S.height;
|
|
212
161
|
}
|
|
213
|
-
} else if (
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
tryOnMounted(() => {
|
|
223
|
-
const ele = unrefElement(target);
|
|
224
|
-
if (ele) {
|
|
225
|
-
width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width;
|
|
226
|
-
height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
|
|
227
|
-
}
|
|
162
|
+
} else if (w) {
|
|
163
|
+
const T = Le(w);
|
|
164
|
+
r.value = T.reduce((S, { inlineSize: A }) => S + A, 0), a.value = T.reduce((S, { blockSize: A }) => S + A, 0);
|
|
165
|
+
} else
|
|
166
|
+
r.value = d.contentRect.width, a.value = d.contentRect.height;
|
|
167
|
+
}, o);
|
|
168
|
+
Fe(() => {
|
|
169
|
+
const d = I(e);
|
|
170
|
+
d && (r.value = "offsetWidth" in d ? d.offsetWidth : t.width, a.value = "offsetHeight" in d ? d.offsetHeight : t.height);
|
|
228
171
|
});
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
height.value = ele ? initialSize.height : 0;
|
|
172
|
+
const s = W(() => I(e), (d) => {
|
|
173
|
+
r.value = d ? t.width : 0, a.value = d ? t.height : 0;
|
|
232
174
|
});
|
|
233
|
-
function
|
|
234
|
-
|
|
235
|
-
stop2();
|
|
175
|
+
function c() {
|
|
176
|
+
u(), s();
|
|
236
177
|
}
|
|
237
178
|
return {
|
|
238
|
-
width,
|
|
239
|
-
height,
|
|
240
|
-
stop
|
|
179
|
+
width: r,
|
|
180
|
+
height: a,
|
|
181
|
+
stop: c
|
|
241
182
|
};
|
|
242
183
|
}
|
|
243
|
-
const
|
|
184
|
+
const Ke = /* @__PURE__ */ y({
|
|
244
185
|
__name: "XCheckbox",
|
|
245
|
-
props: /* @__PURE__ */
|
|
186
|
+
props: /* @__PURE__ */ B({
|
|
246
187
|
data: {},
|
|
247
188
|
factory: {
|
|
248
189
|
type: Function
|
|
@@ -278,75 +219,55 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
278
219
|
},
|
|
279
220
|
ariaLabel: {}
|
|
280
221
|
}, {
|
|
281
|
-
|
|
282
|
-
|
|
222
|
+
modelValue: {},
|
|
223
|
+
modelModifiers: {}
|
|
283
224
|
}),
|
|
284
225
|
emits: ["update:modelValue"],
|
|
285
|
-
setup(
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
} else {
|
|
297
|
-
return value;
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
const backward = (key) => options.value.map((item) => item.value).find((item) => forward(item) === key);
|
|
301
|
-
const _options = computed(() => options.value.map((item) => {
|
|
302
|
-
const key = forward(item.value);
|
|
226
|
+
setup(e) {
|
|
227
|
+
const t = x(e, "modelValue"), o = /* @__PURE__ */ Q(() => e.data, e.factory), n = V(() => [...o.value]), l = (s) => {
|
|
228
|
+
if (typeof s == "object") {
|
|
229
|
+
if (e.identify)
|
|
230
|
+
return e.identify(s);
|
|
231
|
+
throw new Error("`identify` is required when value's type extends `object` or `object[]`");
|
|
232
|
+
} else
|
|
233
|
+
return s;
|
|
234
|
+
}, i = (s) => n.value.map((c) => c.value).find((c) => l(c) === s), r = V(() => n.value.map((s) => {
|
|
235
|
+
const c = l(s.value);
|
|
303
236
|
return {
|
|
304
|
-
...
|
|
305
|
-
key,
|
|
306
|
-
value:
|
|
237
|
+
...s,
|
|
238
|
+
key: c,
|
|
239
|
+
value: c
|
|
307
240
|
};
|
|
308
|
-
}))
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
const formItemValidation = inject(X_FORM_ITEM_VALIDATION, void 0);
|
|
314
|
-
if (formItemValidation?.required) {
|
|
241
|
+
})), a = V({
|
|
242
|
+
get: () => t.value && t.value.map(l),
|
|
243
|
+
set: (s) => t.value = Array.isArray(s) ? s.map((c) => i(c)) : []
|
|
244
|
+
}), u = p(z, void 0);
|
|
245
|
+
if (u?.required) {
|
|
315
246
|
const {
|
|
316
|
-
validator,
|
|
317
|
-
label
|
|
318
|
-
} =
|
|
319
|
-
|
|
320
|
-
if (!model.value || Array.isArray(model.value) && model.value.length === 0) {
|
|
321
|
-
return `请选择${label}`;
|
|
322
|
-
}
|
|
323
|
-
return validator?.();
|
|
324
|
-
};
|
|
247
|
+
validator: s,
|
|
248
|
+
label: c
|
|
249
|
+
} = u;
|
|
250
|
+
u.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请选择${c}` : s?.();
|
|
325
251
|
}
|
|
326
|
-
return (
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}), 128))]),
|
|
342
|
-
_: 1
|
|
343
|
-
}, 16, ["modelValue"]);
|
|
344
|
-
};
|
|
252
|
+
return (s, c) => (m(), b(h(pe), C({
|
|
253
|
+
modelValue: a.value,
|
|
254
|
+
"onUpdate:modelValue": c[0] || (c[0] = (d) => a.value = d)
|
|
255
|
+
}, {
|
|
256
|
+
disabled: e.disabled,
|
|
257
|
+
size: e.size
|
|
258
|
+
}), {
|
|
259
|
+
default: g(() => [(m(!0), j(Y, null, J(r.value, (d) => (m(), b(h(be), {
|
|
260
|
+
key: d.key,
|
|
261
|
+
disabled: d.disabled,
|
|
262
|
+
label: d.label,
|
|
263
|
+
value: d.value
|
|
264
|
+
}, null, 8, ["disabled", "label", "value"]))), 128))]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 16, ["modelValue"]));
|
|
345
267
|
}
|
|
346
|
-
})
|
|
347
|
-
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
268
|
+
}), Ge = /* @__PURE__ */ y({
|
|
348
269
|
__name: "XColorPicker",
|
|
349
|
-
props: /* @__PURE__ */
|
|
270
|
+
props: /* @__PURE__ */ B({
|
|
350
271
|
clearable: {
|
|
351
272
|
type: Boolean
|
|
352
273
|
},
|
|
@@ -355,144 +276,109 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
355
276
|
default: void 0
|
|
356
277
|
}
|
|
357
278
|
}, {
|
|
358
|
-
|
|
359
|
-
|
|
279
|
+
modelValue: {},
|
|
280
|
+
modelModifiers: {}
|
|
360
281
|
}),
|
|
361
282
|
emits: ["update:modelValue"],
|
|
362
|
-
setup(
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
const formItemValidation = inject(X_FORM_ITEM_VALIDATION, void 0);
|
|
366
|
-
if (formItemValidation?.required) {
|
|
283
|
+
setup(e) {
|
|
284
|
+
const t = e, o = x(e, "modelValue"), n = p(z, void 0);
|
|
285
|
+
if (n?.required) {
|
|
367
286
|
const {
|
|
368
|
-
validator,
|
|
369
|
-
label
|
|
370
|
-
} =
|
|
371
|
-
|
|
372
|
-
if (!model.value) {
|
|
373
|
-
return `请输入${label}`;
|
|
374
|
-
}
|
|
375
|
-
return validator?.();
|
|
376
|
-
};
|
|
287
|
+
validator: a,
|
|
288
|
+
label: u
|
|
289
|
+
} = n;
|
|
290
|
+
n.validator = () => o.value ? a?.() : `请输入${u}`;
|
|
377
291
|
}
|
|
378
|
-
const
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
return (_ctx, _cache) => {
|
|
384
|
-
return openBlock(), createBlock(unref(ElColorPicker), mergeProps(props, {
|
|
385
|
-
modelValue: model.value,
|
|
386
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event)
|
|
387
|
-
}), null, 16, ["modelValue"]);
|
|
388
|
-
};
|
|
292
|
+
const l = p(M, void 0), i = p(D, void 0), r = p(H, void 0);
|
|
293
|
+
return i?.on(([a, u]) => l === a && u === void 0 && (o.value = void 0)), r?.on(() => l && i?.trigger([l, o.value])), (a, u) => (m(), b(h(ye), C(t, {
|
|
294
|
+
modelValue: o.value,
|
|
295
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => o.value = s)
|
|
296
|
+
}), null, 16, ["modelValue"]));
|
|
389
297
|
}
|
|
390
|
-
})
|
|
391
|
-
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
298
|
+
}), Ye = /* @__PURE__ */ y({
|
|
392
299
|
__name: "XDialog",
|
|
393
|
-
props: /* @__PURE__ */
|
|
300
|
+
props: /* @__PURE__ */ B({
|
|
394
301
|
title: {},
|
|
395
302
|
bodyClass: {}
|
|
396
303
|
}, {
|
|
397
|
-
|
|
304
|
+
modelValue: {
|
|
398
305
|
type: Boolean
|
|
399
306
|
},
|
|
400
|
-
|
|
307
|
+
modelModifiers: {}
|
|
401
308
|
}),
|
|
402
309
|
emits: ["update:modelValue"],
|
|
403
|
-
setup(
|
|
310
|
+
setup(e) {
|
|
404
311
|
const {
|
|
405
|
-
header,
|
|
406
|
-
footer
|
|
407
|
-
} =
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
key: "1"
|
|
426
|
-
} : void 0]), 1032, ["modelValue", "title", "body-class"]);
|
|
427
|
-
};
|
|
312
|
+
header: t,
|
|
313
|
+
footer: o
|
|
314
|
+
} = de(), n = x(e, "modelValue");
|
|
315
|
+
return (l, i) => (m(), b(h(ve), {
|
|
316
|
+
modelValue: n.value,
|
|
317
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => n.value = r),
|
|
318
|
+
title: e.title,
|
|
319
|
+
"body-class": `flex flex-col ${e.bodyClass}`
|
|
320
|
+
}, ue({
|
|
321
|
+
default: g(() => [E(l.$slots, "default")]),
|
|
322
|
+
_: 2
|
|
323
|
+
}, [t ? {
|
|
324
|
+
name: "header",
|
|
325
|
+
fn: g(() => [E(l.$slots, "header")]),
|
|
326
|
+
key: "0"
|
|
327
|
+
} : void 0, o ? {
|
|
328
|
+
name: "footer",
|
|
329
|
+
fn: g(() => [E(l.$slots, "footer")]),
|
|
330
|
+
key: "1"
|
|
331
|
+
} : void 0]), 1032, ["modelValue", "title", "body-class"]));
|
|
428
332
|
}
|
|
429
|
-
})
|
|
430
|
-
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
333
|
+
}), Je = /* @__PURE__ */ y({
|
|
431
334
|
__name: "XDivider",
|
|
432
335
|
props: {
|
|
433
336
|
direction: {},
|
|
434
337
|
contentPosition: {},
|
|
435
338
|
borderStyle: {}
|
|
436
339
|
},
|
|
437
|
-
setup(
|
|
438
|
-
const
|
|
439
|
-
return (
|
|
440
|
-
|
|
441
|
-
default
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}, 16);
|
|
446
|
-
};
|
|
340
|
+
setup(e) {
|
|
341
|
+
const t = e;
|
|
342
|
+
return (o, n) => (m(), b(h(ge), $(O(t)), {
|
|
343
|
+
default: g(() => [
|
|
344
|
+
E(o.$slots, "default")
|
|
345
|
+
]),
|
|
346
|
+
_: 3
|
|
347
|
+
}, 16));
|
|
447
348
|
}
|
|
448
|
-
})
|
|
449
|
-
|
|
450
|
-
expose
|
|
349
|
+
}), Ze = /* @__PURE__ */ y((e, {
|
|
350
|
+
expose: t
|
|
451
351
|
}) => {
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
const validation = {
|
|
456
|
-
label: props.label,
|
|
457
|
-
required: props.required,
|
|
352
|
+
const o = p(Me, void 0), n = p($e, void 0), l = F(), i = {
|
|
353
|
+
label: e.label,
|
|
354
|
+
required: e.required,
|
|
458
355
|
clearValidate() {
|
|
459
|
-
|
|
356
|
+
l.value = void 0;
|
|
460
357
|
},
|
|
461
358
|
validate() {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
message: error.value
|
|
468
|
-
});
|
|
469
|
-
formTabUpdateHook?.trigger(tabPane.name);
|
|
470
|
-
}
|
|
471
|
-
return !error.value;
|
|
359
|
+
return l.value = i.validator?.() ?? void 0, l.value && o?.name && (ee({
|
|
360
|
+
plain: !0,
|
|
361
|
+
type: "warning",
|
|
362
|
+
message: l.value
|
|
363
|
+
}), n?.trigger(o.name)), !l.value;
|
|
472
364
|
}
|
|
473
365
|
};
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
return () => createVNode(ElFormItem, mergeProps({
|
|
482
|
-
label: props.label,
|
|
483
|
-
labelPosition: props.labelPosition,
|
|
484
|
-
labelWidth: props.labelWidth,
|
|
485
|
-
required: props.required
|
|
366
|
+
return p(te, void 0)?.push(i), L(z, i), t({
|
|
367
|
+
...i
|
|
368
|
+
}), L(M, e.label), () => k(Be, C({
|
|
369
|
+
label: e.label,
|
|
370
|
+
labelPosition: e.labelPosition,
|
|
371
|
+
labelWidth: e.labelWidth,
|
|
372
|
+
required: e.required
|
|
486
373
|
}, {
|
|
487
|
-
|
|
374
|
+
error: l.value
|
|
488
375
|
}), {
|
|
489
|
-
label: () =>
|
|
490
|
-
default: () =>
|
|
376
|
+
label: () => e.label,
|
|
377
|
+
default: () => e.content?.()
|
|
491
378
|
});
|
|
492
379
|
}, {
|
|
493
380
|
props: ["label", "required", "content", "tooltip"]
|
|
494
|
-
})
|
|
495
|
-
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
381
|
+
}), et = /* @__PURE__ */ y({
|
|
496
382
|
__name: "XForm",
|
|
497
383
|
props: {
|
|
498
384
|
content: {
|
|
@@ -512,47 +398,41 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
512
398
|
labelPosition: {},
|
|
513
399
|
statusIcon: {
|
|
514
400
|
type: Boolean,
|
|
515
|
-
default:
|
|
401
|
+
default: !0
|
|
516
402
|
}
|
|
517
403
|
},
|
|
518
|
-
setup(
|
|
519
|
-
expose:
|
|
404
|
+
setup(e, {
|
|
405
|
+
expose: t
|
|
520
406
|
}) {
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
const resetFields = () => {
|
|
526
|
-
form.value?.resetFields();
|
|
527
|
-
validations.forEach((item) => item.clearValidate());
|
|
407
|
+
const o = F(), n = [];
|
|
408
|
+
L(te, n);
|
|
409
|
+
const l = () => n.every((a) => a.validate()), i = () => {
|
|
410
|
+
o.value?.resetFields(), n.forEach((a) => a.clearValidate());
|
|
528
411
|
};
|
|
529
|
-
|
|
530
|
-
data:
|
|
531
|
-
validate,
|
|
532
|
-
resetFields
|
|
412
|
+
t({
|
|
413
|
+
data: e.data,
|
|
414
|
+
validate: l,
|
|
415
|
+
resetFields: i
|
|
533
416
|
});
|
|
534
|
-
const
|
|
535
|
-
data:
|
|
417
|
+
const r = () => e.content?.({
|
|
418
|
+
data: e.data
|
|
536
419
|
});
|
|
537
|
-
return (
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
}, 16);
|
|
552
|
-
};
|
|
420
|
+
return (a, u) => (m(), b(h(he), C({
|
|
421
|
+
ref_key: "form",
|
|
422
|
+
ref: o
|
|
423
|
+
}, {
|
|
424
|
+
inline: e.inline,
|
|
425
|
+
disabled: e.disabled,
|
|
426
|
+
labelWidth: e.labelWidth,
|
|
427
|
+
model: e.data,
|
|
428
|
+
labelPosition: e.labelPosition,
|
|
429
|
+
statusIcon: e.statusIcon
|
|
430
|
+
}), {
|
|
431
|
+
default: g(() => [k(r)]),
|
|
432
|
+
_: 1
|
|
433
|
+
}, 16));
|
|
553
434
|
}
|
|
554
|
-
})
|
|
555
|
-
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
435
|
+
}), tt = /* @__PURE__ */ y({
|
|
556
436
|
__name: "XImage",
|
|
557
437
|
props: {
|
|
558
438
|
hideOnClickModal: { type: Boolean },
|
|
@@ -574,16 +454,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
574
454
|
showProgress: { type: Boolean },
|
|
575
455
|
crossorigin: {}
|
|
576
456
|
},
|
|
577
|
-
setup(
|
|
578
|
-
const
|
|
579
|
-
return (
|
|
580
|
-
return openBlock(), createBlock(unref(ElImage), normalizeProps(guardReactiveProps(props)), null, 16);
|
|
581
|
-
};
|
|
457
|
+
setup(e) {
|
|
458
|
+
const t = e;
|
|
459
|
+
return (o, n) => (m(), b(h(we), $(O(t)), null, 16));
|
|
582
460
|
}
|
|
583
|
-
})
|
|
584
|
-
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
461
|
+
}), at = /* @__PURE__ */ y({
|
|
585
462
|
__name: "XInput",
|
|
586
|
-
props: /* @__PURE__ */
|
|
463
|
+
props: /* @__PURE__ */ B({
|
|
587
464
|
clearable: {
|
|
588
465
|
type: Boolean
|
|
589
466
|
},
|
|
@@ -601,52 +478,36 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
601
478
|
},
|
|
602
479
|
autosize: {}
|
|
603
480
|
}, {
|
|
604
|
-
|
|
605
|
-
|
|
481
|
+
modelValue: {},
|
|
482
|
+
modelModifiers: {}
|
|
606
483
|
}),
|
|
607
|
-
emits: /* @__PURE__ */
|
|
608
|
-
setup(
|
|
609
|
-
emit:
|
|
484
|
+
emits: /* @__PURE__ */ B(["blur", "change"], ["update:modelValue"]),
|
|
485
|
+
setup(e, {
|
|
486
|
+
emit: t
|
|
610
487
|
}) {
|
|
611
|
-
const
|
|
612
|
-
|
|
613
|
-
const model = useModel(__props, "modelValue");
|
|
614
|
-
const formItemValidation = inject(X_FORM_ITEM_VALIDATION, void 0);
|
|
615
|
-
if (formItemValidation?.required) {
|
|
488
|
+
const o = e, n = t, l = x(e, "modelValue"), i = p(z, void 0);
|
|
489
|
+
if (i?.required) {
|
|
616
490
|
const {
|
|
617
|
-
validator,
|
|
618
|
-
label
|
|
619
|
-
} =
|
|
620
|
-
|
|
621
|
-
if (!model.value) {
|
|
622
|
-
return `请输入${label}`;
|
|
623
|
-
}
|
|
624
|
-
return validator?.();
|
|
625
|
-
};
|
|
491
|
+
validator: d,
|
|
492
|
+
label: w
|
|
493
|
+
} = i;
|
|
494
|
+
i.validator = () => l.value ? d?.() : `请输入${w}`;
|
|
626
495
|
}
|
|
627
|
-
const
|
|
628
|
-
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
tableQueryExecuteHook?.on(() => formItemLabel && tableQueryUpdateHook?.trigger([formItemLabel, model.value]));
|
|
632
|
-
const change = (value) => emit("change", value);
|
|
633
|
-
const blur = () => {
|
|
634
|
-
formItemValidation?.validate();
|
|
635
|
-
emit("blur");
|
|
636
|
-
};
|
|
637
|
-
return (_ctx, _cache) => {
|
|
638
|
-
return openBlock(), createBlock(unref(ElInput), mergeProps(props, {
|
|
639
|
-
modelValue: model.value,
|
|
640
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
641
|
-
onBlur: blur,
|
|
642
|
-
onChange: change
|
|
643
|
-
}), null, 16, ["modelValue"]);
|
|
496
|
+
const r = p(M, void 0), a = p(D, void 0), u = p(H, void 0);
|
|
497
|
+
a?.on(([d, w]) => r === d && w === void 0 && (l.value = void 0)), u?.on(() => r && a?.trigger([r, l.value]));
|
|
498
|
+
const s = (d) => n("change", d), c = () => {
|
|
499
|
+
i?.validate(), n("blur");
|
|
644
500
|
};
|
|
501
|
+
return (d, w) => (m(), b(h(Ve), C(o, {
|
|
502
|
+
modelValue: l.value,
|
|
503
|
+
"onUpdate:modelValue": w[0] || (w[0] = (T) => l.value = T),
|
|
504
|
+
onBlur: c,
|
|
505
|
+
onChange: s
|
|
506
|
+
}), null, 16, ["modelValue"]));
|
|
645
507
|
}
|
|
646
|
-
})
|
|
647
|
-
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
508
|
+
}), lt = /* @__PURE__ */ y({
|
|
648
509
|
__name: "XInputNumber",
|
|
649
|
-
props: /* @__PURE__ */
|
|
510
|
+
props: /* @__PURE__ */ B({
|
|
650
511
|
placeholder: {
|
|
651
512
|
default: "请输入"
|
|
652
513
|
},
|
|
@@ -669,46 +530,36 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
669
530
|
type: Boolean
|
|
670
531
|
}
|
|
671
532
|
}, {
|
|
672
|
-
|
|
673
|
-
|
|
533
|
+
modelValue: {},
|
|
534
|
+
modelModifiers: {}
|
|
674
535
|
}),
|
|
675
|
-
emits: /* @__PURE__ */
|
|
676
|
-
setup(
|
|
677
|
-
emit:
|
|
536
|
+
emits: /* @__PURE__ */ B(["blur"], ["update:modelValue"]),
|
|
537
|
+
setup(e, {
|
|
538
|
+
emit: t
|
|
678
539
|
}) {
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
const model = useModel(__props, "modelValue");
|
|
682
|
-
const formItemValidation = inject(X_FORM_ITEM_VALIDATION, void 0);
|
|
683
|
-
if (formItemValidation?.required) {
|
|
540
|
+
const o = e, n = t, l = x(e, "modelValue"), i = p(z, void 0);
|
|
541
|
+
if (i?.required) {
|
|
684
542
|
const {
|
|
685
|
-
validator,
|
|
686
|
-
label
|
|
687
|
-
} =
|
|
688
|
-
|
|
689
|
-
if (model.value === void 0) {
|
|
690
|
-
return `请输入${label}`;
|
|
691
|
-
}
|
|
692
|
-
return validator?.();
|
|
693
|
-
};
|
|
543
|
+
validator: a,
|
|
544
|
+
label: u
|
|
545
|
+
} = i;
|
|
546
|
+
i.validator = () => l.value === void 0 ? `请输入${u}` : a?.();
|
|
694
547
|
}
|
|
695
|
-
const
|
|
696
|
-
|
|
697
|
-
emit("blur");
|
|
548
|
+
const r = () => {
|
|
549
|
+
i?.validate(), n("blur");
|
|
698
550
|
};
|
|
699
|
-
return (
|
|
700
|
-
const
|
|
701
|
-
return
|
|
702
|
-
modelValue:
|
|
703
|
-
"onUpdate:modelValue":
|
|
704
|
-
onBlur:
|
|
551
|
+
return (a, u) => {
|
|
552
|
+
const s = U("ElInputNumber");
|
|
553
|
+
return m(), b(s, C(o, {
|
|
554
|
+
modelValue: l.value,
|
|
555
|
+
"onUpdate:modelValue": u[0] || (u[0] = (c) => l.value = c),
|
|
556
|
+
onBlur: r
|
|
705
557
|
}), null, 16, ["modelValue"]);
|
|
706
558
|
};
|
|
707
559
|
}
|
|
708
|
-
})
|
|
709
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
560
|
+
}), ot = /* @__PURE__ */ y({
|
|
710
561
|
__name: "XPagination",
|
|
711
|
-
props: /* @__PURE__ */
|
|
562
|
+
props: /* @__PURE__ */ B({
|
|
712
563
|
sizes: { default: () => [20, 50, 100] },
|
|
713
564
|
pageSize: {},
|
|
714
565
|
defaultPageSize: {},
|
|
@@ -727,36 +578,31 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
727
578
|
teleported: { type: Boolean },
|
|
728
579
|
small: { type: Boolean },
|
|
729
580
|
size: {},
|
|
730
|
-
background: { type: Boolean, default:
|
|
581
|
+
background: { type: Boolean, default: !0 },
|
|
731
582
|
disabled: { type: Boolean },
|
|
732
583
|
hideOnSinglePage: { type: Boolean },
|
|
733
584
|
appendSizeTo: {}
|
|
734
585
|
}, {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
586
|
+
size: {},
|
|
587
|
+
sizeModifiers: {},
|
|
588
|
+
current: {},
|
|
589
|
+
currentModifiers: {}
|
|
739
590
|
}),
|
|
740
|
-
emits: /* @__PURE__ */
|
|
741
|
-
setup(
|
|
742
|
-
const
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
onSizeChange: _cache[2] || (_cache[2] = ($event) => emit("sizeChange", $event)),
|
|
752
|
-
onCurrentChange: _cache[3] || (_cache[3] = ($event) => emit("currentChange", $event))
|
|
753
|
-
}), null, 16, ["current-page", "page-size"]);
|
|
754
|
-
};
|
|
591
|
+
emits: /* @__PURE__ */ B(["sizeChange", "currentChange"], ["update:size", "update:current"]),
|
|
592
|
+
setup(e, { emit: t }) {
|
|
593
|
+
const o = t, n = x(e, "size"), l = x(e, "current");
|
|
594
|
+
return (i, r) => (m(), b(h(Ce), C({ background: e.background, pageSizes: e.sizes, layout: e.layout, total: e.total }, {
|
|
595
|
+
"current-page": l.value,
|
|
596
|
+
"onUpdate:currentPage": r[0] || (r[0] = (a) => l.value = a),
|
|
597
|
+
"page-size": n.value,
|
|
598
|
+
"onUpdate:pageSize": r[1] || (r[1] = (a) => n.value = a),
|
|
599
|
+
onSizeChange: r[2] || (r[2] = (a) => o("sizeChange", a)),
|
|
600
|
+
onCurrentChange: r[3] || (r[3] = (a) => o("currentChange", a))
|
|
601
|
+
}), null, 16, ["current-page", "page-size"]));
|
|
755
602
|
}
|
|
756
|
-
})
|
|
757
|
-
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
603
|
+
}), nt = /* @__PURE__ */ y({
|
|
758
604
|
__name: "XRate",
|
|
759
|
-
props: /* @__PURE__ */
|
|
605
|
+
props: /* @__PURE__ */ B({
|
|
760
606
|
ariaLabel: {},
|
|
761
607
|
id: {},
|
|
762
608
|
lowThreshold: {},
|
|
@@ -789,56 +635,52 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
789
635
|
type: Boolean
|
|
790
636
|
}
|
|
791
637
|
}, {
|
|
792
|
-
|
|
793
|
-
|
|
638
|
+
modelValue: {},
|
|
639
|
+
modelModifiers: {}
|
|
794
640
|
}),
|
|
795
641
|
emits: ["update:modelValue"],
|
|
796
|
-
setup(
|
|
797
|
-
const
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event)
|
|
803
|
-
}), null, 16, ["modelValue"]);
|
|
804
|
-
};
|
|
642
|
+
setup(e) {
|
|
643
|
+
const t = e, o = x(e, "modelValue");
|
|
644
|
+
return (n, l) => (m(), b(h(Ee), C(t, {
|
|
645
|
+
modelValue: o.value,
|
|
646
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => o.value = i)
|
|
647
|
+
}), null, 16, ["modelValue"]));
|
|
805
648
|
}
|
|
806
|
-
})
|
|
807
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
649
|
+
}), it = /* @__PURE__ */ y({
|
|
808
650
|
__name: "XReconfirm",
|
|
809
651
|
props: {
|
|
810
652
|
title: { default: "是否执行?" }
|
|
811
653
|
},
|
|
812
654
|
emits: ["cancel", "confirm"],
|
|
813
|
-
setup(
|
|
814
|
-
const
|
|
815
|
-
return (
|
|
816
|
-
const
|
|
817
|
-
return
|
|
818
|
-
title:
|
|
819
|
-
onCancel:
|
|
820
|
-
onConfirm:
|
|
655
|
+
setup(e, { emit: t }) {
|
|
656
|
+
const o = t;
|
|
657
|
+
return (n, l) => {
|
|
658
|
+
const i = U("XButton");
|
|
659
|
+
return m(), b(h(xe), {
|
|
660
|
+
title: e.title,
|
|
661
|
+
onCancel: l[0] || (l[0] = () => o("cancel")),
|
|
662
|
+
onConfirm: l[1] || (l[1] = () => o("confirm"))
|
|
821
663
|
}, {
|
|
822
|
-
reference:
|
|
823
|
-
|
|
664
|
+
reference: g(() => [
|
|
665
|
+
E(n.$slots, "default")
|
|
824
666
|
]),
|
|
825
|
-
actions:
|
|
826
|
-
|
|
667
|
+
actions: g(({ confirm: r, cancel: a }) => [
|
|
668
|
+
k(i, {
|
|
827
669
|
size: "small",
|
|
828
|
-
onClick:
|
|
670
|
+
onClick: a
|
|
829
671
|
}, {
|
|
830
|
-
default:
|
|
831
|
-
|
|
672
|
+
default: g(() => [...l[2] || (l[2] = [
|
|
673
|
+
q(" 取消 ", -1)
|
|
832
674
|
])]),
|
|
833
675
|
_: 1
|
|
834
676
|
}, 8, ["onClick"]),
|
|
835
|
-
|
|
677
|
+
k(i, {
|
|
836
678
|
type: "danger",
|
|
837
679
|
size: "small",
|
|
838
|
-
onClick:
|
|
680
|
+
onClick: r
|
|
839
681
|
}, {
|
|
840
|
-
default:
|
|
841
|
-
|
|
682
|
+
default: g(() => [...l[3] || (l[3] = [
|
|
683
|
+
q(" 确定 ", -1)
|
|
842
684
|
])]),
|
|
843
685
|
_: 1
|
|
844
686
|
}, 8, ["onClick"])
|
|
@@ -847,8 +689,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
847
689
|
}, 8, ["title"]);
|
|
848
690
|
};
|
|
849
691
|
}
|
|
850
|
-
})
|
|
851
|
-
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
692
|
+
}), rt = /* @__PURE__ */ y({
|
|
852
693
|
__name: "XScrollbar",
|
|
853
694
|
props: {
|
|
854
695
|
ariaLabel: {},
|
|
@@ -875,30 +716,23 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
875
716
|
id: {},
|
|
876
717
|
role: {}
|
|
877
718
|
},
|
|
878
|
-
setup(
|
|
879
|
-
expose:
|
|
719
|
+
setup(e, {
|
|
720
|
+
expose: t
|
|
880
721
|
}) {
|
|
881
|
-
const
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
ref: "scrollbar"
|
|
892
|
-
}, props), {
|
|
893
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
894
|
-
_: 3
|
|
895
|
-
}, 16);
|
|
896
|
-
};
|
|
722
|
+
const o = e, n = Z("scrollbar"), l = V(() => n.value?.wrapRef), i = V(() => l.value?.firstElementChild);
|
|
723
|
+
return t({
|
|
724
|
+
wrapRef: l,
|
|
725
|
+
viewRef: i
|
|
726
|
+
}), (r, a) => (m(), b(h(Te), C({
|
|
727
|
+
ref: "scrollbar"
|
|
728
|
+
}, o), {
|
|
729
|
+
default: g(() => [E(r.$slots, "default")]),
|
|
730
|
+
_: 3
|
|
731
|
+
}, 16));
|
|
897
732
|
}
|
|
898
|
-
})
|
|
899
|
-
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
733
|
+
}), dt = /* @__PURE__ */ y({
|
|
900
734
|
__name: "XSelect",
|
|
901
|
-
props: /* @__PURE__ */
|
|
735
|
+
props: /* @__PURE__ */ B({
|
|
902
736
|
data: {},
|
|
903
737
|
factory: {
|
|
904
738
|
type: Function
|
|
@@ -922,7 +756,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
922
756
|
effect: {},
|
|
923
757
|
disabled: {
|
|
924
758
|
type: Boolean,
|
|
925
|
-
default: () =>
|
|
759
|
+
default: () => {
|
|
760
|
+
}
|
|
926
761
|
},
|
|
927
762
|
clearable: {
|
|
928
763
|
type: Boolean
|
|
@@ -999,125 +834,90 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
999
834
|
options: {},
|
|
1000
835
|
props: {}
|
|
1001
836
|
}, {
|
|
1002
|
-
|
|
1003
|
-
|
|
837
|
+
modelValue: {},
|
|
838
|
+
modelModifiers: {}
|
|
1004
839
|
}),
|
|
1005
|
-
emits: /* @__PURE__ */
|
|
1006
|
-
setup(
|
|
1007
|
-
emit:
|
|
840
|
+
emits: /* @__PURE__ */ B(["blur", "change"], ["update:modelValue"]),
|
|
841
|
+
setup(e, {
|
|
842
|
+
emit: t
|
|
1008
843
|
}) {
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
};
|
|
1025
|
-
const backward = (key) => options.value.map((item) => item.value).find((item) => forward(item) === key);
|
|
1026
|
-
let no = 0;
|
|
1027
|
-
watch([model, init], async () => {
|
|
1028
|
-
no++;
|
|
1029
|
-
if (model.value) {
|
|
1030
|
-
const lacks = [].concat(model.value).filter((item) => !init.value.map((it) => forward(it.value)).includes(forward(item)));
|
|
1031
|
-
const _no = no;
|
|
1032
|
-
const data = await __props.supplement?.(lacks);
|
|
1033
|
-
if (_no === no && data) {
|
|
1034
|
-
supplements.value = data;
|
|
1035
|
-
}
|
|
1036
|
-
} else {
|
|
1037
|
-
supplements.value = [];
|
|
1038
|
-
}
|
|
844
|
+
const o = t, n = x(e, "modelValue"), l = F([]), i = /* @__PURE__ */ Q(() => e.data, e.factory), r = V(() => [...(/* @__PURE__ */ Q(l, e.factory)).value, ...i.value]), a = (f) => {
|
|
845
|
+
if (typeof f == "object") {
|
|
846
|
+
if (e.identify)
|
|
847
|
+
return e.identify(f);
|
|
848
|
+
throw new Error("`identify` is required when value's type extends `object` or `object[]`");
|
|
849
|
+
} else
|
|
850
|
+
return f;
|
|
851
|
+
}, u = (f) => r.value.map((v) => v.value).find((v) => a(v) === f);
|
|
852
|
+
let s = 0;
|
|
853
|
+
W([n, i], async () => {
|
|
854
|
+
if (s++, n.value) {
|
|
855
|
+
const f = [].concat(n.value).filter((_) => !i.value.map((X) => a(X.value)).includes(a(_))), v = s, R = await e.supplement?.(f);
|
|
856
|
+
v === s && R && (l.value = R);
|
|
857
|
+
} else
|
|
858
|
+
l.value = [];
|
|
1039
859
|
}, {
|
|
1040
|
-
immediate:
|
|
860
|
+
immediate: !0
|
|
1041
861
|
});
|
|
1042
|
-
const
|
|
1043
|
-
const
|
|
862
|
+
const c = V(() => r.value.map((f) => {
|
|
863
|
+
const v = a(f.value);
|
|
1044
864
|
return {
|
|
1045
|
-
...
|
|
1046
|
-
key,
|
|
1047
|
-
value:
|
|
865
|
+
...f,
|
|
866
|
+
key: v,
|
|
867
|
+
value: v
|
|
1048
868
|
};
|
|
1049
|
-
}))
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
if (Array.isArray(val)) {
|
|
1054
|
-
model.value = val.map((item) => backward(item));
|
|
1055
|
-
} else {
|
|
1056
|
-
model.value = val === void 0 ? void 0 : backward(val) || (__props.allowCreate ? val : void 0);
|
|
1057
|
-
}
|
|
869
|
+
})), d = V({
|
|
870
|
+
get: () => n.value && (Array.isArray(n.value) ? n.value.map(a) : a(n.value)),
|
|
871
|
+
set: (f) => {
|
|
872
|
+
Array.isArray(f) ? n.value = f.map((v) => u(v)) : n.value = f === void 0 ? void 0 : u(f) || (e.allowCreate ? f : void 0);
|
|
1058
873
|
}
|
|
1059
|
-
});
|
|
1060
|
-
|
|
1061
|
-
if (formItemValidation?.required) {
|
|
874
|
+
}), w = p(z, void 0);
|
|
875
|
+
if (w?.required) {
|
|
1062
876
|
const {
|
|
1063
|
-
validator,
|
|
1064
|
-
label
|
|
1065
|
-
} =
|
|
1066
|
-
|
|
1067
|
-
if (!model.value || Array.isArray(model.value) && model.value.length === 0) {
|
|
1068
|
-
return `请选择${label}`;
|
|
1069
|
-
}
|
|
1070
|
-
return validator?.();
|
|
1071
|
-
};
|
|
877
|
+
validator: f,
|
|
878
|
+
label: v
|
|
879
|
+
} = w;
|
|
880
|
+
w.validator = () => !n.value || Array.isArray(n.value) && n.value.length === 0 ? `请选择${v}` : f?.();
|
|
1072
881
|
}
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
const
|
|
1076
|
-
|
|
1077
|
-
tableQueryExecuteHook?.on(() => formItemLabel && tableQueryUpdateHook?.trigger([formItemLabel, _model.value === void 0 ? void 0 : [].concat(_model.value).map((item) => _options.value.find((option) => option.value === item).label).join(",")]));
|
|
1078
|
-
const change = (value) => emit("change", value);
|
|
1079
|
-
const blur = () => {
|
|
1080
|
-
formItemValidation?.validate();
|
|
1081
|
-
emit("blur");
|
|
882
|
+
const T = p(M, void 0), S = p(D, void 0), A = p(H, void 0);
|
|
883
|
+
S?.on(([f, v]) => T === f && v === void 0 && (d.value = void 0)), A?.on(() => T && S?.trigger([T, d.value === void 0 ? void 0 : [].concat(d.value).map((f) => c.value.find((v) => v.value === f).label).join(",")]));
|
|
884
|
+
const le = (f) => o("change", f), oe = () => {
|
|
885
|
+
w?.validate(), o("blur");
|
|
1082
886
|
};
|
|
1083
|
-
return (
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
collapseTagsTooltip: __props.collapseTags
|
|
887
|
+
return (f, v) => {
|
|
888
|
+
const R = U("ElOption"), _ = U("ElSelect");
|
|
889
|
+
return m(), b(_, C({
|
|
890
|
+
allowCreate: e.allowCreate,
|
|
891
|
+
clearable: e.clearable,
|
|
892
|
+
filterable: e.filterable,
|
|
893
|
+
remote: e.remote,
|
|
894
|
+
remoteMethod: e.remoteMethod,
|
|
895
|
+
placeholder: e.placeholder,
|
|
896
|
+
disabled: e.disabled,
|
|
897
|
+
size: e.size,
|
|
898
|
+
loading: e.loading,
|
|
899
|
+
multiple: e.multiple,
|
|
900
|
+
collapseTags: e.collapseTags,
|
|
901
|
+
collapseTagsTooltip: e.collapseTags
|
|
1099
902
|
}, {
|
|
1100
|
-
modelValue:
|
|
1101
|
-
"onUpdate:modelValue":
|
|
1102
|
-
onBlur:
|
|
1103
|
-
onChange:
|
|
903
|
+
modelValue: d.value,
|
|
904
|
+
"onUpdate:modelValue": v[0] || (v[0] = (X) => d.value = X),
|
|
905
|
+
onBlur: oe,
|
|
906
|
+
onChange: le
|
|
1104
907
|
}), {
|
|
1105
|
-
default:
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
}, 1032, ["label", "value"]);
|
|
1114
|
-
}), 128))]),
|
|
908
|
+
default: g(() => [(m(!0), j(Y, null, J(c.value, (X) => (m(), b(R, {
|
|
909
|
+
key: X.key,
|
|
910
|
+
label: X.label,
|
|
911
|
+
value: X.value
|
|
912
|
+
}, {
|
|
913
|
+
default: g(() => [q(se(X.label), 1)]),
|
|
914
|
+
_: 2
|
|
915
|
+
}, 1032, ["label", "value"]))), 128))]),
|
|
1115
916
|
_: 1
|
|
1116
917
|
}, 16, ["modelValue"]);
|
|
1117
918
|
};
|
|
1118
919
|
}
|
|
1119
|
-
})
|
|
1120
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
920
|
+
}), ut = /* @__PURE__ */ y({
|
|
1121
921
|
__name: "XSpace",
|
|
1122
922
|
props: {
|
|
1123
923
|
direction: {},
|
|
@@ -1135,17 +935,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1135
935
|
fillRatio: {},
|
|
1136
936
|
size: {}
|
|
1137
937
|
},
|
|
1138
|
-
setup(
|
|
1139
|
-
const
|
|
1140
|
-
return (
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
}, 16);
|
|
1145
|
-
};
|
|
938
|
+
setup(e) {
|
|
939
|
+
const t = e;
|
|
940
|
+
return (o, n) => (m(), b(h(Se), $(O(t)), {
|
|
941
|
+
default: g(() => [E(o.$slots, "default")]),
|
|
942
|
+
_: 3
|
|
943
|
+
}, 16));
|
|
1146
944
|
}
|
|
1147
|
-
})
|
|
1148
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
945
|
+
}), st = /* @__PURE__ */ y({
|
|
1149
946
|
__name: "XTable",
|
|
1150
947
|
props: {
|
|
1151
948
|
data: {},
|
|
@@ -1165,123 +962,110 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1165
962
|
}
|
|
1166
963
|
},
|
|
1167
964
|
emits: ["rowClick", "selectionChange", "headerDragend"],
|
|
1168
|
-
setup(
|
|
1169
|
-
emit:
|
|
965
|
+
setup(e, {
|
|
966
|
+
emit: t
|
|
1170
967
|
}) {
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1173
|
-
const el = ref();
|
|
1174
|
-
const size = useElementSize(container);
|
|
1175
|
-
const _height = computed(() => __props.height ?? size.height.value);
|
|
1176
|
-
const X = () => createVNode(ElTable, mergeProps({
|
|
1177
|
-
"ref": el
|
|
968
|
+
const o = t, n = Z("container"), l = F(), i = Ne(n), r = V(() => e.height ?? i.height.value), a = () => k(Xe, C({
|
|
969
|
+
ref: l
|
|
1178
970
|
}, {
|
|
1179
|
-
data:
|
|
1180
|
-
height:
|
|
1181
|
-
showOverflowTooltip:
|
|
1182
|
-
border:
|
|
1183
|
-
highlightCurrentRow:
|
|
1184
|
-
spanMethod:
|
|
971
|
+
data: e.data,
|
|
972
|
+
height: r.value,
|
|
973
|
+
showOverflowTooltip: e.showOverflowTooltip,
|
|
974
|
+
border: e.border,
|
|
975
|
+
highlightCurrentRow: e.highlightCurrentRow,
|
|
976
|
+
spanMethod: e.spanMethod
|
|
1185
977
|
}, {
|
|
1186
|
-
"onRow-click": (
|
|
1187
|
-
"onSelection-change": (
|
|
1188
|
-
"onHeader-dragend": (
|
|
978
|
+
"onRow-click": (u) => o("rowClick", u),
|
|
979
|
+
"onSelection-change": (u) => o("selectionChange", u),
|
|
980
|
+
"onHeader-dragend": (u, s, c) => o("headerDragend", u, s, c)
|
|
1189
981
|
}), {
|
|
1190
|
-
default: () =>
|
|
982
|
+
default: () => e.columns.map((u) => k(ze, u, {
|
|
1191
983
|
default: ({
|
|
1192
|
-
$index,
|
|
1193
|
-
row
|
|
1194
|
-
}) =>
|
|
1195
|
-
index:
|
|
1196
|
-
row
|
|
984
|
+
$index: s,
|
|
985
|
+
row: c
|
|
986
|
+
}) => u.content?.({
|
|
987
|
+
index: s,
|
|
988
|
+
row: c
|
|
1197
989
|
}),
|
|
1198
|
-
header: () =>
|
|
1199
|
-
column
|
|
1200
|
-
}) ??
|
|
990
|
+
header: () => u.header?.({
|
|
991
|
+
column: u
|
|
992
|
+
}) ?? u.label
|
|
1201
993
|
}))
|
|
1202
994
|
});
|
|
1203
|
-
return (
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
}, [createVNode(X)], 2);
|
|
1209
|
-
};
|
|
995
|
+
return (u, s) => (m(), j("div", {
|
|
996
|
+
ref_key: "container",
|
|
997
|
+
ref: n,
|
|
998
|
+
class: ce([e.height === void 0 && "h-full"])
|
|
999
|
+
}, [k(a)], 2));
|
|
1210
1000
|
}
|
|
1211
|
-
})
|
|
1212
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1001
|
+
}), ct = /* @__PURE__ */ y({
|
|
1213
1002
|
__name: "XTabs",
|
|
1214
|
-
props: /* @__PURE__ */
|
|
1003
|
+
props: /* @__PURE__ */ B({
|
|
1215
1004
|
type: {},
|
|
1216
1005
|
defaultValue: {},
|
|
1217
1006
|
addable: {
|
|
1218
1007
|
type: Boolean,
|
|
1219
|
-
default: () =>
|
|
1008
|
+
default: () => {
|
|
1009
|
+
}
|
|
1220
1010
|
},
|
|
1221
1011
|
editable: {
|
|
1222
1012
|
type: Boolean,
|
|
1223
|
-
default: () =>
|
|
1013
|
+
default: () => {
|
|
1014
|
+
}
|
|
1224
1015
|
},
|
|
1225
1016
|
tabPosition: {}
|
|
1226
1017
|
}, {
|
|
1227
|
-
|
|
1228
|
-
|
|
1018
|
+
modelValue: {},
|
|
1019
|
+
modelModifiers: {}
|
|
1229
1020
|
}),
|
|
1230
|
-
emits: /* @__PURE__ */
|
|
1231
|
-
setup(
|
|
1232
|
-
emit:
|
|
1021
|
+
emits: /* @__PURE__ */ B(["tabChange", "tabRemove"], ["update:modelValue"]),
|
|
1022
|
+
setup(e, {
|
|
1023
|
+
emit: t
|
|
1233
1024
|
}) {
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
}), {
|
|
1251
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1252
|
-
_: 3
|
|
1253
|
-
}, 16, ["modelValue"]);
|
|
1254
|
-
};
|
|
1025
|
+
const o = t, n = x(e, "modelValue");
|
|
1026
|
+
return L(Oe, []), (i, r) => (m(), b(h(ke), C({
|
|
1027
|
+
addable: e.addable,
|
|
1028
|
+
editable: e.editable,
|
|
1029
|
+
type: e.type,
|
|
1030
|
+
defaultValue: e.defaultValue,
|
|
1031
|
+
tabPosition: e.tabPosition
|
|
1032
|
+
}, {
|
|
1033
|
+
modelValue: n.value,
|
|
1034
|
+
"onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
|
|
1035
|
+
onTabChange: r[1] || (r[1] = (a) => o("tabChange", a)),
|
|
1036
|
+
onTabRemove: r[2] || (r[2] = (a) => o("tabRemove", a))
|
|
1037
|
+
}), {
|
|
1038
|
+
default: g(() => [E(i.$slots, "default")]),
|
|
1039
|
+
_: 3
|
|
1040
|
+
}, 16, ["modelValue"]));
|
|
1255
1041
|
}
|
|
1256
|
-
})
|
|
1257
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1042
|
+
}), ft = /* @__PURE__ */ y({
|
|
1258
1043
|
__name: "XText",
|
|
1259
1044
|
props: {
|
|
1260
1045
|
type: {},
|
|
1261
1046
|
size: {},
|
|
1262
|
-
truncated: { type: Boolean, default: () =>
|
|
1047
|
+
truncated: { type: Boolean, default: () => {
|
|
1048
|
+
} }
|
|
1263
1049
|
},
|
|
1264
|
-
setup(
|
|
1265
|
-
return (
|
|
1266
|
-
|
|
1267
|
-
default
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
}, 16);
|
|
1272
|
-
};
|
|
1050
|
+
setup(e) {
|
|
1051
|
+
return (t, o) => (m(), b(h(Ie), $(O({ type: e.type, size: e.size, truncated: e.truncated })), {
|
|
1052
|
+
default: g(() => [
|
|
1053
|
+
E(t.$slots, "default")
|
|
1054
|
+
]),
|
|
1055
|
+
_: 3
|
|
1056
|
+
}, 16));
|
|
1273
1057
|
}
|
|
1274
|
-
})
|
|
1275
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1058
|
+
}), mt = /* @__PURE__ */ y({
|
|
1276
1059
|
__name: "XUpload",
|
|
1277
|
-
props: /* @__PURE__ */
|
|
1060
|
+
props: /* @__PURE__ */ B({
|
|
1278
1061
|
action: {},
|
|
1279
1062
|
data: {
|
|
1280
1063
|
type: Function
|
|
1281
1064
|
},
|
|
1282
1065
|
disabled: {
|
|
1283
1066
|
type: Boolean,
|
|
1284
|
-
default: () =>
|
|
1067
|
+
default: () => {
|
|
1068
|
+
}
|
|
1285
1069
|
},
|
|
1286
1070
|
limit: {},
|
|
1287
1071
|
multiple: {
|
|
@@ -1289,7 +1073,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1289
1073
|
},
|
|
1290
1074
|
showFileList: {
|
|
1291
1075
|
type: Boolean,
|
|
1292
|
-
default:
|
|
1076
|
+
default: !0
|
|
1293
1077
|
},
|
|
1294
1078
|
drag: {
|
|
1295
1079
|
type: Boolean
|
|
@@ -1297,86 +1081,78 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1297
1081
|
accept: {},
|
|
1298
1082
|
listType: {},
|
|
1299
1083
|
maxSize: {
|
|
1300
|
-
default: () =>
|
|
1084
|
+
default: () => 1 / 0
|
|
1301
1085
|
}
|
|
1302
1086
|
}, {
|
|
1303
|
-
|
|
1304
|
-
|
|
1087
|
+
modelValue: {},
|
|
1088
|
+
modelModifiers: {}
|
|
1305
1089
|
}),
|
|
1306
1090
|
emits: ["update:modelValue"],
|
|
1307
|
-
setup(
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
const formItemValidation = inject(X_FORM_ITEM_VALIDATION, void 0);
|
|
1315
|
-
if (formItemValidation?.required) {
|
|
1091
|
+
setup(e) {
|
|
1092
|
+
const t = x(e, "modelValue"), o = V(() => [].concat(t.value ?? []).reverse().map((a) => ({
|
|
1093
|
+
name: a.split("/").findLast(() => !0),
|
|
1094
|
+
url: a,
|
|
1095
|
+
uid: Number(a.slice(0, a.lastIndexOf("/")).split("/").findLast(() => !0))
|
|
1096
|
+
}))), n = p(z, void 0);
|
|
1097
|
+
if (n?.required) {
|
|
1316
1098
|
const {
|
|
1317
|
-
validator,
|
|
1318
|
-
label
|
|
1319
|
-
} =
|
|
1320
|
-
|
|
1321
|
-
if (!model.value || Array.isArray(model.value) && model.value.length === 0) {
|
|
1322
|
-
return `请上传${label}`;
|
|
1323
|
-
}
|
|
1324
|
-
return validator?.();
|
|
1325
|
-
};
|
|
1099
|
+
validator: a,
|
|
1100
|
+
label: u
|
|
1101
|
+
} = n;
|
|
1102
|
+
n.validator = () => !t.value || Array.isArray(t.value) && t.value.length === 0 ? `请上传${u}` : a?.();
|
|
1326
1103
|
}
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1329
|
-
ElMessage.warning("文件过大,请重新选择");
|
|
1330
|
-
}
|
|
1331
|
-
return rawFile.size < __props.maxSize;
|
|
1332
|
-
};
|
|
1333
|
-
const preview = (uploadFile) => window.open(uploadFile.url);
|
|
1334
|
-
const remove = (uploadFile, uploadFiles) => {
|
|
1335
|
-
model.value = Array.isArray(model.value) ? uploadFiles.map((it) => it.url) : void 0;
|
|
1336
|
-
};
|
|
1337
|
-
return (_ctx, _cache) => {
|
|
1338
|
-
return openBlock(), createBlock(unref(ElUpload), normalizeProps(guardReactiveProps({
|
|
1339
|
-
limit: __props.limit,
|
|
1340
|
-
disabled: __props.disabled,
|
|
1341
|
-
data: __props.data,
|
|
1342
|
-
maxSize: __props.maxSize,
|
|
1343
|
-
showFileList: __props.showFileList,
|
|
1344
|
-
fileList: fileList.value,
|
|
1345
|
-
beforeUpload,
|
|
1346
|
-
onPreview: preview,
|
|
1347
|
-
onRemove: remove
|
|
1348
|
-
})), {
|
|
1349
|
-
file: withCtx(({
|
|
1350
|
-
file
|
|
1351
|
-
}) => [renderSlot(_ctx.$slots, "file", {
|
|
1352
|
-
file
|
|
1353
|
-
})]),
|
|
1354
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1355
|
-
_: 3
|
|
1356
|
-
}, 16);
|
|
1104
|
+
const l = (a) => (a.size > e.maxSize && ee.warning("文件过大,请重新选择"), a.size < e.maxSize), i = (a) => window.open(a.url), r = (a, u) => {
|
|
1105
|
+
t.value = Array.isArray(t.value) ? u.map((s) => s.url) : void 0;
|
|
1357
1106
|
};
|
|
1107
|
+
return (a, u) => (m(), b(h(Ae), $(O({
|
|
1108
|
+
limit: e.limit,
|
|
1109
|
+
disabled: e.disabled,
|
|
1110
|
+
data: e.data,
|
|
1111
|
+
maxSize: e.maxSize,
|
|
1112
|
+
showFileList: e.showFileList,
|
|
1113
|
+
fileList: o.value,
|
|
1114
|
+
beforeUpload: l,
|
|
1115
|
+
onPreview: i,
|
|
1116
|
+
onRemove: r
|
|
1117
|
+
})), {
|
|
1118
|
+
file: g(({
|
|
1119
|
+
file: s
|
|
1120
|
+
}) => [E(a.$slots, "file", {
|
|
1121
|
+
file: s
|
|
1122
|
+
})]),
|
|
1123
|
+
default: g(() => [E(a.$slots, "default")]),
|
|
1124
|
+
_: 3
|
|
1125
|
+
}, 16));
|
|
1358
1126
|
}
|
|
1359
1127
|
});
|
|
1360
1128
|
export {
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
XFormItem,
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1129
|
+
We as XButton,
|
|
1130
|
+
je as XCascader,
|
|
1131
|
+
Ke as XCheckbox,
|
|
1132
|
+
Ge as XColorPicker,
|
|
1133
|
+
Ye as XDialog,
|
|
1134
|
+
Je as XDivider,
|
|
1135
|
+
et as XForm,
|
|
1136
|
+
Ze as XFormItem,
|
|
1137
|
+
tt as XImage,
|
|
1138
|
+
at as XInput,
|
|
1139
|
+
lt as XInputNumber,
|
|
1140
|
+
ot as XPagination,
|
|
1141
|
+
nt as XRate,
|
|
1142
|
+
it as XReconfirm,
|
|
1143
|
+
rt as XScrollbar,
|
|
1144
|
+
dt as XSelect,
|
|
1145
|
+
ut as XSpace,
|
|
1146
|
+
st as XTable,
|
|
1147
|
+
ct as XTabs,
|
|
1148
|
+
ft as XText,
|
|
1149
|
+
mt as XUpload,
|
|
1150
|
+
M as X_FORM_ITEM_LABEL,
|
|
1151
|
+
z as X_FORM_ITEM_VALIDATION,
|
|
1152
|
+
$e as X_FORM_TAB_UPDATE_HOOK,
|
|
1153
|
+
te as X_FORM_VALIDATIONS,
|
|
1154
|
+
H as X_TABLE_QUERY_EXECUTE_HOOK,
|
|
1155
|
+
D as X_TABLE_QUERY_UPDATE_HOOK,
|
|
1156
|
+
Me as X_TAB_PANE,
|
|
1157
|
+
Oe as X_TAB_PANES
|
|
1382
1158
|
};
|