wyfe-ivue 2.19.1 → 2.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Cascader-BB3yk28P.js → Cascader-De3uqL3-.js} +321 -317
- package/dist/{DatePicker-PSGRmt7B.js → DatePicker-DaP1E7a9.js} +1 -1
- package/dist/{Input-BIm6QfM6.js → Input-DTEVzMZA.js} +1 -1
- package/dist/{InputNumber-D5ZFFg9v.js → InputNumber-_Aa3QbaM.js} +2 -2
- package/dist/{InputRange-DtdnyTGM.js → InputRange-QDIJ51OI.js} +2 -2
- package/dist/Radio-CWCqPqLp.js +73 -0
- package/dist/Select-Docj4pi0.js +94 -0
- package/dist/{Switch-C37DM8ZB.js → Switch-BUR-lMXb.js} +1 -1
- package/dist/{TimePicker-BCPNKwbx.js → TimePicker-DxUQs9V2.js} +1 -1
- package/dist/{TimeSelect-QCGsl3tI.js → TimeSelect-CpZOfRRu.js} +2 -2
- package/dist/{TreeSelect-CIbi7fL-.js → TreeSelect-u8xEo6qQ.js} +186 -185
- package/dist/{UseElDatePicker-OPVXRCbb.js → UseElDatePicker-DKcagjH-.js} +1 -1
- package/dist/{UseElInput-DwzKiz_z.js → UseElInput-CLbTqLbW.js} +5 -5
- package/dist/{UseElSelect-ziqK7Be6.js → UseElSelect-BPA5PX-3.js} +1 -1
- package/dist/index.es.js +1318 -1289
- package/dist/index.umd.cjs +16 -16
- package/dist/types/UseCrudTable/index.vue.d.ts +6 -2
- package/dist/types/UseCrudTable/types.d.ts +3 -0
- package/dist/types/UseElDatePicker/index.vue.d.ts +1 -1
- package/dist/types/UseElForm/components/InlineForm.vue.d.ts +11 -2
- package/dist/types/UseElForm/components/RowForm.vue.d.ts +11 -2
- package/dist/types/UseElForm/components/controls/Select.vue.d.ts +16 -10
- package/dist/types/UseElForm/index.vue.d.ts +79 -22
- package/dist/types/UseElForm/props.d.ts +6 -1
- package/dist/types/UseElForm/types.d.ts +2 -1
- package/dist/types/UseElForm/useFormHook.d.ts +4 -1
- package/dist/types/UseElInput/index.vue.d.ts +4 -4
- package/dist/types/UseElInput/props.d.ts +1 -1
- package/dist/types/UseElSelect/index.vue.d.ts +1 -1
- package/dist/types/UseElTable/components/RecTableColumn.vue.d.ts +1 -1
- package/dist/types/UseElTable/hooks/useTableHook.d.ts +8 -4
- package/dist/types/UseElTable/types.d.ts +1 -2
- package/dist/utils-DPuuL5wm.js +28 -0
- package/dist/wyfe-ivue.css +1 -1
- package/package.json +1 -1
- package/src/components/UseCrudTable/types.ts +7 -0
- package/src/components/UseElForm/props.ts +10 -2
- package/src/components/UseElForm/types.ts +7 -1
- package/src/components/UseElInput/props.ts +1 -1
- package/src/components/UseElTable/props.ts +1 -1
- package/src/components/UseElTable/types.ts +6 -3
- package/src/types/dict.ts +12 -5
- package/src/types/index.ts +1 -0
- package/dist/Radio-4C1zMSBX.js +0 -72
- package/dist/Select-YTfQHWik.js +0 -80
- /package/dist/{UseRender-B4KwiKKC.js → UseRender-wyS1Ilio.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-CBt_VvXa.js → _plugin-vue_export-helper-CBpAGQk-.js} +0 -0
- /package/dist/{useLog-BlFalGf6.js → useLog-iDbeX-pi.js} +0 -0
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import { a as e, n as t, s as n } from "./use-locale-CmOc_a7M.js";
|
|
2
|
-
import { $t as r, A as i, At as a, Bt as o, Dt as s, E as c, Gt as l, H as u, It as d, M as f, O as p, S as m, Tt as h, Yt as g, _ as ee, f as _, i as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { a as
|
|
6
|
-
import { t as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
2
|
+
import { $t as r, A as i, At as a, Bt as o, Dt as s, E as c, Gt as l, H as u, It as d, M as f, O as p, S as m, Tt as h, Yt as g, _ as ee, f as _, i as v, p as y, r as b, s as x, t as te, tn as S, v as ne, x as C, xt as re } from "./css-BaGTfWV6.js";
|
|
3
|
+
import { t as w } from "./isEqual-Btx737-P.js";
|
|
4
|
+
import { t as ie } from "./cloneDeep-Cb5CTLhl.js";
|
|
5
|
+
import { a as ae, b as oe, f as T, g as se, h as ce, o as E, t as le, u as D } from "./css-DductTH5.js";
|
|
6
|
+
import { t as ue } from "./click-outside-Dk875U1u.js";
|
|
7
|
+
import { _ as O, a as de, h as fe, i as pe, m as me, o as he, t as k } from "./icon-C0_AuzqV.js";
|
|
8
|
+
import { t as ge } from "./input-VDXZFIJy.js";
|
|
9
|
+
import { a as A, n as _e, t as ve } from "./css-Crw3tNnP.js";
|
|
10
|
+
import { t as j } from "./css-HR0lxXHj.js";
|
|
11
|
+
import { t as ye } from "./css-D1Vxa6Sv.js";
|
|
12
|
+
import { r as M } from "./utils-DPuuL5wm.js";
|
|
13
|
+
import { t as be } from "./UseRender-wyS1Ilio.js";
|
|
13
14
|
import "./index.es.js";
|
|
14
|
-
import { Comment as
|
|
15
|
-
import { ArrowDown as
|
|
15
|
+
import { Comment as N, Fragment as P, computed as F, createBlock as I, createCommentVNode as L, createElementBlock as R, createElementVNode as z, createSlots as xe, createTextVNode as Se, createVNode as B, defineComponent as V, getCurrentInstance as H, inject as Ce, nextTick as we, normalizeClass as U, normalizeStyle as Te, onBeforeUpdate as Ee, onMounted as De, openBlock as W, provide as Oe, reactive as ke, ref as G, renderList as Ae, renderSlot as K, resolveDynamicComponent as je, toDisplayString as q, unref as J, useAttrs as Me, useSlots as Ne, vModelText as Pe, vShow as Fe, watch as Y, withCtx as X, withDirectives as Ie, withKeys as Le, withModifiers as Z } from "vue";
|
|
16
|
+
import { ArrowDown as Re, ArrowRight as ze, Check as Be, CircleClose as Ve, Loading as He } from "@element-plus/icons-vue";
|
|
16
17
|
//#region node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flattenDeep.js
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
return e != null && e.length ? u(e,
|
|
18
|
+
var Ue = Infinity;
|
|
19
|
+
function Q(e) {
|
|
20
|
+
return e != null && e.length ? u(e, Ue) : [];
|
|
20
21
|
}
|
|
21
22
|
//#endregion
|
|
22
23
|
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_ec03ac4af1881a498740109f524cb771/node_modules/element-plus/es/components/cascader-panel/src/config.mjs
|
|
23
|
-
var
|
|
24
|
+
var We = C({
|
|
24
25
|
modelValue: { type: m([
|
|
25
26
|
Number,
|
|
26
27
|
String,
|
|
@@ -35,13 +36,13 @@ var Q = S({
|
|
|
35
36
|
type: m(Object),
|
|
36
37
|
default: () => ({})
|
|
37
38
|
}
|
|
38
|
-
}),
|
|
39
|
+
}), Ge = {
|
|
39
40
|
expandTrigger: "click",
|
|
40
41
|
multiple: !1,
|
|
41
42
|
checkStrictly: !1,
|
|
42
43
|
emitPath: !0,
|
|
43
44
|
lazy: !1,
|
|
44
|
-
lazyLoad:
|
|
45
|
+
lazyLoad: re,
|
|
45
46
|
value: "value",
|
|
46
47
|
label: "label",
|
|
47
48
|
children: "children",
|
|
@@ -51,50 +52,50 @@ var Q = S({
|
|
|
51
52
|
checkOnClickNode: !1,
|
|
52
53
|
checkOnClickLeaf: !0,
|
|
53
54
|
showPrefix: !0
|
|
54
|
-
},
|
|
55
|
-
...
|
|
55
|
+
}, Ke = C({
|
|
56
|
+
...We,
|
|
56
57
|
border: {
|
|
57
58
|
type: Boolean,
|
|
58
59
|
default: !0
|
|
59
60
|
},
|
|
60
61
|
renderLabel: { type: Function }
|
|
61
|
-
}),
|
|
62
|
-
[
|
|
63
|
-
[r]:
|
|
62
|
+
}), qe = (e) => !0, Je = {
|
|
63
|
+
[S]: qe,
|
|
64
|
+
[r]: qe,
|
|
64
65
|
close: () => !0,
|
|
65
66
|
"expand-change": (e) => e
|
|
66
|
-
},
|
|
67
|
-
...
|
|
67
|
+
}, Ye = (e) => F(() => ({
|
|
68
|
+
...Ge,
|
|
68
69
|
...e.props
|
|
69
|
-
})),
|
|
70
|
+
})), Xe = Symbol();
|
|
70
71
|
//#endregion
|
|
71
72
|
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_ec03ac4af1881a498740109f524cb771/node_modules/element-plus/es/components/cascader-panel/src/node-content.mjs
|
|
72
|
-
function
|
|
73
|
-
return !!(h(e) ? e.every(({ type: e }) => e ===
|
|
73
|
+
function Ze(e) {
|
|
74
|
+
return !!(h(e) ? e.every(({ type: e }) => e === N) : e?.type === N);
|
|
74
75
|
}
|
|
75
|
-
var
|
|
76
|
+
var Qe = /* @__PURE__ */ V({
|
|
76
77
|
name: "NodeContent",
|
|
77
78
|
props: { node: {
|
|
78
79
|
type: Object,
|
|
79
80
|
required: !0
|
|
80
81
|
} },
|
|
81
82
|
setup(e) {
|
|
82
|
-
let t = ee("cascader-node"), { renderLabelFn: n } =
|
|
83
|
+
let t = ee("cascader-node"), { renderLabelFn: n } = Ce(Xe), { node: r } = e, { data: i, label: a } = r, o = () => {
|
|
83
84
|
let e = n?.({
|
|
84
85
|
node: r,
|
|
85
86
|
data: i
|
|
86
87
|
});
|
|
87
|
-
return
|
|
88
|
+
return Ze(e) ? a : e ?? a;
|
|
88
89
|
};
|
|
89
|
-
return () =>
|
|
90
|
+
return () => B("span", { class: t.e("label") }, [o()]);
|
|
90
91
|
}
|
|
91
|
-
}),
|
|
92
|
+
}), $e = [
|
|
92
93
|
"id",
|
|
93
94
|
"aria-haspopup",
|
|
94
95
|
"aria-owns",
|
|
95
96
|
"aria-expanded",
|
|
96
97
|
"tabindex"
|
|
97
|
-
],
|
|
98
|
+
], et = /* @__PURE__ */ V({
|
|
98
99
|
name: "ElCascaderNode",
|
|
99
100
|
__name: "node",
|
|
100
101
|
props: {
|
|
@@ -106,31 +107,31 @@ var Ze = /* @__PURE__ */ B({
|
|
|
106
107
|
},
|
|
107
108
|
emits: ["expand"],
|
|
108
109
|
setup(e, { emit: t }) {
|
|
109
|
-
let n = e, r = t, i =
|
|
110
|
+
let n = e, r = t, i = Ce(Xe), a = ee("cascader-node"), o = F(() => i.isHoverMenu), s = F(() => i.config.multiple), c = F(() => i.config.checkStrictly), l = F(() => i.config.showPrefix), u = F(() => i.checkedNodes[0]?.uid), d = F(() => n.node.isDisabled), f = F(() => n.node.isLeaf), p = F(() => c.value && !f.value || !d.value), m = F(() => g(i.expandingNode)), h = F(() => c.value && i.checkedNodes.some(g)), g = (e) => {
|
|
110
111
|
let { level: t, uid: r } = n.node;
|
|
111
112
|
return e?.pathNodes[t - 1]?.uid === r;
|
|
112
113
|
}, _ = () => {
|
|
113
114
|
m.value || i.expandNode(n.node);
|
|
114
|
-
},
|
|
115
|
+
}, v = (e) => {
|
|
115
116
|
let { node: t } = n;
|
|
116
117
|
e !== t.checked && i.handleCheckChange(t, e);
|
|
117
|
-
},
|
|
118
|
+
}, y = () => {
|
|
118
119
|
i.lazyLoad(n.node, () => {
|
|
119
120
|
f.value || _();
|
|
120
121
|
});
|
|
121
|
-
},
|
|
122
|
-
o.value && (
|
|
123
|
-
},
|
|
122
|
+
}, b = (e) => {
|
|
123
|
+
o.value && (x(), !f.value && r("expand", e));
|
|
124
|
+
}, x = () => {
|
|
124
125
|
let { node: e } = n;
|
|
125
|
-
!p.value || e.loading || (e.loaded ? _() :
|
|
126
|
-
},
|
|
127
|
-
f.value && !d.value && !c.value && !s.value ?
|
|
128
|
-
},
|
|
129
|
-
c.value ? (
|
|
130
|
-
},
|
|
131
|
-
n.node.loaded ? (
|
|
126
|
+
!p.value || e.loading || (e.loaded ? _() : y());
|
|
127
|
+
}, te = () => {
|
|
128
|
+
f.value && !d.value && !c.value && !s.value ? ne(!0) : (i.config.checkOnClickNode && (s.value || c.value) || f.value && i.config.checkOnClickLeaf) && !d.value ? S(!n.node.checked) : o.value || x();
|
|
129
|
+
}, S = (e) => {
|
|
130
|
+
c.value ? (v(e), n.node.loaded && _()) : ne(e);
|
|
131
|
+
}, ne = (e) => {
|
|
132
|
+
n.node.loaded ? (v(e), !c.value && _()) : y();
|
|
132
133
|
};
|
|
133
|
-
return (t, n) => (W(),
|
|
134
|
+
return (t, n) => (W(), R("li", {
|
|
134
135
|
id: `${e.menuId}-${e.node.uid}`,
|
|
135
136
|
role: "menuitem",
|
|
136
137
|
"aria-haspopup": !f.value,
|
|
@@ -145,62 +146,62 @@ var Ze = /* @__PURE__ */ B({
|
|
|
145
146
|
m.value && "in-active-path",
|
|
146
147
|
h.value && "in-checked-path"
|
|
147
148
|
]),
|
|
148
|
-
onMouseenter:
|
|
149
|
-
onFocus:
|
|
150
|
-
onClick:
|
|
149
|
+
onMouseenter: b,
|
|
150
|
+
onFocus: b,
|
|
151
|
+
onClick: te
|
|
151
152
|
}, [
|
|
152
|
-
|
|
153
|
-
s.value && l.value ? (W(),
|
|
153
|
+
L(" prefix "),
|
|
154
|
+
s.value && l.value ? (W(), I(J(j), {
|
|
154
155
|
key: 0,
|
|
155
156
|
"model-value": e.node.checked,
|
|
156
157
|
indeterminate: e.node.indeterminate,
|
|
157
158
|
disabled: d.value,
|
|
158
159
|
onClick: n[0] ||= Z(() => {}, ["stop"]),
|
|
159
|
-
"onUpdate:modelValue":
|
|
160
|
+
"onUpdate:modelValue": S
|
|
160
161
|
}, null, 8, [
|
|
161
162
|
"model-value",
|
|
162
163
|
"indeterminate",
|
|
163
164
|
"disabled"
|
|
164
|
-
])) : c.value && l.value ? (W(),
|
|
165
|
+
])) : c.value && l.value ? (W(), I(J(ye), {
|
|
165
166
|
key: 1,
|
|
166
167
|
"model-value": u.value,
|
|
167
168
|
label: e.node.uid,
|
|
168
169
|
disabled: d.value,
|
|
169
|
-
"onUpdate:modelValue":
|
|
170
|
+
"onUpdate:modelValue": S,
|
|
170
171
|
onClick: n[1] ||= Z(() => {}, ["stop"])
|
|
171
172
|
}, {
|
|
172
|
-
default: X(() => [
|
|
173
|
+
default: X(() => [L("\n Add an empty element to avoid render label,\n do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485\n "), n[2] ||= z("span", null, null, -1)]),
|
|
173
174
|
_: 1
|
|
174
175
|
}, 8, [
|
|
175
176
|
"model-value",
|
|
176
177
|
"label",
|
|
177
178
|
"disabled"
|
|
178
|
-
])) : f.value && e.node.checked ? (W(),
|
|
179
|
+
])) : f.value && e.node.checked ? (W(), I(J(k), {
|
|
179
180
|
key: 2,
|
|
180
181
|
class: U(J(a).e("prefix"))
|
|
181
182
|
}, {
|
|
182
|
-
default: X(() => [
|
|
183
|
+
default: X(() => [B(J(Be))]),
|
|
183
184
|
_: 1
|
|
184
|
-
}, 8, ["class"])) :
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
f.value ?
|
|
185
|
+
}, 8, ["class"])) : L("v-if", !0),
|
|
186
|
+
L(" content "),
|
|
187
|
+
B(J(Qe), { node: e.node }, null, 8, ["node"]),
|
|
188
|
+
L(" postfix "),
|
|
189
|
+
f.value ? L("v-if", !0) : (W(), R(P, { key: 3 }, [e.node.loading ? (W(), I(J(k), {
|
|
189
190
|
key: 0,
|
|
190
191
|
class: U([J(a).is("loading"), J(a).e("postfix")])
|
|
191
192
|
}, {
|
|
192
|
-
default: X(() => [
|
|
193
|
+
default: X(() => [B(J(He))]),
|
|
193
194
|
_: 1
|
|
194
|
-
}, 8, ["class"])) : (W(),
|
|
195
|
+
}, 8, ["class"])) : (W(), I(J(k), {
|
|
195
196
|
key: 1,
|
|
196
197
|
class: U(["arrow-right", J(a).e("postfix")])
|
|
197
198
|
}, {
|
|
198
|
-
default: X(() => [
|
|
199
|
+
default: X(() => [B(J(ze))]),
|
|
199
200
|
_: 1
|
|
200
201
|
}, 8, ["class"]))], 64))
|
|
201
|
-
], 42,
|
|
202
|
+
], 42, $e));
|
|
202
203
|
}
|
|
203
|
-
}),
|
|
204
|
+
}), tt = /* @__PURE__ */ V({
|
|
204
205
|
name: "ElCascaderMenu",
|
|
205
206
|
__name: "menu",
|
|
206
207
|
props: {
|
|
@@ -214,7 +215,7 @@ var Ze = /* @__PURE__ */ B({
|
|
|
214
215
|
}
|
|
215
216
|
},
|
|
216
217
|
setup(e) {
|
|
217
|
-
let n = e, r =
|
|
218
|
+
let n = e, r = H(), i = ee("cascader-menu"), { t: a } = t(), o = y(), s, c, l = Ce(Xe), u = G(), d = F(() => !n.nodes.length), f = F(() => !l.initialLoaded), p = F(() => `${o.value}-${n.index}`), m = (e) => {
|
|
218
219
|
s = e.target;
|
|
219
220
|
}, h = (e) => {
|
|
220
221
|
if (!(!l.isHoverMenu || !s || !u.value)) if (s.contains(e.target)) {
|
|
@@ -230,7 +231,7 @@ var Ze = /* @__PURE__ */ B({
|
|
|
230
231
|
}, _ = () => {
|
|
231
232
|
u.value && (u.value.innerHTML = "", g());
|
|
232
233
|
};
|
|
233
|
-
return (t, n) => (W(),
|
|
234
|
+
return (t, n) => (W(), I(J(le), {
|
|
234
235
|
key: p.value,
|
|
235
236
|
tag: "ul",
|
|
236
237
|
role: "menu",
|
|
@@ -241,30 +242,30 @@ var Ze = /* @__PURE__ */ B({
|
|
|
241
242
|
onMouseleave: _
|
|
242
243
|
}, {
|
|
243
244
|
default: X(() => [
|
|
244
|
-
(W(!0),
|
|
245
|
+
(W(!0), R(P, null, Ae(e.nodes, (e) => (W(), I(et, {
|
|
245
246
|
key: e.uid,
|
|
246
247
|
node: e,
|
|
247
248
|
"menu-id": p.value,
|
|
248
249
|
onExpand: m
|
|
249
250
|
}, null, 8, ["node", "menu-id"]))), 128)),
|
|
250
|
-
f.value ? (W(),
|
|
251
|
+
f.value ? (W(), R("div", {
|
|
251
252
|
key: 0,
|
|
252
253
|
class: U(J(i).e("empty-text"))
|
|
253
|
-
}, [
|
|
254
|
+
}, [B(J(k), {
|
|
254
255
|
size: "14",
|
|
255
256
|
class: U(J(i).is("loading"))
|
|
256
257
|
}, {
|
|
257
|
-
default: X(() => [
|
|
258
|
+
default: X(() => [B(J(He))]),
|
|
258
259
|
_: 1
|
|
259
|
-
}, 8, ["class"]),
|
|
260
|
+
}, 8, ["class"]), Se(" " + q(J(a)("el.cascader.loading")), 1)], 2)) : d.value ? (W(), R("div", {
|
|
260
261
|
key: 1,
|
|
261
262
|
class: U(J(i).e("empty-text"))
|
|
262
|
-
}, [K(t.$slots, "empty", {}, () => [
|
|
263
|
+
}, [K(t.$slots, "empty", {}, () => [Se(q(J(a)("el.cascader.noData")), 1)])], 2)) : J(l)?.isHoverMenu ? (W(), R(P, { key: 2 }, [L(" eslint-disable vue/html-self-closing "), (W(), R("svg", {
|
|
263
264
|
ref_key: "hoverZone",
|
|
264
265
|
ref: u,
|
|
265
266
|
class: U(J(i).e("hover-zone"))
|
|
266
|
-
}, null, 2))], 2112)) :
|
|
267
|
-
|
|
267
|
+
}, null, 2))], 2112)) : L("v-if", !0),
|
|
268
|
+
L(" eslint-enable vue/html-self-closing ")
|
|
268
269
|
]),
|
|
269
270
|
_: 3
|
|
270
271
|
}, 8, [
|
|
@@ -273,14 +274,14 @@ var Ze = /* @__PURE__ */ B({
|
|
|
273
274
|
"view-class"
|
|
274
275
|
]));
|
|
275
276
|
}
|
|
276
|
-
}),
|
|
277
|
+
}), nt = 0, rt = (e) => {
|
|
277
278
|
let t = [e], { parent: n } = e;
|
|
278
279
|
for (; n;) t.unshift(n), n = n.parent;
|
|
279
280
|
return t;
|
|
280
|
-
},
|
|
281
|
+
}, it = class e {
|
|
281
282
|
constructor(t, n, r, i = !1) {
|
|
282
|
-
this.data = t, this.config = n, this.parent = r, this.root = i, this.uid =
|
|
283
|
-
let { value: a, label: o, children: s } = n, c = t[s], l =
|
|
283
|
+
this.data = t, this.config = n, this.parent = r, this.root = i, this.uid = nt++, this.checked = !1, this.indeterminate = !1, this.loading = !1;
|
|
284
|
+
let { value: a, label: o, children: s } = n, c = t[s], l = rt(this);
|
|
284
285
|
this.level = i ? 0 : r ? r.level + 1 : 1, this.value = t[a], this.label = t[o], this.pathNodes = l, this.pathValues = l.map((e) => e.value), this.pathLabels = l.map((e) => e.label), this.childrenData = c, this.children = (c || []).map((t) => new e(t, n, this)), this.loaded = !n.lazy || this.isLeaf || !p(c), this.text = "";
|
|
285
286
|
}
|
|
286
287
|
get isDisabled() {
|
|
@@ -327,11 +328,11 @@ var Ze = /* @__PURE__ */ B({
|
|
|
327
328
|
let { checkStrictly: t, multiple: n } = this.config;
|
|
328
329
|
t || !n ? this.checked = e : (this.broadcast(e), this.setCheckState(e), this.emit());
|
|
329
330
|
}
|
|
330
|
-
},
|
|
331
|
+
}, $ = (e, t) => e.reduce((e, n) => (n.isLeaf ? e.push(n) : (!t && e.push(n), e = e.concat($(n.children, t))), e), []), at = class {
|
|
331
332
|
constructor(e, t) {
|
|
332
333
|
this.config = t;
|
|
333
|
-
let n = (e || []).map((e) => new
|
|
334
|
-
this.nodes = n, this.allNodes =
|
|
334
|
+
let n = (e || []).map((e) => new it(e, this.config));
|
|
335
|
+
this.nodes = n, this.allNodes = $(n, !1), this.leafNodes = $(n, !0);
|
|
335
336
|
}
|
|
336
337
|
getNodes() {
|
|
337
338
|
return this.nodes;
|
|
@@ -340,7 +341,7 @@ var Ze = /* @__PURE__ */ B({
|
|
|
340
341
|
return e ? this.leafNodes : this.allNodes;
|
|
341
342
|
}
|
|
342
343
|
appendNode(e, t) {
|
|
343
|
-
let n = t ? t.appendChild(e) : new
|
|
344
|
+
let n = t ? t.appendChild(e) : new it(e, this.config);
|
|
344
345
|
t || this.nodes.push(n), this.appendAllNodesAndLeafNodes(n);
|
|
345
346
|
}
|
|
346
347
|
appendNodes(e, t) {
|
|
@@ -352,69 +353,69 @@ var Ze = /* @__PURE__ */ B({
|
|
|
352
353
|
});
|
|
353
354
|
}
|
|
354
355
|
getNodeByValue(e, t = !1) {
|
|
355
|
-
return i(e) ? null : this.getFlattedNodes(t).find((t) =>
|
|
356
|
+
return i(e) ? null : this.getFlattedNodes(t).find((t) => w(t.value, e) || w(t.pathValues, e)) || null;
|
|
356
357
|
}
|
|
357
358
|
getSameNode(e) {
|
|
358
|
-
return e && this.getFlattedNodes(!1).find(({ value: t, level: n }) =>
|
|
359
|
+
return e && this.getFlattedNodes(!1).find(({ value: t, level: n }) => w(e.value, t) && e.level === n) || null;
|
|
359
360
|
}
|
|
360
|
-
},
|
|
361
|
+
}, ot = (e) => {
|
|
361
362
|
if (!e) return 0;
|
|
362
363
|
let t = e.id.split("-");
|
|
363
364
|
return Number(t[t.length - 2]);
|
|
364
|
-
},
|
|
365
|
+
}, st = (e) => {
|
|
365
366
|
if (!e) return;
|
|
366
367
|
let t = e.querySelector("input");
|
|
367
|
-
t ? t.click() :
|
|
368
|
-
},
|
|
368
|
+
t ? t.click() : O(e) && e.click();
|
|
369
|
+
}, ct = (e, t) => {
|
|
369
370
|
let n = t.slice(0), r = n.map((e) => e.uid), i = e.reduce((e, t) => {
|
|
370
371
|
let i = r.indexOf(t.uid);
|
|
371
372
|
return i > -1 && (e.push(t), n.splice(i, 1), r.splice(i, 1)), e;
|
|
372
373
|
}, []);
|
|
373
374
|
return i.push(...n), i;
|
|
374
|
-
},
|
|
375
|
+
}, lt = x(/* @__PURE__ */ V({
|
|
375
376
|
name: "ElCascaderPanel",
|
|
376
377
|
__name: "index",
|
|
377
|
-
props:
|
|
378
|
-
emits:
|
|
378
|
+
props: Ke,
|
|
379
|
+
emits: Je,
|
|
379
380
|
setup(t, { expose: i, emit: a }) {
|
|
380
|
-
let o = t, s = a, c = !1, u = ee("cascader"), d =
|
|
381
|
+
let o = t, s = a, c = !1, u = ee("cascader"), d = Ye(o), f = Ne(), m, h = G(!0), g = G(!1), _ = G([]), v = G(), y = G([]), b = G(), x = G([]), te = F(() => d.value.expandTrigger === "hover"), ne = F(() => o.renderLabel || f.default), C = () => {
|
|
381
382
|
let { options: e } = o, t = d.value;
|
|
382
|
-
c = !1, m = new
|
|
383
|
-
e && (m = new
|
|
384
|
-
})) :
|
|
385
|
-
},
|
|
383
|
+
c = !1, m = new at(e, t), y.value = [m.getNodes()], t.lazy && p(o.options) ? (h.value = !1, re(void 0, (e) => {
|
|
384
|
+
e && (m = new at(e, t), y.value = [m.getNodes()]), h.value = !0, O(!1, !0);
|
|
385
|
+
})) : O(!1, !0);
|
|
386
|
+
}, re = (e, t) => {
|
|
386
387
|
let n = d.value;
|
|
387
|
-
e ||= new
|
|
388
|
+
e ||= new it({}, n, void 0, !0), e.loading = !0, n.lazyLoad(e, (n) => {
|
|
388
389
|
let r = e, i = r.root ? null : r;
|
|
389
390
|
r.loading = !1, r.loaded = !0, r.childrenData = r.childrenData || [], n && m?.appendNodes(n, i), n && t?.(n), e.level === 0 && (g.value = !0);
|
|
390
391
|
}, () => {
|
|
391
392
|
e.loading = !1, e.loaded = !1, e.level === 0 && (h.value = !0);
|
|
392
393
|
});
|
|
393
|
-
},
|
|
394
|
-
let { level: n } = e, r =
|
|
395
|
-
e.isLeaf ? i = e.pathNodes[n - 2] : (i = e, r.push(e.children)),
|
|
396
|
-
},
|
|
397
|
-
let { checkStrictly: r, multiple: i } = d.value, a =
|
|
398
|
-
c = !0, !i && a?.doCheck(!1), e.doCheck(t),
|
|
399
|
-
},
|
|
400
|
-
e && (e = e.parent,
|
|
401
|
-
},
|
|
402
|
-
|
|
403
|
-
},
|
|
404
|
-
let { checkStrictly: e, multiple: t } = d.value, n =
|
|
405
|
-
|
|
406
|
-
},
|
|
394
|
+
}, ae = (e, t) => {
|
|
395
|
+
let { level: n } = e, r = y.value.slice(0, n), i;
|
|
396
|
+
e.isLeaf ? i = e.pathNodes[n - 2] : (i = e, r.push(e.children)), b.value?.uid !== i?.uid && (b.value = e, y.value = r, !t && s("expand-change", e?.pathValues || []));
|
|
397
|
+
}, oe = (e, t, n = !0) => {
|
|
398
|
+
let { checkStrictly: r, multiple: i } = d.value, a = x.value[0];
|
|
399
|
+
c = !0, !i && a?.doCheck(!1), e.doCheck(t), ue(), n && !i && !r && s("close"), !n && !i && se(e);
|
|
400
|
+
}, se = (e) => {
|
|
401
|
+
e && (e = e.parent, se(e), e && ae(e));
|
|
402
|
+
}, ce = (e) => m?.getFlattedNodes(e), E = (e) => ce(e)?.filter(({ checked: e }) => e !== !1), le = () => {
|
|
403
|
+
x.value.forEach((e) => e.doCheck(!1)), ue(), y.value = y.value.slice(0, 1), b.value = void 0, s("expand-change", []);
|
|
404
|
+
}, ue = () => {
|
|
405
|
+
let { checkStrictly: e, multiple: t } = d.value, n = x.value, r = ct(n, E(!e)), i = r.map((e) => e.valueByOption);
|
|
406
|
+
x.value = r, v.value = t ? i : i[0] ?? null;
|
|
407
|
+
}, O = (e = !1, t = !1) => {
|
|
407
408
|
let { modelValue: n } = o, { lazy: r, multiple: i, checkStrictly: a } = d.value, s = !a;
|
|
408
|
-
if (!(!h.value || c || !t &&
|
|
409
|
-
let e =
|
|
409
|
+
if (!(!h.value || c || !t && w(n, v.value))) if (r && !e) {
|
|
410
|
+
let e = T(Q(D(n))).map((e) => m?.getNodeByValue(e)).filter((e) => !!e && !e.loaded && !e.loading);
|
|
410
411
|
e.length ? e.forEach((e) => {
|
|
411
|
-
|
|
412
|
-
}) :
|
|
413
|
-
} else
|
|
414
|
-
},
|
|
415
|
-
let { checkStrictly: n } = d.value, r =
|
|
416
|
-
o ? o.pathNodes.forEach((e) =>
|
|
417
|
-
},
|
|
412
|
+
re(e, () => O(!1, t));
|
|
413
|
+
}) : O(!0, t);
|
|
414
|
+
} else de(T((i ? D(n) : [n]).map((e) => m?.getNodeByValue(e, s))), t), v.value = ie(n ?? void 0);
|
|
415
|
+
}, de = (e, t = !0) => {
|
|
416
|
+
let { checkStrictly: n } = d.value, r = x.value, i = e.filter((e) => !!e && (n || e.isLeaf)), a = m?.getSameNode(b.value), o = t && a || i[0];
|
|
417
|
+
o ? o.pathNodes.forEach((e) => ae(e, !0)) : b.value = void 0, r.forEach((e) => e.doCheck(!1)), ke(i).forEach((e) => e.doCheck(!0)), x.value = i, we(pe);
|
|
418
|
+
}, pe = () => {
|
|
418
419
|
l && _.value.forEach((e) => {
|
|
419
420
|
let t = e?.$el;
|
|
420
421
|
if (t) {
|
|
@@ -423,68 +424,68 @@ var Ze = /* @__PURE__ */ B({
|
|
|
423
424
|
let e = t.querySelectorAll(`.${u.b("node")}.${u.is("active")}`);
|
|
424
425
|
n = e[e.length - 1];
|
|
425
426
|
}
|
|
426
|
-
|
|
427
|
+
A(e, n);
|
|
427
428
|
}
|
|
428
429
|
});
|
|
429
|
-
},
|
|
430
|
+
}, he = (t) => {
|
|
430
431
|
let r = t.target, i = e(t);
|
|
431
432
|
switch (i) {
|
|
432
433
|
case n.up:
|
|
433
434
|
case n.down:
|
|
434
|
-
t.preventDefault(),
|
|
435
|
+
t.preventDefault(), me(fe(r, i === n.up ? -1 : 1, `.${u.b("node")}[tabindex="-1"]`));
|
|
435
436
|
break;
|
|
436
437
|
case n.left: {
|
|
437
438
|
t.preventDefault();
|
|
438
|
-
let e = _.value[
|
|
439
|
-
|
|
439
|
+
let e = _.value[ot(r) - 1]?.$el.querySelector(`.${u.b("node")}[aria-expanded="true"]`);
|
|
440
|
+
me(e);
|
|
440
441
|
break;
|
|
441
442
|
}
|
|
442
443
|
case n.right: {
|
|
443
444
|
t.preventDefault();
|
|
444
|
-
let e = _.value[
|
|
445
|
-
|
|
445
|
+
let e = _.value[ot(r) + 1]?.$el.querySelector(`.${u.b("node")}[tabindex="-1"]`);
|
|
446
|
+
me(e);
|
|
446
447
|
break;
|
|
447
448
|
}
|
|
448
449
|
case n.enter:
|
|
449
450
|
case n.numpadEnter:
|
|
450
|
-
|
|
451
|
+
st(r);
|
|
451
452
|
break;
|
|
452
453
|
}
|
|
453
454
|
};
|
|
454
|
-
return
|
|
455
|
+
return Oe(Xe, ke({
|
|
455
456
|
config: d,
|
|
456
|
-
expandingNode:
|
|
457
|
-
checkedNodes:
|
|
458
|
-
isHoverMenu:
|
|
457
|
+
expandingNode: b,
|
|
458
|
+
checkedNodes: x,
|
|
459
|
+
isHoverMenu: te,
|
|
459
460
|
initialLoaded: h,
|
|
460
|
-
renderLabelFn:
|
|
461
|
-
lazyLoad:
|
|
462
|
-
expandNode:
|
|
463
|
-
handleCheckChange:
|
|
461
|
+
renderLabelFn: ne,
|
|
462
|
+
lazyLoad: re,
|
|
463
|
+
expandNode: ae,
|
|
464
|
+
handleCheckChange: oe
|
|
464
465
|
})), Y(d, (e, t) => {
|
|
465
|
-
|
|
466
|
-
}, { immediate: !0 }), Y(() => o.options,
|
|
467
|
-
c = !1,
|
|
468
|
-
}, { deep: !0 }), Y(() =>
|
|
469
|
-
|
|
470
|
-
}),
|
|
466
|
+
w(e, t) || C();
|
|
467
|
+
}, { immediate: !0 }), Y(() => o.options, C, { deep: !0 }), Y(() => o.modelValue, () => {
|
|
468
|
+
c = !1, O();
|
|
469
|
+
}, { deep: !0 }), Y(() => v.value, (e) => {
|
|
470
|
+
w(e, o.modelValue) || (s(S, e), s(r, e));
|
|
471
|
+
}), Ee(() => _.value = []), De(() => !p(o.modelValue) && O()), i({
|
|
471
472
|
menuList: _,
|
|
472
|
-
menus:
|
|
473
|
-
checkedNodes:
|
|
474
|
-
handleKeyDown:
|
|
475
|
-
handleCheckChange:
|
|
476
|
-
getFlattedNodes:
|
|
477
|
-
getCheckedNodes:
|
|
478
|
-
clearCheckedNodes:
|
|
479
|
-
calculateCheckedValue:
|
|
480
|
-
scrollToExpandingNode:
|
|
473
|
+
menus: y,
|
|
474
|
+
checkedNodes: x,
|
|
475
|
+
handleKeyDown: he,
|
|
476
|
+
handleCheckChange: oe,
|
|
477
|
+
getFlattedNodes: ce,
|
|
478
|
+
getCheckedNodes: E,
|
|
479
|
+
clearCheckedNodes: le,
|
|
480
|
+
calculateCheckedValue: ue,
|
|
481
|
+
scrollToExpandingNode: pe,
|
|
481
482
|
loadLazyRootNodes: () => {
|
|
482
|
-
g.value ||
|
|
483
|
+
g.value || C();
|
|
483
484
|
}
|
|
484
|
-
}), (e, n) => (W(),
|
|
485
|
+
}), (e, n) => (W(), R("div", {
|
|
485
486
|
class: U([J(u).b("panel"), J(u).is("bordered", t.border)]),
|
|
486
|
-
onKeydown:
|
|
487
|
-
}, [(W(!0),
|
|
487
|
+
onKeydown: he
|
|
488
|
+
}, [(W(!0), R(P, null, Ae(y.value, (t, n) => (W(), I(tt, {
|
|
488
489
|
key: n,
|
|
489
490
|
ref_for: !0,
|
|
490
491
|
ref: (e) => _.value[n] = e,
|
|
@@ -495,8 +496,8 @@ var Ze = /* @__PURE__ */ B({
|
|
|
495
496
|
_: 3
|
|
496
497
|
}, 8, ["index", "nodes"]))), 128))], 34));
|
|
497
498
|
}
|
|
498
|
-
})),
|
|
499
|
-
...
|
|
499
|
+
})), ut = C({
|
|
500
|
+
...We,
|
|
500
501
|
size: _,
|
|
501
502
|
placeholder: String,
|
|
502
503
|
disabled: {
|
|
@@ -505,8 +506,8 @@ var Ze = /* @__PURE__ */ B({
|
|
|
505
506
|
},
|
|
506
507
|
clearable: Boolean,
|
|
507
508
|
clearIcon: {
|
|
508
|
-
type:
|
|
509
|
-
default:
|
|
509
|
+
type: pe,
|
|
510
|
+
default: Ve
|
|
510
511
|
},
|
|
511
512
|
filterable: Boolean,
|
|
512
513
|
filterMethod: {
|
|
@@ -538,7 +539,7 @@ var Ze = /* @__PURE__ */ B({
|
|
|
538
539
|
},
|
|
539
540
|
placement: {
|
|
540
541
|
type: m(String),
|
|
541
|
-
values:
|
|
542
|
+
values: oe,
|
|
542
543
|
default: "bottom-start"
|
|
543
544
|
},
|
|
544
545
|
fallbackPlacements: {
|
|
@@ -552,19 +553,19 @@ var Ze = /* @__PURE__ */ B({
|
|
|
552
553
|
"left"
|
|
553
554
|
]
|
|
554
555
|
},
|
|
555
|
-
popperClass:
|
|
556
|
-
popperStyle:
|
|
557
|
-
teleported:
|
|
556
|
+
popperClass: E.popperClass,
|
|
557
|
+
popperStyle: E.popperStyle,
|
|
558
|
+
teleported: E.teleported,
|
|
558
559
|
effect: {
|
|
559
560
|
type: m(String),
|
|
560
561
|
default: "light"
|
|
561
562
|
},
|
|
562
563
|
tagType: {
|
|
563
|
-
...
|
|
564
|
+
..._e.type,
|
|
564
565
|
default: "info"
|
|
565
566
|
},
|
|
566
567
|
tagEffect: {
|
|
567
|
-
...
|
|
568
|
+
..._e.effect,
|
|
568
569
|
default: "light"
|
|
569
570
|
},
|
|
570
571
|
validateEvent: {
|
|
@@ -585,21 +586,21 @@ var Ze = /* @__PURE__ */ B({
|
|
|
585
586
|
type: Boolean,
|
|
586
587
|
default: !0
|
|
587
588
|
},
|
|
588
|
-
...
|
|
589
|
-
}),
|
|
590
|
-
[
|
|
591
|
-
[r]:
|
|
589
|
+
...se
|
|
590
|
+
}), dt = (e) => !0, ft = {
|
|
591
|
+
[S]: dt,
|
|
592
|
+
[r]: dt,
|
|
592
593
|
focus: (e) => e instanceof FocusEvent,
|
|
593
594
|
blur: (e) => e instanceof FocusEvent,
|
|
594
595
|
clear: () => !0,
|
|
595
596
|
visibleChange: (e) => c(e),
|
|
596
597
|
expandChange: (e) => !!e,
|
|
597
598
|
removeTag: (e) => !!e
|
|
598
|
-
},
|
|
599
|
+
}, pt = ["placeholder"], mt = ["onClick"], ht = x(/* @__PURE__ */ V({
|
|
599
600
|
name: "ElCascader",
|
|
600
601
|
__name: "cascader",
|
|
601
|
-
props:
|
|
602
|
-
emits:
|
|
602
|
+
props: ut,
|
|
603
|
+
emits: ft,
|
|
603
604
|
setup(i, { expose: s, emit: c }) {
|
|
604
605
|
let u = { modifiers: [{
|
|
605
606
|
name: "arrowPosition",
|
|
@@ -615,51 +616,51 @@ var Ze = /* @__PURE__ */ B({
|
|
|
615
616
|
].includes(n) || t.arrow && (t.arrow.x = 35);
|
|
616
617
|
},
|
|
617
618
|
requires: ["arrow"]
|
|
618
|
-
}] }, f = i, p = c, m =
|
|
619
|
+
}] }, f = i, p = c, m = Me(), h = Ne(), _ = 0, y = 0, x = ee("cascader"), C = ee("input"), re = {
|
|
619
620
|
small: 7,
|
|
620
621
|
default: 11,
|
|
621
622
|
large: 15
|
|
622
|
-
}, { t:
|
|
623
|
+
}, { t: w } = t(), { formItem: oe } = te(), T = b(), { valueOnClear: se } = ce(f), { isComposing: E, handleComposition: D } = de({ afterComposition(e) {
|
|
623
624
|
let t = e.target?.value;
|
|
624
625
|
Et(t);
|
|
625
|
-
} }),
|
|
626
|
-
disabled:
|
|
626
|
+
} }), O = G(), pe = G(), A = G(), _e = G(), j = G(), ye = G(), M = G(!1), be = G(!1), N = G(!1), Se = G(""), V = G(""), H = G([]), Ce = G([]), Ee = F(() => f.props.multiple ? f.collapseTags ? H.value.slice(0, f.maxCollapseTags) : H.value : []), Oe = F(() => f.props.multiple && f.collapseTags ? H.value.slice(f.maxCollapseTags) : []), ke = F(() => m.style), ze = F(() => f.placeholder ?? w("el.cascader.placeholder")), Ve = F(() => V.value || H.value.length > 0 || E.value ? "" : ze.value), He = v(), Ue = F(() => He.value === "small" ? "small" : "default"), Q = F(() => !!f.props.multiple), We = F(() => !f.filterable || Q.value), Ge = F(() => Q.value ? V.value : Se.value), Ke = F(() => j.value?.checkedNodes || []), { wrapperRef: qe, isFocused: Je, handleBlur: Ye } = he(A, {
|
|
627
|
+
disabled: T,
|
|
627
628
|
beforeBlur(e) {
|
|
628
|
-
return
|
|
629
|
+
return O.value?.isFocusInsideContent(e) || pe.value?.isFocusInsideContent(e);
|
|
629
630
|
},
|
|
630
631
|
afterBlur() {
|
|
631
|
-
f.validateEvent &&
|
|
632
|
+
f.validateEvent && oe?.validate?.("blur").catch((e) => ne(e));
|
|
632
633
|
}
|
|
633
|
-
}), Xe =
|
|
634
|
+
}), Xe = F(() => !f.clearable || T.value || N.value || !be.value && !Je.value ? !1 : !!Ke.value.length), Ze = F(() => {
|
|
634
635
|
let { showAllLevels: e, separator: t } = f, n = Ke.value;
|
|
635
636
|
return n.length ? Q.value ? "" : n[0].calcText(e, t) : "";
|
|
636
|
-
}), Qe =
|
|
637
|
+
}), Qe = F(() => oe?.validateState || ""), $e = F({
|
|
637
638
|
get() {
|
|
638
|
-
return
|
|
639
|
+
return ie(f.modelValue);
|
|
639
640
|
},
|
|
640
641
|
set(e) {
|
|
641
|
-
let t = e ??
|
|
642
|
-
p(
|
|
642
|
+
let t = e ?? se.value;
|
|
643
|
+
p(S, t), p(r, t), f.validateEvent && oe?.validate("change").catch((e) => ne(e));
|
|
643
644
|
}
|
|
644
|
-
}), et =
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
645
|
+
}), et = F(() => [
|
|
646
|
+
x.b(),
|
|
647
|
+
x.m(He.value),
|
|
648
|
+
x.is("disabled", T.value),
|
|
648
649
|
m.class
|
|
649
|
-
]), tt =
|
|
650
|
-
|
|
650
|
+
]), tt = F(() => [
|
|
651
|
+
C.e("icon"),
|
|
651
652
|
"icon-arrow-down",
|
|
652
|
-
|
|
653
|
-
]), nt =
|
|
653
|
+
x.is("reverse", M.value)
|
|
654
|
+
]), nt = F(() => x.is("focus", Je.value)), rt = F(() => O.value?.popperRef?.contentRef), it = (e) => {
|
|
654
655
|
Je.value && Ye(new FocusEvent("blur", e)), $(!1);
|
|
655
656
|
}, $ = (e) => {
|
|
656
|
-
|
|
657
|
+
T.value || (e ??= !M.value, e !== M.value && (M.value = e, A.value?.input?.setAttribute("aria-expanded", `${e}`), e ? (at(), j.value && we(j.value.scrollToExpandingNode)) : f.filterable && xt(), p("visibleChange", e)));
|
|
657
658
|
}, at = () => {
|
|
658
|
-
|
|
659
|
-
|
|
659
|
+
we(() => {
|
|
660
|
+
O.value?.updatePopper();
|
|
660
661
|
});
|
|
661
662
|
}, ot = () => {
|
|
662
|
-
|
|
663
|
+
N.value = !1;
|
|
663
664
|
}, st = (e) => {
|
|
664
665
|
let { showAllLevels: t, separator: n } = f;
|
|
665
666
|
return {
|
|
@@ -667,11 +668,11 @@ var Ze = /* @__PURE__ */ B({
|
|
|
667
668
|
key: e.uid,
|
|
668
669
|
text: e.calcText(t, n),
|
|
669
670
|
hitState: !1,
|
|
670
|
-
closable: !
|
|
671
|
+
closable: !T.value && !e.isDisabled
|
|
671
672
|
};
|
|
672
|
-
},
|
|
673
|
+
}, ct = (e) => {
|
|
673
674
|
let t = e.node;
|
|
674
|
-
t.doCheck(!1),
|
|
675
|
+
t.doCheck(!1), j.value?.calculateCheckedValue(), p("removeTag", t.valueByOption);
|
|
675
676
|
}, ut = () => {
|
|
676
677
|
switch (f.showCheckedStrategy) {
|
|
677
678
|
case "child": return Ke.value;
|
|
@@ -685,62 +686,62 @@ var Ze = /* @__PURE__ */ B({
|
|
|
685
686
|
if (!Q.value) return;
|
|
686
687
|
let e = ut(), t = [];
|
|
687
688
|
e.forEach((e) => t.push(st(e))), H.value = t;
|
|
688
|
-
},
|
|
689
|
-
let { filterMethod: e, showAllLevels: t, separator: n } = f, r =
|
|
689
|
+
}, ft = () => {
|
|
690
|
+
let { filterMethod: e, showAllLevels: t, separator: n } = f, r = j.value?.getFlattedNodes(!f.props.checkStrictly)?.filter((r) => r.isDisabled ? !1 : (r.calcText(t, n), e(r, Ge.value)));
|
|
690
691
|
Q.value && H.value.forEach((e) => {
|
|
691
692
|
e.hitState = !1;
|
|
692
|
-
}),
|
|
693
|
+
}), N.value = !0, Ce.value = r, at();
|
|
693
694
|
}, ht = () => {
|
|
694
695
|
let e;
|
|
695
|
-
e =
|
|
696
|
+
e = N.value && ye.value ? ye.value.$el.querySelector(`.${x.e("suggestion-item")}`) : j.value?.$el.querySelector(`.${x.b("node")}[tabindex="-1"]`), e && (e.focus(), !N.value && e.getAttribute("aria-haspopup") === "true" && e.click());
|
|
696
697
|
}, gt = () => {
|
|
697
|
-
let e =
|
|
698
|
+
let e = A.value?.input, t = _e.value, n = ye.value?.$el;
|
|
698
699
|
if (!(!l || !e)) {
|
|
699
700
|
if (n) {
|
|
700
|
-
let t = n.querySelector(`.${
|
|
701
|
+
let t = n.querySelector(`.${x.e("suggestion-list")}`);
|
|
701
702
|
t.style.minWidth = `${e.offsetWidth}px`;
|
|
702
703
|
}
|
|
703
704
|
if (t) {
|
|
704
705
|
let { offsetHeight: n } = t, r = H.value.length > 0 ? `${Math.max(n, _) - 2}px` : `${_}px`;
|
|
705
706
|
if (e.style.height = r, h.prefix) {
|
|
706
|
-
let e =
|
|
707
|
-
e && (n = e.offsetWidth, n > 0 && (n +=
|
|
707
|
+
let e = A.value?.$el.querySelector(`.${C.e("prefix")}`), n = 0;
|
|
708
|
+
e && (n = e.offsetWidth, n > 0 && (n += re[He.value || "default"])), t.style.left = `${n}px`;
|
|
708
709
|
} else t.style.left = "0";
|
|
709
710
|
at();
|
|
710
711
|
}
|
|
711
712
|
}
|
|
712
|
-
}, _t = (e) =>
|
|
713
|
+
}, _t = (e) => j.value?.getCheckedNodes(e), vt = (e) => {
|
|
713
714
|
at(), p("expandChange", e);
|
|
714
715
|
}, yt = (t) => {
|
|
715
|
-
if (!
|
|
716
|
+
if (!E.value) switch (e(t)) {
|
|
716
717
|
case n.enter:
|
|
717
718
|
case n.numpadEnter:
|
|
718
719
|
$();
|
|
719
720
|
break;
|
|
720
721
|
case n.down:
|
|
721
|
-
$(!0),
|
|
722
|
+
$(!0), we(ht), t.preventDefault();
|
|
722
723
|
break;
|
|
723
724
|
case n.esc:
|
|
724
|
-
|
|
725
|
+
M.value === !0 && (t.preventDefault(), t.stopPropagation(), $(!1));
|
|
725
726
|
break;
|
|
726
727
|
case n.tab:
|
|
727
728
|
$(!1);
|
|
728
729
|
break;
|
|
729
730
|
}
|
|
730
731
|
}, bt = () => {
|
|
731
|
-
|
|
732
|
+
j.value?.clearCheckedNodes(), !M.value && f.filterable && xt(), $(!1), p("clear");
|
|
732
733
|
}, xt = () => {
|
|
733
734
|
let { value: e } = Ze;
|
|
734
|
-
|
|
735
|
+
Se.value = e, V.value = e;
|
|
735
736
|
}, St = (e) => {
|
|
736
737
|
let { checked: t } = e;
|
|
737
|
-
Q.value ?
|
|
738
|
+
Q.value ? j.value?.handleCheckChange(e, !t, !1) : (!t && j.value?.handleCheckChange(e, !0, !1), $(!1));
|
|
738
739
|
}, Ct = (t) => {
|
|
739
740
|
let r = t.target, i = e(t);
|
|
740
741
|
switch (i) {
|
|
741
742
|
case n.up:
|
|
742
743
|
case n.down:
|
|
743
|
-
t.preventDefault(),
|
|
744
|
+
t.preventDefault(), me(fe(r, i === n.up ? -1 : 1, `.${x.e("suggestion-item")}[tabindex="-1"]`));
|
|
744
745
|
break;
|
|
745
746
|
case n.enter:
|
|
746
747
|
case n.numpadEnter:
|
|
@@ -749,104 +750,104 @@ var Ze = /* @__PURE__ */ B({
|
|
|
749
750
|
}
|
|
750
751
|
}, wt = () => {
|
|
751
752
|
let e = H.value[H.value.length - 1];
|
|
752
|
-
|
|
753
|
+
y = V.value ? 0 : y + 1, !(!e || !y || f.collapseTags && H.value.length > 1) && (e.hitState ? ct(e) : e.hitState = !0);
|
|
753
754
|
}, Tt = g(() => {
|
|
754
755
|
let { value: e } = Ge;
|
|
755
756
|
if (!e) return;
|
|
756
757
|
let t = f.beforeFilter(e);
|
|
757
|
-
a(t) ? t.then(
|
|
758
|
-
},
|
|
759
|
-
if (!
|
|
758
|
+
a(t) ? t.then(ft).catch(() => {}) : t === !1 ? ot() : ft();
|
|
759
|
+
}, F(() => f.debounce)), Et = (e, t) => {
|
|
760
|
+
if (!M.value && $(!0), !t?.isComposing) if (e) Tt();
|
|
760
761
|
else {
|
|
761
762
|
let e = f.beforeFilter("");
|
|
762
763
|
a(e) && e.catch(() => {}), ot();
|
|
763
764
|
}
|
|
764
|
-
}, Dt = (e) => Number.parseFloat(d(
|
|
765
|
-
return Y(
|
|
765
|
+
}, Dt = (e) => Number.parseFloat(d(C.cssVarName("input-height"), e).value) - 2;
|
|
766
|
+
return Y(N, at), Y([
|
|
766
767
|
Ke,
|
|
767
|
-
|
|
768
|
+
T,
|
|
768
769
|
() => f.collapseTags,
|
|
769
770
|
() => f.maxCollapseTags
|
|
770
771
|
], dt), Y(H, () => {
|
|
771
|
-
|
|
772
|
+
we(() => gt());
|
|
772
773
|
}), Y(He, async () => {
|
|
773
|
-
await
|
|
774
|
-
let e =
|
|
774
|
+
await we();
|
|
775
|
+
let e = A.value.input;
|
|
775
776
|
_ = Dt(e) || _, gt();
|
|
776
|
-
}), Y(Ze, xt, { immediate: !0 }), Y(() =>
|
|
777
|
-
e && f.props.lazy && f.props.lazyLoad &&
|
|
778
|
-
}),
|
|
779
|
-
let e =
|
|
777
|
+
}), Y(Ze, xt, { immediate: !0 }), Y(() => M.value, (e) => {
|
|
778
|
+
e && f.props.lazy && f.props.lazyLoad && j.value?.loadLazyRootNodes();
|
|
779
|
+
}), De(() => {
|
|
780
|
+
let e = A.value.input, t = Dt(e);
|
|
780
781
|
_ = e.offsetHeight || t, o(e, gt);
|
|
781
782
|
}), s({
|
|
782
783
|
getCheckedNodes: _t,
|
|
783
|
-
cascaderPanelRef:
|
|
784
|
+
cascaderPanelRef: j,
|
|
784
785
|
togglePopperVisible: $,
|
|
785
786
|
contentRef: rt,
|
|
786
787
|
presentText: Ze,
|
|
787
788
|
focus: () => {
|
|
788
|
-
|
|
789
|
+
A.value?.focus();
|
|
789
790
|
},
|
|
790
791
|
blur: () => {
|
|
791
|
-
|
|
792
|
+
A.value?.blur();
|
|
792
793
|
}
|
|
793
|
-
}), (e, t) => (W(),
|
|
794
|
+
}), (e, t) => (W(), I(J(ae), {
|
|
794
795
|
ref_key: "tooltipRef",
|
|
795
|
-
ref:
|
|
796
|
-
visible:
|
|
796
|
+
ref: O,
|
|
797
|
+
visible: M.value,
|
|
797
798
|
teleported: i.teleported,
|
|
798
|
-
"popper-class": [J(
|
|
799
|
+
"popper-class": [J(x).e("dropdown"), i.popperClass],
|
|
799
800
|
"popper-style": i.popperStyle,
|
|
800
801
|
"popper-options": u,
|
|
801
802
|
"fallback-placements": i.fallbackPlacements,
|
|
802
803
|
"stop-popper-mouse-event": !1,
|
|
803
804
|
"gpu-acceleration": !1,
|
|
804
805
|
placement: i.placement,
|
|
805
|
-
transition: `${J(
|
|
806
|
+
transition: `${J(x).namespace.value}-zoom-in-top`,
|
|
806
807
|
effect: i.effect,
|
|
807
808
|
pure: "",
|
|
808
809
|
persistent: i.persistent,
|
|
809
810
|
onHide: ot
|
|
810
811
|
}, {
|
|
811
|
-
default: X(() => [
|
|
812
|
+
default: X(() => [Ie((W(), R("div", {
|
|
812
813
|
ref_key: "wrapperRef",
|
|
813
814
|
ref: qe,
|
|
814
815
|
class: U(et.value),
|
|
815
|
-
style:
|
|
816
|
+
style: Te(ke.value),
|
|
816
817
|
onClick: t[8] ||= () => $(We.value ? void 0 : !0),
|
|
817
818
|
onKeydown: yt,
|
|
818
|
-
onMouseenter: t[9] ||= (e) =>
|
|
819
|
-
onMouseleave: t[10] ||= (e) =>
|
|
820
|
-
}, [
|
|
819
|
+
onMouseenter: t[9] ||= (e) => be.value = !0,
|
|
820
|
+
onMouseleave: t[10] ||= (e) => be.value = !1
|
|
821
|
+
}, [B(J(ge), {
|
|
821
822
|
ref_key: "inputRef",
|
|
822
|
-
ref:
|
|
823
|
-
modelValue:
|
|
824
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
823
|
+
ref: A,
|
|
824
|
+
modelValue: Se.value,
|
|
825
|
+
"onUpdate:modelValue": t[1] ||= (e) => Se.value = e,
|
|
825
826
|
placeholder: Ve.value,
|
|
826
827
|
readonly: We.value,
|
|
827
|
-
disabled: J(
|
|
828
|
+
disabled: J(T),
|
|
828
829
|
"validate-event": !1,
|
|
829
830
|
size: J(He),
|
|
830
831
|
class: U(nt.value),
|
|
831
|
-
tabindex: Q.value && i.filterable && !J(
|
|
832
|
-
onCompositionstart: J(
|
|
833
|
-
onCompositionupdate: J(
|
|
834
|
-
onCompositionend: J(
|
|
832
|
+
tabindex: Q.value && i.filterable && !J(T) ? -1 : void 0,
|
|
833
|
+
onCompositionstart: J(D),
|
|
834
|
+
onCompositionupdate: J(D),
|
|
835
|
+
onCompositionend: J(D),
|
|
835
836
|
onInput: Et
|
|
836
|
-
},
|
|
837
|
-
suffix: X(() => [Xe.value ? (W(),
|
|
837
|
+
}, xe({
|
|
838
|
+
suffix: X(() => [Xe.value ? (W(), I(J(k), {
|
|
838
839
|
key: "clear",
|
|
839
|
-
class: U([J(
|
|
840
|
+
class: U([J(C).e("icon"), "icon-circle-close"]),
|
|
840
841
|
onClick: Z(bt, ["stop"])
|
|
841
842
|
}, {
|
|
842
|
-
default: X(() => [(W(),
|
|
843
|
+
default: X(() => [(W(), I(je(i.clearIcon)))]),
|
|
843
844
|
_: 1
|
|
844
|
-
}, 8, ["class"])) : (W(),
|
|
845
|
+
}, 8, ["class"])) : (W(), I(J(k), {
|
|
845
846
|
key: "arrow-down",
|
|
846
847
|
class: U(tt.value),
|
|
847
848
|
onClick: t[0] ||= Z((e) => $(), ["stop"])
|
|
848
849
|
}, {
|
|
849
|
-
default: X(() => [
|
|
850
|
+
default: X(() => [B(J(Re))]),
|
|
850
851
|
_: 1
|
|
851
852
|
}, 8, ["class"]))]),
|
|
852
853
|
_: 2
|
|
@@ -865,16 +866,16 @@ var Ze = /* @__PURE__ */ B({
|
|
|
865
866
|
"onCompositionstart",
|
|
866
867
|
"onCompositionupdate",
|
|
867
868
|
"onCompositionend"
|
|
868
|
-
]), Q.value ? (W(),
|
|
869
|
+
]), Q.value ? (W(), R("div", {
|
|
869
870
|
key: 0,
|
|
870
871
|
ref_key: "tagWrapper",
|
|
871
|
-
ref:
|
|
872
|
-
class: U([J(
|
|
872
|
+
ref: _e,
|
|
873
|
+
class: U([J(x).e("tags"), J(x).is("validate", !!Qe.value)])
|
|
873
874
|
}, [
|
|
874
875
|
K(e.$slots, "tag", {
|
|
875
876
|
data: H.value,
|
|
876
|
-
deleteTag:
|
|
877
|
-
}, () => [(W(!0),
|
|
877
|
+
deleteTag: ct
|
|
878
|
+
}, () => [(W(!0), R(P, null, Ae(Ee.value, (e) => (W(), I(J(ve), {
|
|
878
879
|
key: e.key,
|
|
879
880
|
type: i.tagType,
|
|
880
881
|
size: Ue.value,
|
|
@@ -882,9 +883,9 @@ var Ze = /* @__PURE__ */ B({
|
|
|
882
883
|
hit: e.hitState,
|
|
883
884
|
closable: e.closable,
|
|
884
885
|
"disable-transitions": "",
|
|
885
|
-
onClose: (t) =>
|
|
886
|
+
onClose: (t) => ct(e)
|
|
886
887
|
}, {
|
|
887
|
-
default: X(() => [
|
|
888
|
+
default: X(() => [z("span", null, q(e.text), 1)]),
|
|
888
889
|
_: 2
|
|
889
890
|
}, 1032, [
|
|
890
891
|
"type",
|
|
@@ -894,11 +895,11 @@ var Ze = /* @__PURE__ */ B({
|
|
|
894
895
|
"closable",
|
|
895
896
|
"onClose"
|
|
896
897
|
]))), 128))]),
|
|
897
|
-
i.collapseTags && H.value.length > i.maxCollapseTags ? (W(),
|
|
898
|
+
i.collapseTags && H.value.length > i.maxCollapseTags ? (W(), I(J(ae), {
|
|
898
899
|
key: 0,
|
|
899
900
|
ref_key: "tagTooltipRef",
|
|
900
|
-
ref:
|
|
901
|
-
disabled:
|
|
901
|
+
ref: pe,
|
|
902
|
+
disabled: M.value || !i.collapseTagsTooltip,
|
|
902
903
|
"fallback-placements": [
|
|
903
904
|
"bottom",
|
|
904
905
|
"top",
|
|
@@ -911,25 +912,25 @@ var Ze = /* @__PURE__ */ B({
|
|
|
911
912
|
effect: i.effect,
|
|
912
913
|
persistent: i.persistent
|
|
913
914
|
}, {
|
|
914
|
-
default: X(() => [
|
|
915
|
+
default: X(() => [B(J(ve), {
|
|
915
916
|
closable: !1,
|
|
916
917
|
size: Ue.value,
|
|
917
918
|
type: i.tagType,
|
|
918
919
|
effect: i.tagEffect,
|
|
919
920
|
"disable-transitions": ""
|
|
920
921
|
}, {
|
|
921
|
-
default: X(() => [
|
|
922
|
+
default: X(() => [z("span", { class: U(J(x).e("tags-text")) }, " + " + q(H.value.length - i.maxCollapseTags), 3)]),
|
|
922
923
|
_: 1
|
|
923
924
|
}, 8, [
|
|
924
925
|
"size",
|
|
925
926
|
"type",
|
|
926
927
|
"effect"
|
|
927
928
|
])]),
|
|
928
|
-
content: X(() => [
|
|
929
|
-
default: X(() => [
|
|
929
|
+
content: X(() => [B(J(le), { "max-height": i.maxCollapseTagsTooltipHeight }, {
|
|
930
|
+
default: X(() => [z("div", { class: U(J(x).e("collapse-tags")) }, [(W(!0), R(P, null, Ae(Oe.value, (e, t) => (W(), R("div", {
|
|
930
931
|
key: t,
|
|
931
|
-
class: U(J(
|
|
932
|
-
}, [(W(),
|
|
932
|
+
class: U(J(x).e("collapse-tag"))
|
|
933
|
+
}, [(W(), I(J(ve), {
|
|
933
934
|
key: e.key,
|
|
934
935
|
class: "in-tooltip",
|
|
935
936
|
type: i.tagType,
|
|
@@ -938,9 +939,9 @@ var Ze = /* @__PURE__ */ B({
|
|
|
938
939
|
hit: e.hitState,
|
|
939
940
|
closable: e.closable,
|
|
940
941
|
"disable-transitions": "",
|
|
941
|
-
onClose: (t) =>
|
|
942
|
+
onClose: (t) => ct(e)
|
|
942
943
|
}, {
|
|
943
|
-
default: X(() => [
|
|
944
|
+
default: X(() => [z("span", null, q(e.text), 1)]),
|
|
944
945
|
_: 2
|
|
945
946
|
}, 1032, [
|
|
946
947
|
"type",
|
|
@@ -959,34 +960,34 @@ var Ze = /* @__PURE__ */ B({
|
|
|
959
960
|
"popper-style",
|
|
960
961
|
"effect",
|
|
961
962
|
"persistent"
|
|
962
|
-
])) :
|
|
963
|
-
i.filterable && !J(
|
|
963
|
+
])) : L("v-if", !0),
|
|
964
|
+
i.filterable && !J(T) ? Ie((W(), R("input", {
|
|
964
965
|
key: 1,
|
|
965
966
|
"onUpdate:modelValue": t[2] ||= (e) => V.value = e,
|
|
966
967
|
type: "text",
|
|
967
|
-
class: U(J(
|
|
968
|
-
placeholder: Ze.value ? "" :
|
|
968
|
+
class: U(J(x).e("search-input")),
|
|
969
|
+
placeholder: Ze.value ? "" : ze.value,
|
|
969
970
|
onInput: t[3] ||= (e) => Et(V.value, e),
|
|
970
971
|
onClick: t[4] ||= Z((e) => $(!0), ["stop"]),
|
|
971
|
-
onKeydown:
|
|
972
|
-
onCompositionstart: t[5] ||= (...e) => J(
|
|
973
|
-
onCompositionupdate: t[6] ||= (...e) => J(
|
|
974
|
-
onCompositionend: t[7] ||= (...e) => J(
|
|
975
|
-
}, null, 42,
|
|
976
|
-
], 2)) :
|
|
977
|
-
J(
|
|
972
|
+
onKeydown: Le(wt, ["delete"]),
|
|
973
|
+
onCompositionstart: t[5] ||= (...e) => J(D) && J(D)(...e),
|
|
974
|
+
onCompositionupdate: t[6] ||= (...e) => J(D) && J(D)(...e),
|
|
975
|
+
onCompositionend: t[7] ||= (...e) => J(D) && J(D)(...e)
|
|
976
|
+
}, null, 42, pt)), [[Pe, V.value]]) : L("v-if", !0)
|
|
977
|
+
], 2)) : L("v-if", !0)], 38)), [[
|
|
978
|
+
J(ue),
|
|
978
979
|
it,
|
|
979
980
|
rt.value
|
|
980
981
|
]])]),
|
|
981
982
|
content: X(() => [
|
|
982
|
-
e.$slots.header ? (W(),
|
|
983
|
+
e.$slots.header ? (W(), R("div", {
|
|
983
984
|
key: 0,
|
|
984
|
-
class: U(J(
|
|
985
|
+
class: U(J(x).e("header")),
|
|
985
986
|
onClick: t[11] ||= Z(() => {}, ["stop"])
|
|
986
|
-
}, [K(e.$slots, "header")], 2)) :
|
|
987
|
-
|
|
987
|
+
}, [K(e.$slots, "header")], 2)) : L("v-if", !0),
|
|
988
|
+
Ie(B(J(lt), {
|
|
988
989
|
ref_key: "cascaderPanelRef",
|
|
989
|
-
ref:
|
|
990
|
+
ref: j,
|
|
990
991
|
modelValue: $e.value,
|
|
991
992
|
"onUpdate:modelValue": t[12] ||= (e) => $e.value = e,
|
|
992
993
|
options: i.options,
|
|
@@ -1003,32 +1004,32 @@ var Ze = /* @__PURE__ */ B({
|
|
|
1003
1004
|
"options",
|
|
1004
1005
|
"props",
|
|
1005
1006
|
"render-label"
|
|
1006
|
-
]), [[
|
|
1007
|
-
i.filterable ?
|
|
1007
|
+
]), [[Fe, !N.value]]),
|
|
1008
|
+
i.filterable ? Ie((W(), I(J(le), {
|
|
1008
1009
|
key: 1,
|
|
1009
1010
|
ref_key: "suggestionPanel",
|
|
1010
|
-
ref:
|
|
1011
|
+
ref: ye,
|
|
1011
1012
|
tag: "ul",
|
|
1012
|
-
class: U(J(
|
|
1013
|
-
"view-class": J(
|
|
1013
|
+
class: U(J(x).e("suggestion-panel")),
|
|
1014
|
+
"view-class": J(x).e("suggestion-list"),
|
|
1014
1015
|
onKeydown: Ct
|
|
1015
1016
|
}, {
|
|
1016
|
-
default: X(() => [
|
|
1017
|
+
default: X(() => [Ce.value.length ? (W(!0), R(P, { key: 0 }, Ae(Ce.value, (t) => (W(), R("li", {
|
|
1017
1018
|
key: t.uid,
|
|
1018
|
-
class: U([J(
|
|
1019
|
+
class: U([J(x).e("suggestion-item"), J(x).is("checked", t.checked)]),
|
|
1019
1020
|
tabindex: -1,
|
|
1020
1021
|
onClick: (e) => St(t)
|
|
1021
|
-
}, [K(e.$slots, "suggestion-item", { item: t }, () => [
|
|
1022
|
-
default: X(() => [
|
|
1022
|
+
}, [K(e.$slots, "suggestion-item", { item: t }, () => [z("span", null, q(t.text), 1), t.checked ? (W(), I(J(k), { key: 0 }, {
|
|
1023
|
+
default: X(() => [B(J(Be))]),
|
|
1023
1024
|
_: 1
|
|
1024
|
-
})) :
|
|
1025
|
+
})) : L("v-if", !0)])], 10, mt))), 128)) : K(e.$slots, "empty", { key: 1 }, () => [z("li", { class: U(J(x).e("empty-text")) }, q(J(w)("el.cascader.noMatch")), 3)])]),
|
|
1025
1026
|
_: 3
|
|
1026
|
-
}, 8, ["class", "view-class"])), [[
|
|
1027
|
-
e.$slots.footer ? (W(),
|
|
1027
|
+
}, 8, ["class", "view-class"])), [[Fe, N.value]]) : L("v-if", !0),
|
|
1028
|
+
e.$slots.footer ? (W(), R("div", {
|
|
1028
1029
|
key: 2,
|
|
1029
|
-
class: U(J(
|
|
1030
|
+
class: U(J(x).e("footer")),
|
|
1030
1031
|
onClick: t[14] ||= Z(() => {}, ["stop"])
|
|
1031
|
-
}, [K(e.$slots, "footer")], 2)) :
|
|
1032
|
+
}, [K(e.$slots, "footer")], 2)) : L("v-if", !0)
|
|
1032
1033
|
]),
|
|
1033
1034
|
_: 3
|
|
1034
1035
|
}, 8, [
|
|
@@ -1043,7 +1044,7 @@ var Ze = /* @__PURE__ */ B({
|
|
|
1043
1044
|
"persistent"
|
|
1044
1045
|
]));
|
|
1045
1046
|
}
|
|
1046
|
-
})),
|
|
1047
|
+
})), gt = /* @__PURE__ */ V({
|
|
1047
1048
|
__name: "Cascader",
|
|
1048
1049
|
props: {
|
|
1049
1050
|
item: {
|
|
@@ -1068,7 +1069,10 @@ var Ze = /* @__PURE__ */ B({
|
|
|
1068
1069
|
}
|
|
1069
1070
|
},
|
|
1070
1071
|
setup(e, { expose: t }) {
|
|
1071
|
-
let n = e, r =
|
|
1072
|
+
let n = e, r = F(() => n.item.cascaderConfig), i = F(() => {
|
|
1073
|
+
let e = M(n.item.dict, n.item.label);
|
|
1074
|
+
return r.value?.options || e && n.dictMap[e] || void 0;
|
|
1075
|
+
}), a = F(() => r.value?.props || n.globalConfig.finalDictProps), o = (e) => {
|
|
1072
1076
|
if (Object.hasOwn(r.value, "onChange") && typeof r.value?.onChange == "function") {
|
|
1073
1077
|
let t = i.value?.find((t) => t[r.value?.props?.value || n.globalConfig.finalDictProps.value] === e);
|
|
1074
1078
|
r.value.onChange({
|
|
@@ -1080,17 +1084,17 @@ var Ze = /* @__PURE__ */ B({
|
|
|
1080
1084
|
}
|
|
1081
1085
|
}, s = G(null);
|
|
1082
1086
|
return t({ cascaderRef: s }), (t, n) => {
|
|
1083
|
-
let c =
|
|
1084
|
-
return r.value.useRender ? (W(),
|
|
1087
|
+
let c = be, l = ht;
|
|
1088
|
+
return r.value.useRender ? (W(), I(c, {
|
|
1085
1089
|
key: 0,
|
|
1086
1090
|
content: e.formModel[e.item.prop],
|
|
1087
1091
|
class: U(typeof r.value.useRender == "object" && r.value.useRender.class),
|
|
1088
|
-
style:
|
|
1092
|
+
style: Te(typeof r.value.useRender == "object" && r.value.useRender.style)
|
|
1089
1093
|
}, null, 8, [
|
|
1090
1094
|
"content",
|
|
1091
1095
|
"class",
|
|
1092
1096
|
"style"
|
|
1093
|
-
])) : (W(),
|
|
1097
|
+
])) : (W(), I(l, {
|
|
1094
1098
|
key: 1,
|
|
1095
1099
|
ref_key: "cascaderRef",
|
|
1096
1100
|
ref: s,
|
|
@@ -1100,7 +1104,7 @@ var Ze = /* @__PURE__ */ B({
|
|
|
1100
1104
|
props: a.value,
|
|
1101
1105
|
clearable: r.value.clearable ?? !0,
|
|
1102
1106
|
disabled: r.value.disabled || !1,
|
|
1103
|
-
style:
|
|
1107
|
+
style: Te({ width: r.value.width ?? e.formItemWidth }),
|
|
1104
1108
|
onChange: o
|
|
1105
1109
|
}, null, 8, [
|
|
1106
1110
|
"modelValue",
|
|
@@ -1114,4 +1118,4 @@ var Ze = /* @__PURE__ */ B({
|
|
|
1114
1118
|
}
|
|
1115
1119
|
});
|
|
1116
1120
|
//#endregion
|
|
1117
|
-
export {
|
|
1121
|
+
export { gt as default };
|