wyfe-ivue 2.18.0 → 2.19.0
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-CCRS8Kyz.js +1116 -0
- package/dist/DatePicker-DD4zKCPD.js +71 -0
- package/dist/Input-BXdbjYzG.js +86 -0
- package/dist/InputNumber-B-S2_0PK.js +323 -0
- package/dist/InputRange-mMn3FVrC.js +66 -0
- package/dist/Radio-cLUGGSkE.js +72 -0
- package/dist/Select-DNsX_eNI.js +80 -0
- package/dist/Switch-DqjnHZrl.js +50 -0
- package/dist/TimePicker-LvIgMwBM.js +309 -0
- package/dist/TimeSelect-C1tJCmCv.js +264 -0
- package/dist/TreeSelect-DlimRS27.js +1489 -0
- package/dist/UseElDatePicker-DegS4HTj.js +3348 -0
- package/dist/UseElInput-iay6-AIo.js +136 -0
- package/dist/UseElSelect-BN1OHM4g.js +1917 -0
- package/dist/UseRender-BxTiEIkV.js +41 -0
- package/dist/_baseFindIndex-DqVicKsf.js +7 -0
- package/dist/_plugin-vue_export-helper-ok8pgSl5.js +8 -0
- package/dist/click-outside-ClCgizAw.js +40 -0
- package/dist/cloneDeep-DB_eY5qs.js +8 -0
- package/dist/collapse-transition-DIjnwQfq.js +46 -0
- package/dist/css-BBke53f4.js +1073 -0
- package/dist/css-BWZjRRQp.js +1364 -0
- package/dist/css-BYB-BCGt.js +417 -0
- package/dist/css-CkxDJNT4.js +262 -0
- package/dist/css-CmOvJ8zm.js +152 -0
- package/dist/css-DqAY2QPD.js +2495 -0
- package/dist/icon-D7AElRSo.js +497 -0
- package/dist/index.es.js +6150 -22172
- package/dist/index.umd.cjs +24 -11
- package/dist/input-uamGsjJl.js +560 -0
- package/dist/isArrayLikeObject-CSEXb5SE.js +13 -0
- package/dist/isEqual-DlejxoSx.js +317 -0
- package/dist/panel-time-pick-DAIe-bqD.js +1055 -0
- package/dist/repeat-click-BcdMj1cu.js +25 -0
- package/dist/toNumber-DUck94Zb.js +30 -0
- package/dist/types/UseElCheckbox/index.vue.d.ts +2 -2
- package/dist/types/UseElCheckbox/props.d.ts +1 -1
- package/dist/types/UseElConfigProvider/defaultConfig.d.ts +15 -0
- package/dist/types/UseElConfigProvider/index.vue.d.ts +28 -34
- package/dist/types/UseElConfigProvider/props.d.ts +17 -20
- package/dist/types/UseElDatePicker/index.vue.d.ts +36 -0
- package/dist/types/UseElDatePicker/props.d.ts +17 -0
- package/dist/types/UseElDescriptions/index.vue.d.ts +3 -2
- package/dist/types/UseElDescriptions/props.d.ts +2 -2
- package/dist/types/UseElDescriptions/types.d.ts +4 -2
- package/dist/types/UseElForm/components/InlineForm.vue.d.ts +121 -10
- package/dist/types/UseElForm/components/RowForm.vue.d.ts +122 -8
- package/dist/types/UseElForm/components/controls/Cascader.vue.d.ts +52 -0
- package/dist/types/UseElForm/components/controls/DatePicker.vue.d.ts +39 -0
- package/dist/types/UseElForm/components/controls/Input.vue.d.ts +39 -0
- package/dist/types/UseElForm/components/controls/InputNumber.vue.d.ts +31 -0
- package/dist/types/UseElForm/components/controls/InputRange.vue.d.ts +39 -0
- package/dist/types/UseElForm/components/controls/Radio.vue.d.ts +40 -0
- package/dist/types/UseElForm/components/controls/Select.vue.d.ts +48 -0
- package/dist/types/UseElForm/components/controls/Switch.vue.d.ts +22 -0
- package/dist/types/UseElForm/components/controls/TimePicker.vue.d.ts +31 -0
- package/dist/types/UseElForm/components/controls/TimeSelect.vue.d.ts +31 -0
- package/dist/types/UseElForm/components/controls/TreeSelect.vue.d.ts +48 -0
- package/dist/types/UseElForm/index.vue.d.ts +296 -70
- package/dist/types/UseElForm/props.d.ts +3 -3
- package/dist/types/UseElForm/types.d.ts +31 -13
- package/dist/types/UseElForm/useFormHook.d.ts +1 -42
- package/dist/types/UseElInput/index.vue.d.ts +14 -4
- package/dist/types/UseElInput/props.d.ts +7 -1
- package/dist/types/UseElSelect/index.vue.d.ts +23 -5
- package/dist/types/UseElSelect/props.d.ts +11 -2
- package/dist/types/UseElSelect/useSelectHook.d.ts +3 -3
- package/dist/types/UseElSwitch/index.vue.d.ts +4 -4
- package/dist/types/UseElSwitch/props.d.ts +2 -2
- package/dist/types/UseElTable/components/RecTableColumn.vue.d.ts +1 -1
- package/dist/types/UseElTable/hooks/useTableHook.d.ts +20 -4
- package/dist/types/UseElTable/index.vue.d.ts +9 -9
- package/dist/types/UseElTable/props.d.ts +2 -2
- package/dist/types/UseElTable/types.d.ts +4 -3
- package/dist/types/UseElTable/utils.d.ts +3 -2
- package/dist/types/UseElUpload/index.vue.d.ts +9 -9
- package/dist/types/UseElUpload/types.d.ts +9 -0
- package/dist/types/UseRender/props.d.ts +1 -1
- package/dist/types/UseSvgIcon/index.vue.d.ts +2 -2
- package/dist/types/UseSvgIcon/props.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/typescript-BtQFnmmg.js +4 -0
- package/dist/use-deprecated-Dvts2M4Q.js +278 -0
- package/dist/use-locale-GUv3JBF0.js +225 -0
- package/dist/useLog-Da3tUars.js +49 -0
- package/dist/wyfe-ivue.css +1 -1
- package/package.json +3 -3
- package/src/components/UseElConfigProvider/props.ts +25 -31
- package/src/components/UseElDatePicker/props.ts +29 -0
- package/src/components/UseElDescriptions/props.ts +2 -2
- package/src/components/UseElDescriptions/types.ts +7 -2
- package/src/components/UseElForm/props.ts +5 -4
- package/src/components/UseElForm/types.ts +48 -23
- package/src/components/UseElInput/props.ts +12 -2
- package/src/components/UseElSelect/props.ts +16 -1
- package/src/components/UseElTable/props.ts +3 -3
- package/src/components/UseElTable/types.ts +5 -3
- package/src/components/UseElUpload/types.ts +17 -0
- package/src/components/UseRender/props.ts +2 -2
- package/src/types/dict.ts +50 -0
- package/src/types/index.ts +46 -25
|
@@ -0,0 +1,1116 @@
|
|
|
1
|
+
import { $t as e, A as t, At as n, Bt as r, Dt as i, E as a, Gt as o, H as s, It as c, M as l, O as u, S as d, Tt as f, Yt as p, _ as ee, f as m, i as h, p as g, r as _, s as v, t as y, tn as te, v as ne, x as b, xt as x } from "./css-BBke53f4.js";
|
|
2
|
+
import { a as re, n as ie, s as S } from "./use-locale-GUv3JBF0.js";
|
|
3
|
+
import { t as C } from "./isEqual-DlejxoSx.js";
|
|
4
|
+
import { t as ae } from "./cloneDeep-DB_eY5qs.js";
|
|
5
|
+
import { a as oe, b as se, f as w, g as ce, h as le, o as T, t as ue, u as E } from "./css-DqAY2QPD.js";
|
|
6
|
+
import { t as de } from "./click-outside-ClCgizAw.js";
|
|
7
|
+
import { C as D, F as fe, K as pe, P as me, U as he, W as ge, a as _e, d as ve, i as O, p as ye, s as k, t as A } from "./icon-D7AElRSo.js";
|
|
8
|
+
import { t as be } from "./input-uamGsjJl.js";
|
|
9
|
+
import { a as xe, n as j, t as Se } from "./css-CmOvJ8zm.js";
|
|
10
|
+
import { t as Ce } from "./css-BYB-BCGt.js";
|
|
11
|
+
import { t as M } from "./css-CkxDJNT4.js";
|
|
12
|
+
import { t as we } from "./UseRender-BxTiEIkV.js";
|
|
13
|
+
import "./index.es.js";
|
|
14
|
+
import { Comment as N, Fragment as P, computed as F, createBlock as I, createCommentVNode as L, createElementBlock as R, createElementVNode as z, createSlots as Te, createTextVNode as B, createVNode as V, defineComponent as H, getCurrentInstance as Ee, inject as De, nextTick as Oe, normalizeClass as U, normalizeStyle as ke, onBeforeUpdate as Ae, onMounted as je, openBlock as W, provide as Me, reactive as Ne, ref as G, renderList as Pe, renderSlot as K, resolveDynamicComponent as Fe, toDisplayString as q, unref as J, useAttrs as Ie, useSlots as Le, vModelText as Re, vShow as ze, watch as Y, withCtx as X, withDirectives as Be, withKeys as Ve, withModifiers as Z } from "vue";
|
|
15
|
+
//#region node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flattenDeep.js
|
|
16
|
+
var He = Infinity;
|
|
17
|
+
function Ue(e) {
|
|
18
|
+
return e != null && e.length ? s(e, He) : [];
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_ec03ac4af1881a498740109f524cb771/node_modules/element-plus/es/components/cascader-panel/src/config.mjs
|
|
22
|
+
var Q = b({
|
|
23
|
+
modelValue: { type: d([
|
|
24
|
+
Number,
|
|
25
|
+
String,
|
|
26
|
+
Array,
|
|
27
|
+
Object
|
|
28
|
+
]) },
|
|
29
|
+
options: {
|
|
30
|
+
type: d(Array),
|
|
31
|
+
default: () => []
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
type: d(Object),
|
|
35
|
+
default: () => ({})
|
|
36
|
+
}
|
|
37
|
+
}), We = {
|
|
38
|
+
expandTrigger: "click",
|
|
39
|
+
multiple: !1,
|
|
40
|
+
checkStrictly: !1,
|
|
41
|
+
emitPath: !0,
|
|
42
|
+
lazy: !1,
|
|
43
|
+
lazyLoad: x,
|
|
44
|
+
value: "value",
|
|
45
|
+
label: "label",
|
|
46
|
+
children: "children",
|
|
47
|
+
leaf: "leaf",
|
|
48
|
+
disabled: "disabled",
|
|
49
|
+
hoverThreshold: 500,
|
|
50
|
+
checkOnClickNode: !1,
|
|
51
|
+
checkOnClickLeaf: !0,
|
|
52
|
+
showPrefix: !0
|
|
53
|
+
}, Ge = b({
|
|
54
|
+
...Q,
|
|
55
|
+
border: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: !0
|
|
58
|
+
},
|
|
59
|
+
renderLabel: { type: Function }
|
|
60
|
+
}), Ke = (e) => !0, qe = {
|
|
61
|
+
[te]: Ke,
|
|
62
|
+
[e]: Ke,
|
|
63
|
+
close: () => !0,
|
|
64
|
+
"expand-change": (e) => e
|
|
65
|
+
}, Je = (e) => F(() => ({
|
|
66
|
+
...We,
|
|
67
|
+
...e.props
|
|
68
|
+
})), Ye = Symbol();
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_ec03ac4af1881a498740109f524cb771/node_modules/element-plus/es/components/cascader-panel/src/node-content.mjs
|
|
71
|
+
function Xe(e) {
|
|
72
|
+
return !!(f(e) ? e.every(({ type: e }) => e === N) : e?.type === N);
|
|
73
|
+
}
|
|
74
|
+
var Ze = /* @__PURE__ */ H({
|
|
75
|
+
name: "NodeContent",
|
|
76
|
+
props: { node: {
|
|
77
|
+
type: Object,
|
|
78
|
+
required: !0
|
|
79
|
+
} },
|
|
80
|
+
setup(e) {
|
|
81
|
+
let t = ee("cascader-node"), { renderLabelFn: n } = De(Ye), { node: r } = e, { data: i, label: a } = r, o = () => {
|
|
82
|
+
let e = n?.({
|
|
83
|
+
node: r,
|
|
84
|
+
data: i
|
|
85
|
+
});
|
|
86
|
+
return Xe(e) ? a : e ?? a;
|
|
87
|
+
};
|
|
88
|
+
return () => V("span", { class: t.e("label") }, [o()]);
|
|
89
|
+
}
|
|
90
|
+
}), Qe = [
|
|
91
|
+
"id",
|
|
92
|
+
"aria-haspopup",
|
|
93
|
+
"aria-owns",
|
|
94
|
+
"aria-expanded",
|
|
95
|
+
"tabindex"
|
|
96
|
+
], $e = /* @__PURE__ */ H({
|
|
97
|
+
name: "ElCascaderNode",
|
|
98
|
+
__name: "node",
|
|
99
|
+
props: {
|
|
100
|
+
node: {
|
|
101
|
+
type: Object,
|
|
102
|
+
required: !0
|
|
103
|
+
},
|
|
104
|
+
menuId: String
|
|
105
|
+
},
|
|
106
|
+
emits: ["expand"],
|
|
107
|
+
setup(e, { emit: t }) {
|
|
108
|
+
let n = e, r = t, i = De(Ye), 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) => {
|
|
109
|
+
let { level: t, uid: r } = n.node;
|
|
110
|
+
return e?.pathNodes[t - 1]?.uid === r;
|
|
111
|
+
}, _ = () => {
|
|
112
|
+
m.value || i.expandNode(n.node);
|
|
113
|
+
}, v = (e) => {
|
|
114
|
+
let { node: t } = n;
|
|
115
|
+
e !== t.checked && i.handleCheckChange(t, e);
|
|
116
|
+
}, y = () => {
|
|
117
|
+
i.lazyLoad(n.node, () => {
|
|
118
|
+
f.value || _();
|
|
119
|
+
});
|
|
120
|
+
}, te = (e) => {
|
|
121
|
+
o.value && (ne(), !f.value && r("expand", e));
|
|
122
|
+
}, ne = () => {
|
|
123
|
+
let { node: e } = n;
|
|
124
|
+
!p.value || e.loading || (e.loaded ? _() : y());
|
|
125
|
+
}, b = () => {
|
|
126
|
+
f.value && !d.value && !c.value && !s.value ? re(!0) : (i.config.checkOnClickNode && (s.value || c.value) || f.value && i.config.checkOnClickLeaf) && !d.value ? x(!n.node.checked) : o.value || ne();
|
|
127
|
+
}, x = (e) => {
|
|
128
|
+
c.value ? (v(e), n.node.loaded && _()) : re(e);
|
|
129
|
+
}, re = (e) => {
|
|
130
|
+
n.node.loaded ? (v(e), !c.value && _()) : y();
|
|
131
|
+
};
|
|
132
|
+
return (t, n) => (W(), R("li", {
|
|
133
|
+
id: `${e.menuId}-${e.node.uid}`,
|
|
134
|
+
role: "menuitem",
|
|
135
|
+
"aria-haspopup": !f.value,
|
|
136
|
+
"aria-owns": f.value ? void 0 : e.menuId,
|
|
137
|
+
"aria-expanded": m.value,
|
|
138
|
+
tabindex: p.value ? -1 : void 0,
|
|
139
|
+
class: U([
|
|
140
|
+
J(a).b(),
|
|
141
|
+
J(a).is("selectable", c.value),
|
|
142
|
+
J(a).is("active", e.node.checked),
|
|
143
|
+
J(a).is("disabled", !p.value),
|
|
144
|
+
m.value && "in-active-path",
|
|
145
|
+
h.value && "in-checked-path"
|
|
146
|
+
]),
|
|
147
|
+
onMouseenter: te,
|
|
148
|
+
onFocus: te,
|
|
149
|
+
onClick: b
|
|
150
|
+
}, [
|
|
151
|
+
L(" prefix "),
|
|
152
|
+
s.value && l.value ? (W(), I(J(Ce), {
|
|
153
|
+
key: 0,
|
|
154
|
+
"model-value": e.node.checked,
|
|
155
|
+
indeterminate: e.node.indeterminate,
|
|
156
|
+
disabled: d.value,
|
|
157
|
+
onClick: n[0] ||= Z(() => {}, ["stop"]),
|
|
158
|
+
"onUpdate:modelValue": x
|
|
159
|
+
}, null, 8, [
|
|
160
|
+
"model-value",
|
|
161
|
+
"indeterminate",
|
|
162
|
+
"disabled"
|
|
163
|
+
])) : c.value && l.value ? (W(), I(J(M), {
|
|
164
|
+
key: 1,
|
|
165
|
+
"model-value": u.value,
|
|
166
|
+
label: e.node.uid,
|
|
167
|
+
disabled: d.value,
|
|
168
|
+
"onUpdate:modelValue": x,
|
|
169
|
+
onClick: n[1] ||= Z(() => {}, ["stop"])
|
|
170
|
+
}, {
|
|
171
|
+
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)]),
|
|
172
|
+
_: 1
|
|
173
|
+
}, 8, [
|
|
174
|
+
"model-value",
|
|
175
|
+
"label",
|
|
176
|
+
"disabled"
|
|
177
|
+
])) : f.value && e.node.checked ? (W(), I(J(A), {
|
|
178
|
+
key: 2,
|
|
179
|
+
class: U(J(a).e("prefix"))
|
|
180
|
+
}, {
|
|
181
|
+
default: X(() => [V(J(ve))]),
|
|
182
|
+
_: 1
|
|
183
|
+
}, 8, ["class"])) : L("v-if", !0),
|
|
184
|
+
L(" content "),
|
|
185
|
+
V(J(Ze), { node: e.node }, null, 8, ["node"]),
|
|
186
|
+
L(" postfix "),
|
|
187
|
+
f.value ? L("v-if", !0) : (W(), R(P, { key: 3 }, [e.node.loading ? (W(), I(J(A), {
|
|
188
|
+
key: 0,
|
|
189
|
+
class: U([J(a).is("loading"), J(a).e("postfix")])
|
|
190
|
+
}, {
|
|
191
|
+
default: X(() => [V(J(D))]),
|
|
192
|
+
_: 1
|
|
193
|
+
}, 8, ["class"])) : (W(), I(J(A), {
|
|
194
|
+
key: 1,
|
|
195
|
+
class: U(["arrow-right", J(a).e("postfix")])
|
|
196
|
+
}, {
|
|
197
|
+
default: X(() => [V(J(k))]),
|
|
198
|
+
_: 1
|
|
199
|
+
}, 8, ["class"]))], 64))
|
|
200
|
+
], 42, Qe));
|
|
201
|
+
}
|
|
202
|
+
}), et = /* @__PURE__ */ H({
|
|
203
|
+
name: "ElCascaderMenu",
|
|
204
|
+
__name: "menu",
|
|
205
|
+
props: {
|
|
206
|
+
nodes: {
|
|
207
|
+
type: Array,
|
|
208
|
+
required: !0
|
|
209
|
+
},
|
|
210
|
+
index: {
|
|
211
|
+
type: Number,
|
|
212
|
+
required: !0
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
setup(e) {
|
|
216
|
+
let t = e, n = Ee(), r = ee("cascader-menu"), { t: i } = ie(), a = g(), o, s, c = De(Ye), l = G(), u = F(() => !t.nodes.length), d = F(() => !c.initialLoaded), f = F(() => `${a.value}-${t.index}`), p = (e) => {
|
|
217
|
+
o = e.target;
|
|
218
|
+
}, m = (e) => {
|
|
219
|
+
if (!(!c.isHoverMenu || !o || !l.value)) if (o.contains(e.target)) {
|
|
220
|
+
h();
|
|
221
|
+
let t = n.vnode.el, { left: i } = t.getBoundingClientRect(), { offsetWidth: a, offsetHeight: s } = t, c = e.clientX - i, u = o.offsetTop, d = u + o.offsetHeight, f = t.querySelector(`.${r.e("wrap")}`)?.scrollTop || 0;
|
|
222
|
+
l.value.innerHTML = `
|
|
223
|
+
<path style="pointer-events: auto;" fill="transparent" d="M${c} ${u} L${a} ${f} V${u} Z" />
|
|
224
|
+
<path style="pointer-events: auto;" fill="transparent" d="M${c} ${d} L${a} ${s + f} V${d} Z" />
|
|
225
|
+
`;
|
|
226
|
+
} else s ||= window.setTimeout(_, c.config.hoverThreshold);
|
|
227
|
+
}, h = () => {
|
|
228
|
+
s &&= (clearTimeout(s), void 0);
|
|
229
|
+
}, _ = () => {
|
|
230
|
+
l.value && (l.value.innerHTML = "", h());
|
|
231
|
+
};
|
|
232
|
+
return (t, n) => (W(), I(J(ue), {
|
|
233
|
+
key: f.value,
|
|
234
|
+
tag: "ul",
|
|
235
|
+
role: "menu",
|
|
236
|
+
class: U(J(r).b()),
|
|
237
|
+
"wrap-class": J(r).e("wrap"),
|
|
238
|
+
"view-class": [J(r).e("list"), J(r).is("empty", u.value)],
|
|
239
|
+
onMousemove: m,
|
|
240
|
+
onMouseleave: _
|
|
241
|
+
}, {
|
|
242
|
+
default: X(() => [
|
|
243
|
+
(W(!0), R(P, null, Pe(e.nodes, (e) => (W(), I($e, {
|
|
244
|
+
key: e.uid,
|
|
245
|
+
node: e,
|
|
246
|
+
"menu-id": f.value,
|
|
247
|
+
onExpand: p
|
|
248
|
+
}, null, 8, ["node", "menu-id"]))), 128)),
|
|
249
|
+
d.value ? (W(), R("div", {
|
|
250
|
+
key: 0,
|
|
251
|
+
class: U(J(r).e("empty-text"))
|
|
252
|
+
}, [V(J(A), {
|
|
253
|
+
size: "14",
|
|
254
|
+
class: U(J(r).is("loading"))
|
|
255
|
+
}, {
|
|
256
|
+
default: X(() => [V(J(D))]),
|
|
257
|
+
_: 1
|
|
258
|
+
}, 8, ["class"]), B(" " + q(J(i)("el.cascader.loading")), 1)], 2)) : u.value ? (W(), R("div", {
|
|
259
|
+
key: 1,
|
|
260
|
+
class: U(J(r).e("empty-text"))
|
|
261
|
+
}, [K(t.$slots, "empty", {}, () => [B(q(J(i)("el.cascader.noData")), 1)])], 2)) : J(c)?.isHoverMenu ? (W(), R(P, { key: 2 }, [L(" eslint-disable vue/html-self-closing "), (W(), R("svg", {
|
|
262
|
+
ref_key: "hoverZone",
|
|
263
|
+
ref: l,
|
|
264
|
+
class: U(J(r).e("hover-zone"))
|
|
265
|
+
}, null, 2))], 2112)) : L("v-if", !0),
|
|
266
|
+
L(" eslint-enable vue/html-self-closing ")
|
|
267
|
+
]),
|
|
268
|
+
_: 3
|
|
269
|
+
}, 8, [
|
|
270
|
+
"class",
|
|
271
|
+
"wrap-class",
|
|
272
|
+
"view-class"
|
|
273
|
+
]));
|
|
274
|
+
}
|
|
275
|
+
}), tt = 0, nt = (e) => {
|
|
276
|
+
let t = [e], { parent: n } = e;
|
|
277
|
+
for (; n;) t.unshift(n), n = n.parent;
|
|
278
|
+
return t;
|
|
279
|
+
}, rt = class e {
|
|
280
|
+
constructor(t, n, r, i = !1) {
|
|
281
|
+
this.data = t, this.config = n, this.parent = r, this.root = i, this.uid = tt++, this.checked = !1, this.indeterminate = !1, this.loading = !1;
|
|
282
|
+
let { value: a, label: o, children: s } = n, c = t[s], l = nt(this);
|
|
283
|
+
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 || !u(c), this.text = "";
|
|
284
|
+
}
|
|
285
|
+
get isDisabled() {
|
|
286
|
+
let { data: e, parent: t, config: n } = this, { disabled: r, checkStrictly: a } = n;
|
|
287
|
+
return (i(r) ? r(e, this) : !!e[r]) || !a && !!t?.isDisabled;
|
|
288
|
+
}
|
|
289
|
+
get isLeaf() {
|
|
290
|
+
let { data: e, config: t, childrenData: n, loaded: r } = this, { lazy: a, leaf: o } = t, s = i(o) ? o(e, this) : e[o];
|
|
291
|
+
return l(s) ? a && !r ? !1 : !(f(n) && n.length) : !!s;
|
|
292
|
+
}
|
|
293
|
+
get valueByOption() {
|
|
294
|
+
return this.config.emitPath ? this.pathValues : this.value;
|
|
295
|
+
}
|
|
296
|
+
appendChild(t) {
|
|
297
|
+
let { childrenData: n, children: r } = this, i = new e(t, this.config, this);
|
|
298
|
+
return f(n) ? n.push(t) : this.childrenData = [t], r.push(i), i;
|
|
299
|
+
}
|
|
300
|
+
calcText(e, t) {
|
|
301
|
+
let n = e ? this.pathLabels.join(t) : this.label;
|
|
302
|
+
return this.text = n, n;
|
|
303
|
+
}
|
|
304
|
+
broadcast(e) {
|
|
305
|
+
this.children.forEach((t) => {
|
|
306
|
+
t && (t.broadcast(e), t.onParentCheck?.(e));
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
emit() {
|
|
310
|
+
let { parent: e } = this;
|
|
311
|
+
e && (e.onChildCheck?.(), e.emit());
|
|
312
|
+
}
|
|
313
|
+
onParentCheck(e) {
|
|
314
|
+
this.isDisabled || this.setCheckState(e);
|
|
315
|
+
}
|
|
316
|
+
onChildCheck() {
|
|
317
|
+
let { children: e } = this, t = e.filter((e) => !e.isDisabled), n = t.length ? t.every((e) => e.checked) : !1;
|
|
318
|
+
this.setCheckState(n);
|
|
319
|
+
}
|
|
320
|
+
setCheckState(e) {
|
|
321
|
+
let t = this.children.length, n = this.children.reduce((e, t) => e + (t.checked ? 1 : t.indeterminate ? .5 : 0), 0);
|
|
322
|
+
this.checked = this.loaded && this.children.filter((e) => !e.isDisabled).every((e) => e.loaded && e.checked) && e, this.indeterminate = this.loaded && n !== t && n > 0;
|
|
323
|
+
}
|
|
324
|
+
doCheck(e) {
|
|
325
|
+
if (this.checked === e) return;
|
|
326
|
+
let { checkStrictly: t, multiple: n } = this.config;
|
|
327
|
+
t || !n ? this.checked = e : (this.broadcast(e), this.setCheckState(e), this.emit());
|
|
328
|
+
}
|
|
329
|
+
}, it = (e, t) => e.reduce((e, n) => (n.isLeaf ? e.push(n) : (!t && e.push(n), e = e.concat(it(n.children, t))), e), []), $ = class {
|
|
330
|
+
constructor(e, t) {
|
|
331
|
+
this.config = t;
|
|
332
|
+
let n = (e || []).map((e) => new rt(e, this.config));
|
|
333
|
+
this.nodes = n, this.allNodes = it(n, !1), this.leafNodes = it(n, !0);
|
|
334
|
+
}
|
|
335
|
+
getNodes() {
|
|
336
|
+
return this.nodes;
|
|
337
|
+
}
|
|
338
|
+
getFlattedNodes(e) {
|
|
339
|
+
return e ? this.leafNodes : this.allNodes;
|
|
340
|
+
}
|
|
341
|
+
appendNode(e, t) {
|
|
342
|
+
let n = t ? t.appendChild(e) : new rt(e, this.config);
|
|
343
|
+
t || this.nodes.push(n), this.appendAllNodesAndLeafNodes(n);
|
|
344
|
+
}
|
|
345
|
+
appendNodes(e, t) {
|
|
346
|
+
e.length > 0 ? e.forEach((e) => this.appendNode(e, t)) : t && t.isLeaf && this.leafNodes.push(t);
|
|
347
|
+
}
|
|
348
|
+
appendAllNodesAndLeafNodes(e) {
|
|
349
|
+
this.allNodes.push(e), e.isLeaf && this.leafNodes.push(e), e.children && e.children.forEach((e) => {
|
|
350
|
+
this.appendAllNodesAndLeafNodes(e);
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
getNodeByValue(e, n = !1) {
|
|
354
|
+
return t(e) ? null : this.getFlattedNodes(n).find((t) => C(t.value, e) || C(t.pathValues, e)) || null;
|
|
355
|
+
}
|
|
356
|
+
getSameNode(e) {
|
|
357
|
+
return e && this.getFlattedNodes(!1).find(({ value: t, level: n }) => C(e.value, t) && e.level === n) || null;
|
|
358
|
+
}
|
|
359
|
+
}, at = (e) => {
|
|
360
|
+
if (!e) return 0;
|
|
361
|
+
let t = e.id.split("-");
|
|
362
|
+
return Number(t[t.length - 2]);
|
|
363
|
+
}, ot = (e) => {
|
|
364
|
+
if (!e) return;
|
|
365
|
+
let t = e.querySelector("input");
|
|
366
|
+
t ? t.click() : pe(e) && e.click();
|
|
367
|
+
}, st = (e, t) => {
|
|
368
|
+
let n = t.slice(0), r = n.map((e) => e.uid), i = e.reduce((e, t) => {
|
|
369
|
+
let i = r.indexOf(t.uid);
|
|
370
|
+
return i > -1 && (e.push(t), n.splice(i, 1), r.splice(i, 1)), e;
|
|
371
|
+
}, []);
|
|
372
|
+
return i.push(...n), i;
|
|
373
|
+
}, ct = v(/* @__PURE__ */ H({
|
|
374
|
+
name: "ElCascaderPanel",
|
|
375
|
+
__name: "index",
|
|
376
|
+
props: Ge,
|
|
377
|
+
emits: qe,
|
|
378
|
+
setup(t, { expose: n, emit: r }) {
|
|
379
|
+
let i = t, a = r, s = !1, c = ee("cascader"), l = Je(i), d = Le(), f, p = G(!0), m = G(!1), h = G([]), g = G(), _ = G([]), v = G(), y = G([]), ne = F(() => l.value.expandTrigger === "hover"), b = F(() => i.renderLabel || d.default), x = () => {
|
|
380
|
+
let { options: e } = i, t = l.value;
|
|
381
|
+
s = !1, f = new $(e, t), _.value = [f.getNodes()], t.lazy && u(i.options) ? (p.value = !1, ie(void 0, (e) => {
|
|
382
|
+
e && (f = new $(e, t), _.value = [f.getNodes()]), p.value = !0, D(!1, !0);
|
|
383
|
+
})) : D(!1, !0);
|
|
384
|
+
}, ie = (e, t) => {
|
|
385
|
+
let n = l.value;
|
|
386
|
+
e ||= new rt({}, n, void 0, !0), e.loading = !0, n.lazyLoad(e, (n) => {
|
|
387
|
+
let r = e, i = r.root ? null : r;
|
|
388
|
+
r.loading = !1, r.loaded = !0, r.childrenData = r.childrenData || [], n && f?.appendNodes(n, i), n && t?.(n), e.level === 0 && (m.value = !0);
|
|
389
|
+
}, () => {
|
|
390
|
+
e.loading = !1, e.loaded = !1, e.level === 0 && (p.value = !0);
|
|
391
|
+
});
|
|
392
|
+
}, oe = (e, t) => {
|
|
393
|
+
let { level: n } = e, r = _.value.slice(0, n), i;
|
|
394
|
+
e.isLeaf ? i = e.pathNodes[n - 2] : (i = e, r.push(e.children)), v.value?.uid !== i?.uid && (v.value = e, _.value = r, !t && a("expand-change", e?.pathValues || []));
|
|
395
|
+
}, se = (e, t, n = !0) => {
|
|
396
|
+
let { checkStrictly: r, multiple: i } = l.value, o = y.value[0];
|
|
397
|
+
s = !0, !i && o?.doCheck(!1), e.doCheck(t), de(), n && !i && !r && a("close"), !n && !i && ce(e);
|
|
398
|
+
}, ce = (e) => {
|
|
399
|
+
e && (e = e.parent, ce(e), e && oe(e));
|
|
400
|
+
}, le = (e) => f?.getFlattedNodes(e), T = (e) => le(e)?.filter(({ checked: e }) => e !== !1), ue = () => {
|
|
401
|
+
y.value.forEach((e) => e.doCheck(!1)), de(), _.value = _.value.slice(0, 1), v.value = void 0, a("expand-change", []);
|
|
402
|
+
}, de = () => {
|
|
403
|
+
let { checkStrictly: e, multiple: t } = l.value, n = y.value, r = st(n, T(!e)), i = r.map((e) => e.valueByOption);
|
|
404
|
+
y.value = r, g.value = t ? i : i[0] ?? null;
|
|
405
|
+
}, D = (e = !1, t = !1) => {
|
|
406
|
+
let { modelValue: n } = i, { lazy: r, multiple: a, checkStrictly: o } = l.value, c = !o;
|
|
407
|
+
if (!(!p.value || s || !t && C(n, g.value))) if (r && !e) {
|
|
408
|
+
let e = w(Ue(E(n))).map((e) => f?.getNodeByValue(e)).filter((e) => !!e && !e.loaded && !e.loading);
|
|
409
|
+
e.length ? e.forEach((e) => {
|
|
410
|
+
ie(e, () => D(!1, t));
|
|
411
|
+
}) : D(!0, t);
|
|
412
|
+
} else fe(w((a ? E(n) : [n]).map((e) => f?.getNodeByValue(e, c))), t), g.value = ae(n ?? void 0);
|
|
413
|
+
}, fe = (e, t = !0) => {
|
|
414
|
+
let { checkStrictly: n } = l.value, r = y.value, i = e.filter((e) => !!e && (n || e.isLeaf)), a = f?.getSameNode(v.value), o = t && a || i[0];
|
|
415
|
+
o ? o.pathNodes.forEach((e) => oe(e, !0)) : v.value = void 0, r.forEach((e) => e.doCheck(!1)), Ne(i).forEach((e) => e.doCheck(!0)), y.value = i, Oe(pe);
|
|
416
|
+
}, pe = () => {
|
|
417
|
+
o && h.value.forEach((e) => {
|
|
418
|
+
let t = e?.$el;
|
|
419
|
+
if (t) {
|
|
420
|
+
let e = t.querySelector(`.${c.namespace.value}-scrollbar__wrap`), n = t.querySelector(`.${c.b("node")}.in-active-path`);
|
|
421
|
+
if (!n) {
|
|
422
|
+
let e = t.querySelectorAll(`.${c.b("node")}.${c.is("active")}`);
|
|
423
|
+
n = e[e.length - 1];
|
|
424
|
+
}
|
|
425
|
+
xe(e, n);
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
}, me = (e) => {
|
|
429
|
+
let t = e.target, n = re(e);
|
|
430
|
+
switch (n) {
|
|
431
|
+
case S.up:
|
|
432
|
+
case S.down:
|
|
433
|
+
e.preventDefault(), he(ge(t, n === S.up ? -1 : 1, `.${c.b("node")}[tabindex="-1"]`));
|
|
434
|
+
break;
|
|
435
|
+
case S.left: {
|
|
436
|
+
e.preventDefault();
|
|
437
|
+
let n = h.value[at(t) - 1]?.$el.querySelector(`.${c.b("node")}[aria-expanded="true"]`);
|
|
438
|
+
he(n);
|
|
439
|
+
break;
|
|
440
|
+
}
|
|
441
|
+
case S.right: {
|
|
442
|
+
e.preventDefault();
|
|
443
|
+
let n = h.value[at(t) + 1]?.$el.querySelector(`.${c.b("node")}[tabindex="-1"]`);
|
|
444
|
+
he(n);
|
|
445
|
+
break;
|
|
446
|
+
}
|
|
447
|
+
case S.enter:
|
|
448
|
+
case S.numpadEnter:
|
|
449
|
+
ot(t);
|
|
450
|
+
break;
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
return Me(Ye, Ne({
|
|
454
|
+
config: l,
|
|
455
|
+
expandingNode: v,
|
|
456
|
+
checkedNodes: y,
|
|
457
|
+
isHoverMenu: ne,
|
|
458
|
+
initialLoaded: p,
|
|
459
|
+
renderLabelFn: b,
|
|
460
|
+
lazyLoad: ie,
|
|
461
|
+
expandNode: oe,
|
|
462
|
+
handleCheckChange: se
|
|
463
|
+
})), Y(l, (e, t) => {
|
|
464
|
+
C(e, t) || x();
|
|
465
|
+
}, { immediate: !0 }), Y(() => i.options, x, { deep: !0 }), Y(() => i.modelValue, () => {
|
|
466
|
+
s = !1, D();
|
|
467
|
+
}, { deep: !0 }), Y(() => g.value, (t) => {
|
|
468
|
+
C(t, i.modelValue) || (a(te, t), a(e, t));
|
|
469
|
+
}), Ae(() => h.value = []), je(() => !u(i.modelValue) && D()), n({
|
|
470
|
+
menuList: h,
|
|
471
|
+
menus: _,
|
|
472
|
+
checkedNodes: y,
|
|
473
|
+
handleKeyDown: me,
|
|
474
|
+
handleCheckChange: se,
|
|
475
|
+
getFlattedNodes: le,
|
|
476
|
+
getCheckedNodes: T,
|
|
477
|
+
clearCheckedNodes: ue,
|
|
478
|
+
calculateCheckedValue: de,
|
|
479
|
+
scrollToExpandingNode: pe,
|
|
480
|
+
loadLazyRootNodes: () => {
|
|
481
|
+
m.value || x();
|
|
482
|
+
}
|
|
483
|
+
}), (e, n) => (W(), R("div", {
|
|
484
|
+
class: U([J(c).b("panel"), J(c).is("bordered", t.border)]),
|
|
485
|
+
onKeydown: me
|
|
486
|
+
}, [(W(!0), R(P, null, Pe(_.value, (t, n) => (W(), I(et, {
|
|
487
|
+
key: n,
|
|
488
|
+
ref_for: !0,
|
|
489
|
+
ref: (e) => h.value[n] = e,
|
|
490
|
+
index: n,
|
|
491
|
+
nodes: [...t]
|
|
492
|
+
}, {
|
|
493
|
+
empty: X(() => [K(e.$slots, "empty")]),
|
|
494
|
+
_: 3
|
|
495
|
+
}, 8, ["index", "nodes"]))), 128))], 34));
|
|
496
|
+
}
|
|
497
|
+
})), lt = b({
|
|
498
|
+
...Q,
|
|
499
|
+
size: m,
|
|
500
|
+
placeholder: String,
|
|
501
|
+
disabled: {
|
|
502
|
+
type: Boolean,
|
|
503
|
+
default: void 0
|
|
504
|
+
},
|
|
505
|
+
clearable: Boolean,
|
|
506
|
+
clearIcon: {
|
|
507
|
+
type: O,
|
|
508
|
+
default: ye
|
|
509
|
+
},
|
|
510
|
+
filterable: Boolean,
|
|
511
|
+
filterMethod: {
|
|
512
|
+
type: d(Function),
|
|
513
|
+
default: (e, t) => e.text.includes(t)
|
|
514
|
+
},
|
|
515
|
+
separator: {
|
|
516
|
+
type: String,
|
|
517
|
+
default: " / "
|
|
518
|
+
},
|
|
519
|
+
showAllLevels: {
|
|
520
|
+
type: Boolean,
|
|
521
|
+
default: !0
|
|
522
|
+
},
|
|
523
|
+
collapseTags: Boolean,
|
|
524
|
+
maxCollapseTags: {
|
|
525
|
+
type: Number,
|
|
526
|
+
default: 1
|
|
527
|
+
},
|
|
528
|
+
collapseTagsTooltip: Boolean,
|
|
529
|
+
maxCollapseTagsTooltipHeight: { type: [String, Number] },
|
|
530
|
+
debounce: {
|
|
531
|
+
type: Number,
|
|
532
|
+
default: 300
|
|
533
|
+
},
|
|
534
|
+
beforeFilter: {
|
|
535
|
+
type: d(Function),
|
|
536
|
+
default: () => !0
|
|
537
|
+
},
|
|
538
|
+
placement: {
|
|
539
|
+
type: d(String),
|
|
540
|
+
values: se,
|
|
541
|
+
default: "bottom-start"
|
|
542
|
+
},
|
|
543
|
+
fallbackPlacements: {
|
|
544
|
+
type: d(Array),
|
|
545
|
+
default: [
|
|
546
|
+
"bottom-start",
|
|
547
|
+
"bottom",
|
|
548
|
+
"top-start",
|
|
549
|
+
"top",
|
|
550
|
+
"right",
|
|
551
|
+
"left"
|
|
552
|
+
]
|
|
553
|
+
},
|
|
554
|
+
popperClass: T.popperClass,
|
|
555
|
+
popperStyle: T.popperStyle,
|
|
556
|
+
teleported: T.teleported,
|
|
557
|
+
effect: {
|
|
558
|
+
type: d(String),
|
|
559
|
+
default: "light"
|
|
560
|
+
},
|
|
561
|
+
tagType: {
|
|
562
|
+
...j.type,
|
|
563
|
+
default: "info"
|
|
564
|
+
},
|
|
565
|
+
tagEffect: {
|
|
566
|
+
...j.effect,
|
|
567
|
+
default: "light"
|
|
568
|
+
},
|
|
569
|
+
validateEvent: {
|
|
570
|
+
type: Boolean,
|
|
571
|
+
default: !0
|
|
572
|
+
},
|
|
573
|
+
persistent: {
|
|
574
|
+
type: Boolean,
|
|
575
|
+
default: !0
|
|
576
|
+
},
|
|
577
|
+
showCheckedStrategy: {
|
|
578
|
+
type: String,
|
|
579
|
+
values: ["parent", "child"],
|
|
580
|
+
default: "child"
|
|
581
|
+
},
|
|
582
|
+
checkOnClickNode: Boolean,
|
|
583
|
+
showPrefix: {
|
|
584
|
+
type: Boolean,
|
|
585
|
+
default: !0
|
|
586
|
+
},
|
|
587
|
+
...ce
|
|
588
|
+
}), ut = (e) => !0, dt = {
|
|
589
|
+
[te]: ut,
|
|
590
|
+
[e]: ut,
|
|
591
|
+
focus: (e) => e instanceof FocusEvent,
|
|
592
|
+
blur: (e) => e instanceof FocusEvent,
|
|
593
|
+
clear: () => !0,
|
|
594
|
+
visibleChange: (e) => a(e),
|
|
595
|
+
expandChange: (e) => !!e,
|
|
596
|
+
removeTag: (e) => !!e
|
|
597
|
+
}, ft = ["placeholder"], pt = ["onClick"], mt = v(/* @__PURE__ */ H({
|
|
598
|
+
name: "ElCascader",
|
|
599
|
+
__name: "cascader",
|
|
600
|
+
props: lt,
|
|
601
|
+
emits: dt,
|
|
602
|
+
setup(t, { expose: i, emit: a }) {
|
|
603
|
+
let s = { modifiers: [{
|
|
604
|
+
name: "arrowPosition",
|
|
605
|
+
enabled: !0,
|
|
606
|
+
phase: "main",
|
|
607
|
+
fn: ({ state: e }) => {
|
|
608
|
+
let { modifiersData: t, placement: n } = e;
|
|
609
|
+
[
|
|
610
|
+
"right",
|
|
611
|
+
"left",
|
|
612
|
+
"bottom",
|
|
613
|
+
"top"
|
|
614
|
+
].includes(n) || t.arrow && (t.arrow.x = 35);
|
|
615
|
+
},
|
|
616
|
+
requires: ["arrow"]
|
|
617
|
+
}] }, l = t, u = a, d = Ie(), f = Le(), m = 0, g = 0, v = ee("cascader"), b = ee("input"), x = {
|
|
618
|
+
small: 7,
|
|
619
|
+
default: 11,
|
|
620
|
+
large: 15
|
|
621
|
+
}, { t: C } = ie(), { formItem: se } = y(), w = _(), { valueOnClear: ce } = le(l), { isComposing: T, handleComposition: E } = me({ afterComposition(e) {
|
|
622
|
+
let t = e.target?.value;
|
|
623
|
+
Et(t);
|
|
624
|
+
} }), D = G(), pe = G(), O = G(), ye = G(), k = G(), xe = G(), j = G(!1), Ce = G(!1), M = G(!1), we = G(""), N = G(""), B = G([]), H = G([]), Ee = F(() => l.props.multiple ? l.collapseTags ? B.value.slice(0, l.maxCollapseTags) : B.value : []), De = F(() => l.props.multiple && l.collapseTags ? B.value.slice(l.maxCollapseTags) : []), Ae = F(() => d.style), Me = F(() => l.placeholder ?? C("el.cascader.placeholder")), Ne = F(() => N.value || B.value.length > 0 || T.value ? "" : Me.value), He = h(), Ue = F(() => He.value === "small" ? "small" : "default"), Q = F(() => !!l.props.multiple), We = F(() => !l.filterable || Q.value), Ge = F(() => Q.value ? N.value : we.value), Ke = F(() => k.value?.checkedNodes || []), { wrapperRef: qe, isFocused: Je, handleBlur: Ye } = fe(O, {
|
|
625
|
+
disabled: w,
|
|
626
|
+
beforeBlur(e) {
|
|
627
|
+
return D.value?.isFocusInsideContent(e) || pe.value?.isFocusInsideContent(e);
|
|
628
|
+
},
|
|
629
|
+
afterBlur() {
|
|
630
|
+
l.validateEvent && se?.validate?.("blur").catch((e) => ne(e));
|
|
631
|
+
}
|
|
632
|
+
}), Xe = F(() => !l.clearable || w.value || M.value || !Ce.value && !Je.value ? !1 : !!Ke.value.length), Ze = F(() => {
|
|
633
|
+
let { showAllLevels: e, separator: t } = l, n = Ke.value;
|
|
634
|
+
return n.length ? Q.value ? "" : n[0].calcText(e, t) : "";
|
|
635
|
+
}), Qe = F(() => se?.validateState || ""), $e = F({
|
|
636
|
+
get() {
|
|
637
|
+
return ae(l.modelValue);
|
|
638
|
+
},
|
|
639
|
+
set(t) {
|
|
640
|
+
let n = t ?? ce.value;
|
|
641
|
+
u(te, n), u(e, n), l.validateEvent && se?.validate("change").catch((e) => ne(e));
|
|
642
|
+
}
|
|
643
|
+
}), et = F(() => [
|
|
644
|
+
v.b(),
|
|
645
|
+
v.m(He.value),
|
|
646
|
+
v.is("disabled", w.value),
|
|
647
|
+
d.class
|
|
648
|
+
]), tt = F(() => [
|
|
649
|
+
b.e("icon"),
|
|
650
|
+
"icon-arrow-down",
|
|
651
|
+
v.is("reverse", j.value)
|
|
652
|
+
]), nt = F(() => v.is("focus", Je.value)), rt = F(() => D.value?.popperRef?.contentRef), it = (e) => {
|
|
653
|
+
Je.value && Ye(new FocusEvent("blur", e)), $(!1);
|
|
654
|
+
}, $ = (e) => {
|
|
655
|
+
w.value || (e ??= !j.value, e !== j.value && (j.value = e, O.value?.input?.setAttribute("aria-expanded", `${e}`), e ? (at(), k.value && Oe(k.value.scrollToExpandingNode)) : l.filterable && xt(), u("visibleChange", e)));
|
|
656
|
+
}, at = () => {
|
|
657
|
+
Oe(() => {
|
|
658
|
+
D.value?.updatePopper();
|
|
659
|
+
});
|
|
660
|
+
}, ot = () => {
|
|
661
|
+
M.value = !1;
|
|
662
|
+
}, st = (e) => {
|
|
663
|
+
let { showAllLevels: t, separator: n } = l;
|
|
664
|
+
return {
|
|
665
|
+
node: e,
|
|
666
|
+
key: e.uid,
|
|
667
|
+
text: e.calcText(t, n),
|
|
668
|
+
hitState: !1,
|
|
669
|
+
closable: !w.value && !e.isDisabled
|
|
670
|
+
};
|
|
671
|
+
}, lt = (e) => {
|
|
672
|
+
let t = e.node;
|
|
673
|
+
t.doCheck(!1), k.value?.calculateCheckedValue(), u("removeTag", t.valueByOption);
|
|
674
|
+
}, ut = () => {
|
|
675
|
+
switch (l.showCheckedStrategy) {
|
|
676
|
+
case "child": return Ke.value;
|
|
677
|
+
case "parent": {
|
|
678
|
+
let e = _t(!1), t = e.map((e) => e.value);
|
|
679
|
+
return e.filter((e) => !e.parent || !t.includes(e.parent.value));
|
|
680
|
+
}
|
|
681
|
+
default: return [];
|
|
682
|
+
}
|
|
683
|
+
}, dt = () => {
|
|
684
|
+
if (!Q.value) return;
|
|
685
|
+
let e = ut(), t = [];
|
|
686
|
+
e.forEach((e) => t.push(st(e))), B.value = t;
|
|
687
|
+
}, mt = () => {
|
|
688
|
+
let { filterMethod: e, showAllLevels: t, separator: n } = l, r = k.value?.getFlattedNodes(!l.props.checkStrictly)?.filter((r) => r.isDisabled ? !1 : (r.calcText(t, n), e(r, Ge.value)));
|
|
689
|
+
Q.value && B.value.forEach((e) => {
|
|
690
|
+
e.hitState = !1;
|
|
691
|
+
}), M.value = !0, H.value = r, at();
|
|
692
|
+
}, ht = () => {
|
|
693
|
+
let e;
|
|
694
|
+
e = M.value && xe.value ? xe.value.$el.querySelector(`.${v.e("suggestion-item")}`) : k.value?.$el.querySelector(`.${v.b("node")}[tabindex="-1"]`), e && (e.focus(), !M.value && e.getAttribute("aria-haspopup") === "true" && e.click());
|
|
695
|
+
}, gt = () => {
|
|
696
|
+
let e = O.value?.input, t = ye.value, n = xe.value?.$el;
|
|
697
|
+
if (!(!o || !e)) {
|
|
698
|
+
if (n) {
|
|
699
|
+
let t = n.querySelector(`.${v.e("suggestion-list")}`);
|
|
700
|
+
t.style.minWidth = `${e.offsetWidth}px`;
|
|
701
|
+
}
|
|
702
|
+
if (t) {
|
|
703
|
+
let { offsetHeight: n } = t, r = B.value.length > 0 ? `${Math.max(n, m) - 2}px` : `${m}px`;
|
|
704
|
+
if (e.style.height = r, f.prefix) {
|
|
705
|
+
let e = O.value?.$el.querySelector(`.${b.e("prefix")}`), n = 0;
|
|
706
|
+
e && (n = e.offsetWidth, n > 0 && (n += x[He.value || "default"])), t.style.left = `${n}px`;
|
|
707
|
+
} else t.style.left = "0";
|
|
708
|
+
at();
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}, _t = (e) => k.value?.getCheckedNodes(e), vt = (e) => {
|
|
712
|
+
at(), u("expandChange", e);
|
|
713
|
+
}, yt = (e) => {
|
|
714
|
+
if (!T.value) switch (re(e)) {
|
|
715
|
+
case S.enter:
|
|
716
|
+
case S.numpadEnter:
|
|
717
|
+
$();
|
|
718
|
+
break;
|
|
719
|
+
case S.down:
|
|
720
|
+
$(!0), Oe(ht), e.preventDefault();
|
|
721
|
+
break;
|
|
722
|
+
case S.esc:
|
|
723
|
+
j.value === !0 && (e.preventDefault(), e.stopPropagation(), $(!1));
|
|
724
|
+
break;
|
|
725
|
+
case S.tab:
|
|
726
|
+
$(!1);
|
|
727
|
+
break;
|
|
728
|
+
}
|
|
729
|
+
}, bt = () => {
|
|
730
|
+
k.value?.clearCheckedNodes(), !j.value && l.filterable && xt(), $(!1), u("clear");
|
|
731
|
+
}, xt = () => {
|
|
732
|
+
let { value: e } = Ze;
|
|
733
|
+
we.value = e, N.value = e;
|
|
734
|
+
}, St = (e) => {
|
|
735
|
+
let { checked: t } = e;
|
|
736
|
+
Q.value ? k.value?.handleCheckChange(e, !t, !1) : (!t && k.value?.handleCheckChange(e, !0, !1), $(!1));
|
|
737
|
+
}, Ct = (e) => {
|
|
738
|
+
let t = e.target, n = re(e);
|
|
739
|
+
switch (n) {
|
|
740
|
+
case S.up:
|
|
741
|
+
case S.down:
|
|
742
|
+
e.preventDefault(), he(ge(t, n === S.up ? -1 : 1, `.${v.e("suggestion-item")}[tabindex="-1"]`));
|
|
743
|
+
break;
|
|
744
|
+
case S.enter:
|
|
745
|
+
case S.numpadEnter:
|
|
746
|
+
t.click();
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
}, wt = () => {
|
|
750
|
+
let e = B.value[B.value.length - 1];
|
|
751
|
+
g = N.value ? 0 : g + 1, !(!e || !g || l.collapseTags && B.value.length > 1) && (e.hitState ? lt(e) : e.hitState = !0);
|
|
752
|
+
}, Tt = p(() => {
|
|
753
|
+
let { value: e } = Ge;
|
|
754
|
+
if (!e) return;
|
|
755
|
+
let t = l.beforeFilter(e);
|
|
756
|
+
n(t) ? t.then(mt).catch(() => {}) : t === !1 ? ot() : mt();
|
|
757
|
+
}, F(() => l.debounce)), Et = (e, t) => {
|
|
758
|
+
if (!j.value && $(!0), !t?.isComposing) if (e) Tt();
|
|
759
|
+
else {
|
|
760
|
+
let e = l.beforeFilter("");
|
|
761
|
+
n(e) && e.catch(() => {}), ot();
|
|
762
|
+
}
|
|
763
|
+
}, Dt = (e) => Number.parseFloat(c(b.cssVarName("input-height"), e).value) - 2;
|
|
764
|
+
return Y(M, at), Y([
|
|
765
|
+
Ke,
|
|
766
|
+
w,
|
|
767
|
+
() => l.collapseTags,
|
|
768
|
+
() => l.maxCollapseTags
|
|
769
|
+
], dt), Y(B, () => {
|
|
770
|
+
Oe(() => gt());
|
|
771
|
+
}), Y(He, async () => {
|
|
772
|
+
await Oe();
|
|
773
|
+
let e = O.value.input;
|
|
774
|
+
m = Dt(e) || m, gt();
|
|
775
|
+
}), Y(Ze, xt, { immediate: !0 }), Y(() => j.value, (e) => {
|
|
776
|
+
e && l.props.lazy && l.props.lazyLoad && k.value?.loadLazyRootNodes();
|
|
777
|
+
}), je(() => {
|
|
778
|
+
let e = O.value.input, t = Dt(e);
|
|
779
|
+
m = e.offsetHeight || t, r(e, gt);
|
|
780
|
+
}), i({
|
|
781
|
+
getCheckedNodes: _t,
|
|
782
|
+
cascaderPanelRef: k,
|
|
783
|
+
togglePopperVisible: $,
|
|
784
|
+
contentRef: rt,
|
|
785
|
+
presentText: Ze,
|
|
786
|
+
focus: () => {
|
|
787
|
+
O.value?.focus();
|
|
788
|
+
},
|
|
789
|
+
blur: () => {
|
|
790
|
+
O.value?.blur();
|
|
791
|
+
}
|
|
792
|
+
}), (e, n) => (W(), I(J(oe), {
|
|
793
|
+
ref_key: "tooltipRef",
|
|
794
|
+
ref: D,
|
|
795
|
+
visible: j.value,
|
|
796
|
+
teleported: t.teleported,
|
|
797
|
+
"popper-class": [J(v).e("dropdown"), t.popperClass],
|
|
798
|
+
"popper-style": t.popperStyle,
|
|
799
|
+
"popper-options": s,
|
|
800
|
+
"fallback-placements": t.fallbackPlacements,
|
|
801
|
+
"stop-popper-mouse-event": !1,
|
|
802
|
+
"gpu-acceleration": !1,
|
|
803
|
+
placement: t.placement,
|
|
804
|
+
transition: `${J(v).namespace.value}-zoom-in-top`,
|
|
805
|
+
effect: t.effect,
|
|
806
|
+
pure: "",
|
|
807
|
+
persistent: t.persistent,
|
|
808
|
+
onHide: ot
|
|
809
|
+
}, {
|
|
810
|
+
default: X(() => [Be((W(), R("div", {
|
|
811
|
+
ref_key: "wrapperRef",
|
|
812
|
+
ref: qe,
|
|
813
|
+
class: U(et.value),
|
|
814
|
+
style: ke(Ae.value),
|
|
815
|
+
onClick: n[8] ||= () => $(We.value ? void 0 : !0),
|
|
816
|
+
onKeydown: yt,
|
|
817
|
+
onMouseenter: n[9] ||= (e) => Ce.value = !0,
|
|
818
|
+
onMouseleave: n[10] ||= (e) => Ce.value = !1
|
|
819
|
+
}, [V(J(be), {
|
|
820
|
+
ref_key: "inputRef",
|
|
821
|
+
ref: O,
|
|
822
|
+
modelValue: we.value,
|
|
823
|
+
"onUpdate:modelValue": n[1] ||= (e) => we.value = e,
|
|
824
|
+
placeholder: Ne.value,
|
|
825
|
+
readonly: We.value,
|
|
826
|
+
disabled: J(w),
|
|
827
|
+
"validate-event": !1,
|
|
828
|
+
size: J(He),
|
|
829
|
+
class: U(nt.value),
|
|
830
|
+
tabindex: Q.value && t.filterable && !J(w) ? -1 : void 0,
|
|
831
|
+
onCompositionstart: J(E),
|
|
832
|
+
onCompositionupdate: J(E),
|
|
833
|
+
onCompositionend: J(E),
|
|
834
|
+
onInput: Et
|
|
835
|
+
}, Te({
|
|
836
|
+
suffix: X(() => [Xe.value ? (W(), I(J(A), {
|
|
837
|
+
key: "clear",
|
|
838
|
+
class: U([J(b).e("icon"), "icon-circle-close"]),
|
|
839
|
+
onClick: Z(bt, ["stop"])
|
|
840
|
+
}, {
|
|
841
|
+
default: X(() => [(W(), I(Fe(t.clearIcon)))]),
|
|
842
|
+
_: 1
|
|
843
|
+
}, 8, ["class"])) : (W(), I(J(A), {
|
|
844
|
+
key: "arrow-down",
|
|
845
|
+
class: U(tt.value),
|
|
846
|
+
onClick: n[0] ||= Z((e) => $(), ["stop"])
|
|
847
|
+
}, {
|
|
848
|
+
default: X(() => [V(J(_e))]),
|
|
849
|
+
_: 1
|
|
850
|
+
}, 8, ["class"]))]),
|
|
851
|
+
_: 2
|
|
852
|
+
}, [e.$slots.prefix ? {
|
|
853
|
+
name: "prefix",
|
|
854
|
+
fn: X(() => [K(e.$slots, "prefix")]),
|
|
855
|
+
key: "0"
|
|
856
|
+
} : void 0]), 1032, [
|
|
857
|
+
"modelValue",
|
|
858
|
+
"placeholder",
|
|
859
|
+
"readonly",
|
|
860
|
+
"disabled",
|
|
861
|
+
"size",
|
|
862
|
+
"class",
|
|
863
|
+
"tabindex",
|
|
864
|
+
"onCompositionstart",
|
|
865
|
+
"onCompositionupdate",
|
|
866
|
+
"onCompositionend"
|
|
867
|
+
]), Q.value ? (W(), R("div", {
|
|
868
|
+
key: 0,
|
|
869
|
+
ref_key: "tagWrapper",
|
|
870
|
+
ref: ye,
|
|
871
|
+
class: U([J(v).e("tags"), J(v).is("validate", !!Qe.value)])
|
|
872
|
+
}, [
|
|
873
|
+
K(e.$slots, "tag", {
|
|
874
|
+
data: B.value,
|
|
875
|
+
deleteTag: lt
|
|
876
|
+
}, () => [(W(!0), R(P, null, Pe(Ee.value, (e) => (W(), I(J(Se), {
|
|
877
|
+
key: e.key,
|
|
878
|
+
type: t.tagType,
|
|
879
|
+
size: Ue.value,
|
|
880
|
+
effect: t.tagEffect,
|
|
881
|
+
hit: e.hitState,
|
|
882
|
+
closable: e.closable,
|
|
883
|
+
"disable-transitions": "",
|
|
884
|
+
onClose: (t) => lt(e)
|
|
885
|
+
}, {
|
|
886
|
+
default: X(() => [z("span", null, q(e.text), 1)]),
|
|
887
|
+
_: 2
|
|
888
|
+
}, 1032, [
|
|
889
|
+
"type",
|
|
890
|
+
"size",
|
|
891
|
+
"effect",
|
|
892
|
+
"hit",
|
|
893
|
+
"closable",
|
|
894
|
+
"onClose"
|
|
895
|
+
]))), 128))]),
|
|
896
|
+
t.collapseTags && B.value.length > t.maxCollapseTags ? (W(), I(J(oe), {
|
|
897
|
+
key: 0,
|
|
898
|
+
ref_key: "tagTooltipRef",
|
|
899
|
+
ref: pe,
|
|
900
|
+
disabled: j.value || !t.collapseTagsTooltip,
|
|
901
|
+
"fallback-placements": [
|
|
902
|
+
"bottom",
|
|
903
|
+
"top",
|
|
904
|
+
"right",
|
|
905
|
+
"left"
|
|
906
|
+
],
|
|
907
|
+
placement: "bottom",
|
|
908
|
+
"popper-class": t.popperClass,
|
|
909
|
+
"popper-style": t.popperStyle,
|
|
910
|
+
effect: t.effect,
|
|
911
|
+
persistent: t.persistent
|
|
912
|
+
}, {
|
|
913
|
+
default: X(() => [V(J(Se), {
|
|
914
|
+
closable: !1,
|
|
915
|
+
size: Ue.value,
|
|
916
|
+
type: t.tagType,
|
|
917
|
+
effect: t.tagEffect,
|
|
918
|
+
"disable-transitions": ""
|
|
919
|
+
}, {
|
|
920
|
+
default: X(() => [z("span", { class: U(J(v).e("tags-text")) }, " + " + q(B.value.length - t.maxCollapseTags), 3)]),
|
|
921
|
+
_: 1
|
|
922
|
+
}, 8, [
|
|
923
|
+
"size",
|
|
924
|
+
"type",
|
|
925
|
+
"effect"
|
|
926
|
+
])]),
|
|
927
|
+
content: X(() => [V(J(ue), { "max-height": t.maxCollapseTagsTooltipHeight }, {
|
|
928
|
+
default: X(() => [z("div", { class: U(J(v).e("collapse-tags")) }, [(W(!0), R(P, null, Pe(De.value, (e, n) => (W(), R("div", {
|
|
929
|
+
key: n,
|
|
930
|
+
class: U(J(v).e("collapse-tag"))
|
|
931
|
+
}, [(W(), I(J(Se), {
|
|
932
|
+
key: e.key,
|
|
933
|
+
class: "in-tooltip",
|
|
934
|
+
type: t.tagType,
|
|
935
|
+
size: Ue.value,
|
|
936
|
+
effect: t.tagEffect,
|
|
937
|
+
hit: e.hitState,
|
|
938
|
+
closable: e.closable,
|
|
939
|
+
"disable-transitions": "",
|
|
940
|
+
onClose: (t) => lt(e)
|
|
941
|
+
}, {
|
|
942
|
+
default: X(() => [z("span", null, q(e.text), 1)]),
|
|
943
|
+
_: 2
|
|
944
|
+
}, 1032, [
|
|
945
|
+
"type",
|
|
946
|
+
"size",
|
|
947
|
+
"effect",
|
|
948
|
+
"hit",
|
|
949
|
+
"closable",
|
|
950
|
+
"onClose"
|
|
951
|
+
]))], 2))), 128))], 2)]),
|
|
952
|
+
_: 1
|
|
953
|
+
}, 8, ["max-height"])]),
|
|
954
|
+
_: 1
|
|
955
|
+
}, 8, [
|
|
956
|
+
"disabled",
|
|
957
|
+
"popper-class",
|
|
958
|
+
"popper-style",
|
|
959
|
+
"effect",
|
|
960
|
+
"persistent"
|
|
961
|
+
])) : L("v-if", !0),
|
|
962
|
+
t.filterable && !J(w) ? Be((W(), R("input", {
|
|
963
|
+
key: 1,
|
|
964
|
+
"onUpdate:modelValue": n[2] ||= (e) => N.value = e,
|
|
965
|
+
type: "text",
|
|
966
|
+
class: U(J(v).e("search-input")),
|
|
967
|
+
placeholder: Ze.value ? "" : Me.value,
|
|
968
|
+
onInput: n[3] ||= (e) => Et(N.value, e),
|
|
969
|
+
onClick: n[4] ||= Z((e) => $(!0), ["stop"]),
|
|
970
|
+
onKeydown: Ve(wt, ["delete"]),
|
|
971
|
+
onCompositionstart: n[5] ||= (...e) => J(E) && J(E)(...e),
|
|
972
|
+
onCompositionupdate: n[6] ||= (...e) => J(E) && J(E)(...e),
|
|
973
|
+
onCompositionend: n[7] ||= (...e) => J(E) && J(E)(...e)
|
|
974
|
+
}, null, 42, ft)), [[Re, N.value]]) : L("v-if", !0)
|
|
975
|
+
], 2)) : L("v-if", !0)], 38)), [[
|
|
976
|
+
J(de),
|
|
977
|
+
it,
|
|
978
|
+
rt.value
|
|
979
|
+
]])]),
|
|
980
|
+
content: X(() => [
|
|
981
|
+
e.$slots.header ? (W(), R("div", {
|
|
982
|
+
key: 0,
|
|
983
|
+
class: U(J(v).e("header")),
|
|
984
|
+
onClick: n[11] ||= Z(() => {}, ["stop"])
|
|
985
|
+
}, [K(e.$slots, "header")], 2)) : L("v-if", !0),
|
|
986
|
+
Be(V(J(ct), {
|
|
987
|
+
ref_key: "cascaderPanelRef",
|
|
988
|
+
ref: k,
|
|
989
|
+
modelValue: $e.value,
|
|
990
|
+
"onUpdate:modelValue": n[12] ||= (e) => $e.value = e,
|
|
991
|
+
options: t.options,
|
|
992
|
+
props: l.props,
|
|
993
|
+
border: !1,
|
|
994
|
+
"render-label": e.$slots.default,
|
|
995
|
+
onExpandChange: vt,
|
|
996
|
+
onClose: n[13] ||= (t) => e.$nextTick(() => $(!1))
|
|
997
|
+
}, {
|
|
998
|
+
empty: X(() => [K(e.$slots, "empty")]),
|
|
999
|
+
_: 3
|
|
1000
|
+
}, 8, [
|
|
1001
|
+
"modelValue",
|
|
1002
|
+
"options",
|
|
1003
|
+
"props",
|
|
1004
|
+
"render-label"
|
|
1005
|
+
]), [[ze, !M.value]]),
|
|
1006
|
+
t.filterable ? Be((W(), I(J(ue), {
|
|
1007
|
+
key: 1,
|
|
1008
|
+
ref_key: "suggestionPanel",
|
|
1009
|
+
ref: xe,
|
|
1010
|
+
tag: "ul",
|
|
1011
|
+
class: U(J(v).e("suggestion-panel")),
|
|
1012
|
+
"view-class": J(v).e("suggestion-list"),
|
|
1013
|
+
onKeydown: Ct
|
|
1014
|
+
}, {
|
|
1015
|
+
default: X(() => [H.value.length ? (W(!0), R(P, { key: 0 }, Pe(H.value, (t) => (W(), R("li", {
|
|
1016
|
+
key: t.uid,
|
|
1017
|
+
class: U([J(v).e("suggestion-item"), J(v).is("checked", t.checked)]),
|
|
1018
|
+
tabindex: -1,
|
|
1019
|
+
onClick: (e) => St(t)
|
|
1020
|
+
}, [K(e.$slots, "suggestion-item", { item: t }, () => [z("span", null, q(t.text), 1), t.checked ? (W(), I(J(A), { key: 0 }, {
|
|
1021
|
+
default: X(() => [V(J(ve))]),
|
|
1022
|
+
_: 1
|
|
1023
|
+
})) : L("v-if", !0)])], 10, pt))), 128)) : K(e.$slots, "empty", { key: 1 }, () => [z("li", { class: U(J(v).e("empty-text")) }, q(J(C)("el.cascader.noMatch")), 3)])]),
|
|
1024
|
+
_: 3
|
|
1025
|
+
}, 8, ["class", "view-class"])), [[ze, M.value]]) : L("v-if", !0),
|
|
1026
|
+
e.$slots.footer ? (W(), R("div", {
|
|
1027
|
+
key: 2,
|
|
1028
|
+
class: U(J(v).e("footer")),
|
|
1029
|
+
onClick: n[14] ||= Z(() => {}, ["stop"])
|
|
1030
|
+
}, [K(e.$slots, "footer")], 2)) : L("v-if", !0)
|
|
1031
|
+
]),
|
|
1032
|
+
_: 3
|
|
1033
|
+
}, 8, [
|
|
1034
|
+
"visible",
|
|
1035
|
+
"teleported",
|
|
1036
|
+
"popper-class",
|
|
1037
|
+
"popper-style",
|
|
1038
|
+
"fallback-placements",
|
|
1039
|
+
"placement",
|
|
1040
|
+
"transition",
|
|
1041
|
+
"effect",
|
|
1042
|
+
"persistent"
|
|
1043
|
+
]));
|
|
1044
|
+
}
|
|
1045
|
+
})), ht = /* @__PURE__ */ H({
|
|
1046
|
+
__name: "Cascader",
|
|
1047
|
+
props: {
|
|
1048
|
+
item: {
|
|
1049
|
+
type: Object,
|
|
1050
|
+
required: !0
|
|
1051
|
+
},
|
|
1052
|
+
formModel: {
|
|
1053
|
+
type: Object,
|
|
1054
|
+
required: !0
|
|
1055
|
+
},
|
|
1056
|
+
globalConfig: {
|
|
1057
|
+
type: Object,
|
|
1058
|
+
required: !0
|
|
1059
|
+
},
|
|
1060
|
+
dictMap: {
|
|
1061
|
+
type: Object,
|
|
1062
|
+
required: !0
|
|
1063
|
+
},
|
|
1064
|
+
formItemWidth: {
|
|
1065
|
+
type: String,
|
|
1066
|
+
required: !0
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
1069
|
+
setup(e, { expose: t }) {
|
|
1070
|
+
let n = e, r = F(() => n.item.cascaderConfig), i = F(() => r.value?.options || n.dictMap[r.value?.dictCode || n.item.label] || void 0), a = F(() => r.value?.props || n.globalConfig.finalDictProps), o = (e) => {
|
|
1071
|
+
if (Object.hasOwn(r.value, "onChange") && typeof r.value?.onChange == "function") {
|
|
1072
|
+
let t = i.value?.find((t) => t[r.value?.props?.value || n.globalConfig.finalDictProps.value] === e);
|
|
1073
|
+
r.value.onChange({
|
|
1074
|
+
value: e,
|
|
1075
|
+
item: n.item,
|
|
1076
|
+
option: t,
|
|
1077
|
+
cascaderRef: s
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
}, s = G(null);
|
|
1081
|
+
return t({ cascaderRef: s }), (t, n) => {
|
|
1082
|
+
let c = we, l = mt;
|
|
1083
|
+
return r.value.useRender ? (W(), I(c, {
|
|
1084
|
+
key: 0,
|
|
1085
|
+
content: e.formModel[e.item.prop],
|
|
1086
|
+
class: U(typeof r.value.useRender == "object" && r.value.useRender.class),
|
|
1087
|
+
style: ke(typeof r.value.useRender == "object" && r.value.useRender.style)
|
|
1088
|
+
}, null, 8, [
|
|
1089
|
+
"content",
|
|
1090
|
+
"class",
|
|
1091
|
+
"style"
|
|
1092
|
+
])) : (W(), I(l, {
|
|
1093
|
+
key: 1,
|
|
1094
|
+
ref_key: "cascaderRef",
|
|
1095
|
+
ref: s,
|
|
1096
|
+
modelValue: e.formModel[e.item.prop],
|
|
1097
|
+
"onUpdate:modelValue": n[0] ||= (t) => e.formModel[e.item.prop] = t,
|
|
1098
|
+
options: i.value,
|
|
1099
|
+
props: a.value,
|
|
1100
|
+
clearable: r.value.clearable ?? !0,
|
|
1101
|
+
disabled: r.value.disabled || !1,
|
|
1102
|
+
style: ke({ width: r.value.width ?? e.formItemWidth }),
|
|
1103
|
+
onChange: o
|
|
1104
|
+
}, null, 8, [
|
|
1105
|
+
"modelValue",
|
|
1106
|
+
"options",
|
|
1107
|
+
"props",
|
|
1108
|
+
"clearable",
|
|
1109
|
+
"disabled",
|
|
1110
|
+
"style"
|
|
1111
|
+
]));
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
});
|
|
1115
|
+
//#endregion
|
|
1116
|
+
export { ht as default };
|