bp-aicc-editor 1.2.521 → 1.2.522
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/lib/{ScreenPreview-CV95NWOd.js → ScreenPreview-yUHo60be.js} +51 -105
- package/lib/atlas-BMjKIOwk.js +3891 -0
- package/lib/{button-base-DHNVBrQ9.js → button-base-CXl1z-_m.js} +1 -1
- package/lib/{cache-lsjsKZHu.js → cache-DbHSDjJy.js} +1 -1
- package/lib/config-provider-Bui8m4GV.js +62 -0
- package/lib/{container-group-DqAcKEBy.js → container-group-D6Extorz.js} +1 -1
- package/lib/{copy-C5Pi6nJh.js → copy-CsCmPy4J.js} +1 -1
- package/lib/{datav-BER95ty-.js → datav-BTD-HJhV.js} +27 -27
- package/lib/{delete-C2EW4JCs.js → delete-COj0ilHh.js} +1 -1
- package/lib/{divider-BazBGRgV.js → divider-B3K_URZc.js} +1 -1
- package/lib/dropdown-CWvnuJsO.js +105 -0
- package/lib/{edit-B2pfd2q1.js → edit-vdJaEine.js} +1 -1
- package/lib/{el-form-item-BDdxk5F5.js → el-form-item-BbaNohQv.js} +51 -51
- package/lib/{el-link-D2ol9BHQ.js → el-link-Dq721Q7-.js} +12 -12
- package/lib/{el-loading-Cgwgez55.js → el-loading-DOxnN3bm.js} +17 -17
- package/lib/{fullscreen-OChDsSnk.js → fullscreen-DXSogbcG.js} +1 -1
- package/lib/{image-C5ZAY3yt.js → image-Cu7JTK9-.js} +1 -1
- package/lib/{index-Ci8AbyIq.js → index-68soBnbK.js} +8 -8
- package/lib/{index-BatyRVpL.js → index-B-d8WIg1.js} +7 -7
- package/lib/{index-BfIEunKC.js → index-B4zV3cxV.js} +18 -17
- package/lib/{index-CZJriuFt.js → index-B8QqTLfg.js} +4974 -4898
- package/lib/index-BBMItxtW.js +619 -0
- package/lib/{index-CGrR_i0u.js → index-BMm0MRz5.js} +14 -15
- package/lib/index-BMn8EzMD.js +1027 -0
- package/lib/index-BNTW8F-9.js +322 -0
- package/lib/index-BTI518b1.js +69 -0
- package/lib/{index-BWPVi43E.js → index-BZxUAT4z.js} +4 -4
- package/lib/{index-Ck7uFsPE.js → index-BdYTc41r.js} +24 -24
- package/lib/index-BfI55Ioc.js +404 -0
- package/lib/{index-BhP9eBCp.js → index-BmAcetSf.js} +19 -20
- package/lib/index-C35Yp3i8.js +545 -0
- package/lib/{index-B19lEYui.js → index-C6GUNRx9.js} +2 -2
- package/lib/index-CC28_8Jl.js +567 -0
- package/lib/index-CDhmvVt8.js +338 -0
- package/lib/index-CDx0y0fp.js +144 -0
- package/lib/{el-button-DvLKp6Ga.js → index-CJjljoJG.js} +106 -106
- package/lib/index-CNCgXPiO.js +235 -0
- package/lib/{index-CWbZmzNT.js → index-CPa_MnOD.js} +30 -29
- package/lib/index-CW6ljdNf.js +1582 -0
- package/lib/index-C_WopEui.js +513 -0
- package/lib/{index-CX_Ghcb6.js → index-CejowjGd.js} +56 -53
- package/lib/{index-BwCQWH-N.js → index-CfZXOvi-.js} +42 -40
- package/lib/{index-CVsy2qTh.js → index-CgzRTmPh.js} +16 -15
- package/lib/index-CmzuNM9v.js +32 -0
- package/lib/index-CrxcAFt8.js +5343 -0
- package/lib/{index-C7k49L2T.js → index-CuHA7QXu.js} +10 -10
- package/lib/{index-qVyixI57.js → index-CyBGAB7D.js} +21 -20
- package/lib/index-D6J7coU0.js +129 -0
- package/lib/index-DDHxrdAo.js +1773 -0
- package/lib/index-DDL-yqq0.js +1401 -0
- package/lib/{index-BPcvYtHf.js → index-DOxy-bey.js} +6 -6
- package/lib/{index-CVE37oE7.js → index-DOyr0BHr.js} +7 -7
- package/lib/index-DPOanmXI.js +887 -0
- package/lib/{index-3pzVrvby.js → index-DR_husZg.js} +46 -46
- package/lib/{el-tab-pane-DD2eM9rB.js → index-DUzOCQrW.js} +125 -124
- package/lib/{index-CGFEhUh9.js → index-DVYI-g8Q.js} +53 -52
- package/lib/index-DVyjilLy.js +51 -0
- package/lib/{index-CJyYGViv.js → index-DWAJ9GyC.js} +9 -9
- package/lib/index-Dj2qCwPD.js +178 -0
- package/lib/{index-D4X0_jbv.js → index-Dx2Gld1J.js} +32 -32
- package/lib/{index-C2XeCqtq.js → index-E9T-y2Yz.js} +3 -3
- package/lib/{index-Buoc0ISP.js → index-FlmXAW0Z.js} +60 -58
- package/lib/index-NqqOvc6V.js +169 -0
- package/lib/{index-BkdiXCRY.js → index-ObKRNOmJ.js} +6 -7
- package/lib/index-bOWjoplU.js +448 -0
- package/lib/{index-CXQ258ID.js → index-buU8mDzi.js} +15 -16
- package/lib/{index-tbhuYbb0.js → index-mGKAWDJZ.js} +11 -12
- package/lib/index.es.js +4 -4
- package/lib/index.umd.js +46 -40
- package/lib/{layer-setting-panel-VvDSQ-cn.js → layer-setting-panel-BGPj32nP.js} +2 -2
- package/lib/{line-show-Bp4G-LqO.js → line-show-DUn1bu_P.js} +1 -1
- package/lib/{multi-layout-config-drSy7ezf.js → multi-layout-config-BTWxJeuc.js} +7 -8
- package/lib/{multiline-text-D89kYrA2.js → multiline-text-CPJdCWJ7.js} +1 -1
- package/lib/{navigation-YAGxZ0OT.js → navigation-ZLJaBOUj.js} +1 -1
- package/lib/page-config-CHP07Ndf.js +253 -0
- package/lib/{page-tabs-wFeNBY4c.js → page-tabs-CKLhgrip.js} +45 -41
- package/lib/{plus-3mdO6yXY.js → plus-xgpQU22I.js} +1 -1
- package/lib/raf-CJog_tcv.js +6 -0
- package/lib/refs-DZMysoBI.js +8 -0
- package/lib/{requestOld-DRcjsmRQ.js → requestOld-CaGzCXrV.js} +97 -96
- package/lib/{schema-BsnIOGBI.js → schema-BaFWGeFt.js} +1 -1
- package/lib/{schema-_APJMUW3.js → schema-CUR-UK2S.js} +44 -41
- package/lib/{schema-BavJE-SK.js → schema-WUk7XVq7.js} +58 -54
- package/lib/{schema-qKI1F8Bt.js → schema-geZfujv8.js} +1 -1
- package/lib/{schema-BflqDw-a.js → schema-iosjRxCC.js} +1 -1
- package/lib/{schema-Bo30dbBx.js → schema-tuPllxn6.js} +1 -1
- package/lib/scroll-CWfl60Tu.js +58 -0
- package/lib/{setting-panel-BgzN3BUP.js → setting-panel-0qLcwYyT.js} +154 -151
- package/lib/{show-C4AeWlKj.js → show-BCwE3hGY.js} +1 -1
- package/lib/{stepper-D5EFeJWG.js → stepper-Bud1Jppr.js} +1 -1
- package/lib/strings-BvUQWzDM.js +6 -0
- package/lib/{switch-B0dR4LM_.js → switch-VlaUmSpJ.js} +1 -1
- package/lib/{unlock-Cq9PLhBA.js → unlock-B2FVPQlm.js} +1 -1
- package/lib/{use-env-url-BM9dgwx_.js → use-env-url-D1p8ib2L.js} +1 -1
- package/lib/use-global-config-D_yoqf3Q.js +90 -0
- package/lib/validator-BOXH2OMA.js +5 -0
- package/lib/{vnode-B_Dj8zxu.js → vnode-Bxs1g06p.js} +1 -1
- package/package.json +1 -1
- package/lib/atlas-DsmLq2V0.js +0 -38
- package/lib/el-overlay-BK0_UIU6.js +0 -704
- package/lib/index-B1yAU2Cb.js +0 -390
- package/lib/index-BCFXuK7k.js +0 -68
- package/lib/index-BD4Jwo8Z.js +0 -449
- package/lib/index-BMWqf88L.js +0 -356
- package/lib/index-Belsn8kt.js +0 -107
- package/lib/index-CIADz1i0.js +0 -8494
- package/lib/index-DKTrbqcA.js +0 -56
- package/lib/index-Ge_d2xqD.js +0 -127
- package/lib/page-config-Cmsi8Vpr.js +0 -582
- package/lib/strings-_mHAdgA4.js +0 -6
- package/lib/use-global-config-CflpFoxU.js +0 -115
|
@@ -0,0 +1,1401 @@
|
|
|
1
|
+
import { defineComponent as fe, inject as Re, createVNode as j, Comment as Ye, computed as g, createElementBlock as F, openBlock as h, normalizeClass as E, unref as n, createCommentVNode as q, createBlock as H, withModifiers as ne, withCtx as D, createElementVNode as se, Fragment as re, getCurrentInstance as At, ref as T, renderList as be, createTextVNode as Ge, toDisplayString as oe, renderSlot as te, useSlots as Ht, provide as Rt, reactive as Je, watch as ee, onBeforeUpdate as qt, onMounted as qe, nextTick as ie, useAttrs as Kt, withDirectives as we, vShow as Qe, normalizeStyle as Ut, createSlots as jt, resolveDynamicComponent as Wt, withKeys as Zt, vModelText as Xt } from "vue";
|
|
2
|
+
import { a as Yt } from "./index-3k1IXN1T.js";
|
|
3
|
+
import { u as Gt } from "./use-env-url-D1p8ib2L.js";
|
|
4
|
+
import { h as pe, R as Be, g as xe, E as ue, ay as dt, aS as pt, G as Jt, t as vt, r as Qt, aT as _e, az as et, aU as ea, aV as ta, $ as de, e as Ke, f as ae, a0 as Te, ah as $e, aB as aa, aW as la, aX as tt, aY as sa, aZ as at, ap as ft, Q as ht, M as Oe, N as A, a_ as Se, a$ as mt, w as gt, ak as na, b0 as ze, b1 as oa, ax as ia, Y as ra, a6 as ua, b2 as ca, aC as da, b3 as pa, at as va, b4 as fa, a5 as lt, b5 as ha, b6 as ma, k as st, d as ga, ar as ya, aj as ba, b7 as ka, U as nt, _ as Ca } from "./index-B8QqTLfg.js";
|
|
5
|
+
import { E as Ae } from "./index-BfI55Ioc.js";
|
|
6
|
+
import { E as Na } from "./index-C35Yp3i8.js";
|
|
7
|
+
import { b as Ea } from "./index-CDhmvVt8.js";
|
|
8
|
+
import { s as wa } from "./scroll-CWfl60Tu.js";
|
|
9
|
+
import { t as ot, E as Fe, C as Sa } from "./index-Dj2qCwPD.js";
|
|
10
|
+
import { u as xa, a as Ta } from "./index-CmzuNM9v.js";
|
|
11
|
+
const Ve = Symbol();
|
|
12
|
+
function $a(u) {
|
|
13
|
+
return !!(Be(u) ? u.every(({
|
|
14
|
+
type: a
|
|
15
|
+
}) => a === Ye) : u?.type === Ye);
|
|
16
|
+
}
|
|
17
|
+
var Va = fe({
|
|
18
|
+
name: "NodeContent",
|
|
19
|
+
props: {
|
|
20
|
+
node: {
|
|
21
|
+
type: Object,
|
|
22
|
+
required: !0
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(u) {
|
|
26
|
+
const a = pe("cascader-node"), {
|
|
27
|
+
renderLabelFn: s
|
|
28
|
+
} = Re(Ve), {
|
|
29
|
+
node: o
|
|
30
|
+
} = u, {
|
|
31
|
+
data: l,
|
|
32
|
+
label: d
|
|
33
|
+
} = o, v = () => {
|
|
34
|
+
const p = s?.({
|
|
35
|
+
node: o,
|
|
36
|
+
data: l
|
|
37
|
+
});
|
|
38
|
+
return $a(p) ? d : p ?? d;
|
|
39
|
+
};
|
|
40
|
+
return () => j("span", {
|
|
41
|
+
class: a.e("label")
|
|
42
|
+
}, [v()]);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const Pa = ["id", "aria-haspopup", "aria-owns", "aria-expanded", "tabindex"], La = fe({
|
|
46
|
+
name: "ElCascaderNode",
|
|
47
|
+
__name: "node",
|
|
48
|
+
props: {
|
|
49
|
+
node: {
|
|
50
|
+
type: Object,
|
|
51
|
+
required: !0
|
|
52
|
+
},
|
|
53
|
+
menuId: String
|
|
54
|
+
},
|
|
55
|
+
emits: ["expand"],
|
|
56
|
+
setup(u, { emit: a }) {
|
|
57
|
+
const s = u, o = a, l = Re(Ve), d = pe("cascader-node"), v = g(() => l.isHoverMenu), p = g(() => l.config.multiple), C = g(() => l.config.checkStrictly), c = g(() => l.config.showPrefix), $ = g(() => {
|
|
58
|
+
var y;
|
|
59
|
+
return (y = l.checkedNodes[0]) == null ? void 0 : y.uid;
|
|
60
|
+
}), W = g(() => s.node.isDisabled), N = g(() => s.node.isLeaf), I = g(
|
|
61
|
+
() => C.value && !N.value || !W.value
|
|
62
|
+
), R = g(() => w(l.expandingNode)), K = g(
|
|
63
|
+
() => C.value && l.checkedNodes.some(w)
|
|
64
|
+
), w = (y) => {
|
|
65
|
+
var P;
|
|
66
|
+
const { level: X, uid: x } = s.node;
|
|
67
|
+
return ((P = y?.pathNodes[X - 1]) == null ? void 0 : P.uid) === x;
|
|
68
|
+
}, B = () => {
|
|
69
|
+
R.value || l.expandNode(s.node);
|
|
70
|
+
}, J = (y) => {
|
|
71
|
+
const { node: P } = s;
|
|
72
|
+
y !== P.checked && l.handleCheckChange(P, y);
|
|
73
|
+
}, V = () => {
|
|
74
|
+
l.lazyLoad(s.node, () => {
|
|
75
|
+
N.value || B();
|
|
76
|
+
});
|
|
77
|
+
}, U = (y) => {
|
|
78
|
+
v.value && (S(), !N.value && o("expand", y));
|
|
79
|
+
}, S = () => {
|
|
80
|
+
const { node: y } = s;
|
|
81
|
+
!I.value || y.loading || (y.loaded ? B() : V());
|
|
82
|
+
}, Q = () => {
|
|
83
|
+
N.value && !W.value && !C.value && !p.value ? Z(!0) : (l.config.checkOnClickNode && (p.value || C.value) || N.value && l.config.checkOnClickLeaf) && !W.value ? M(!s.node.checked) : v.value || S();
|
|
84
|
+
}, M = (y) => {
|
|
85
|
+
C.value ? (J(y), s.node.loaded && B()) : Z(y);
|
|
86
|
+
}, Z = (y) => {
|
|
87
|
+
s.node.loaded ? (J(y), !C.value && B()) : V();
|
|
88
|
+
};
|
|
89
|
+
return (y, P) => (h(), F("li", {
|
|
90
|
+
id: `${u.menuId}-${u.node.uid}`,
|
|
91
|
+
role: "menuitem",
|
|
92
|
+
"aria-haspopup": !N.value,
|
|
93
|
+
"aria-owns": N.value ? void 0 : u.menuId,
|
|
94
|
+
"aria-expanded": R.value,
|
|
95
|
+
tabindex: I.value ? -1 : void 0,
|
|
96
|
+
class: E([
|
|
97
|
+
n(d).b(),
|
|
98
|
+
n(d).is("selectable", C.value),
|
|
99
|
+
n(d).is("active", u.node.checked),
|
|
100
|
+
n(d).is("disabled", !I.value),
|
|
101
|
+
R.value && "in-active-path",
|
|
102
|
+
K.value && "in-checked-path"
|
|
103
|
+
]),
|
|
104
|
+
onMouseenter: U,
|
|
105
|
+
onFocus: U,
|
|
106
|
+
onClick: Q
|
|
107
|
+
}, [
|
|
108
|
+
q(" prefix "),
|
|
109
|
+
p.value && c.value ? (h(), H(n(Na), {
|
|
110
|
+
key: 0,
|
|
111
|
+
"model-value": u.node.checked,
|
|
112
|
+
indeterminate: u.node.indeterminate,
|
|
113
|
+
disabled: W.value,
|
|
114
|
+
onClick: P[0] || (P[0] = ne(() => {
|
|
115
|
+
}, ["stop"])),
|
|
116
|
+
"onUpdate:modelValue": M
|
|
117
|
+
}, null, 8, ["model-value", "indeterminate", "disabled"])) : C.value && c.value ? (h(), H(n(Ea), {
|
|
118
|
+
key: 1,
|
|
119
|
+
"model-value": $.value,
|
|
120
|
+
label: u.node.uid,
|
|
121
|
+
disabled: W.value,
|
|
122
|
+
"onUpdate:modelValue": M,
|
|
123
|
+
onClick: P[1] || (P[1] = ne(() => {
|
|
124
|
+
}, ["stop"]))
|
|
125
|
+
}, {
|
|
126
|
+
default: D(() => [
|
|
127
|
+
q(`
|
|
128
|
+
Add an empty element to avoid render label,
|
|
129
|
+
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
|
|
130
|
+
`),
|
|
131
|
+
P[2] || (P[2] = se(
|
|
132
|
+
"span",
|
|
133
|
+
null,
|
|
134
|
+
null,
|
|
135
|
+
-1
|
|
136
|
+
))
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
}, 8, ["model-value", "label", "disabled"])) : N.value && u.node.checked ? (h(), H(n(ue), {
|
|
140
|
+
key: 2,
|
|
141
|
+
class: E(n(d).e("prefix"))
|
|
142
|
+
}, {
|
|
143
|
+
default: D(() => [
|
|
144
|
+
j(n(dt))
|
|
145
|
+
]),
|
|
146
|
+
_: 1
|
|
147
|
+
}, 8, ["class"])) : q("v-if", !0),
|
|
148
|
+
q(" content "),
|
|
149
|
+
j(n(Va), { node: u.node }, null, 8, ["node"]),
|
|
150
|
+
q(" postfix "),
|
|
151
|
+
N.value ? q("v-if", !0) : (h(), F(
|
|
152
|
+
re,
|
|
153
|
+
{ key: 3 },
|
|
154
|
+
[
|
|
155
|
+
u.node.loading ? (h(), H(n(ue), {
|
|
156
|
+
key: 0,
|
|
157
|
+
class: E([n(d).is("loading"), n(d).e("postfix")])
|
|
158
|
+
}, {
|
|
159
|
+
default: D(() => [
|
|
160
|
+
j(n(pt))
|
|
161
|
+
]),
|
|
162
|
+
_: 1
|
|
163
|
+
}, 8, ["class"])) : (h(), H(n(ue), {
|
|
164
|
+
key: 1,
|
|
165
|
+
class: E(["arrow-right", n(d).e("postfix")])
|
|
166
|
+
}, {
|
|
167
|
+
default: D(() => [
|
|
168
|
+
j(n(Jt))
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
}, 8, ["class"]))
|
|
172
|
+
],
|
|
173
|
+
64
|
|
174
|
+
))
|
|
175
|
+
], 42, Pa));
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
var Da = /* @__PURE__ */ xe(La, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/node.vue"]]);
|
|
179
|
+
const Ia = fe({
|
|
180
|
+
name: "ElCascaderMenu",
|
|
181
|
+
__name: "menu",
|
|
182
|
+
props: {
|
|
183
|
+
nodes: {
|
|
184
|
+
type: Array,
|
|
185
|
+
required: !0
|
|
186
|
+
},
|
|
187
|
+
index: {
|
|
188
|
+
type: Number,
|
|
189
|
+
required: !0
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
setup(u) {
|
|
193
|
+
const a = u, s = At(), o = pe("cascader-menu"), { t: l } = vt(), d = Qt();
|
|
194
|
+
let v, p;
|
|
195
|
+
const C = Re(Ve), c = T(), $ = g(() => !a.nodes.length), W = g(() => !C.initialLoaded), N = g(() => `${d.value}-${a.index}`), I = (B) => {
|
|
196
|
+
v = B.target;
|
|
197
|
+
}, R = (B) => {
|
|
198
|
+
var J;
|
|
199
|
+
if (!(!C.isHoverMenu || !v || !c.value))
|
|
200
|
+
if (v.contains(B.target)) {
|
|
201
|
+
K();
|
|
202
|
+
const V = s.vnode.el, { left: U } = V.getBoundingClientRect(), { offsetWidth: S, offsetHeight: Q } = V, M = B.clientX - U, Z = v.offsetTop, y = Z + v.offsetHeight, P = ((J = V.querySelector(`.${o.e("wrap")}`)) == null ? void 0 : J.scrollTop) || 0;
|
|
203
|
+
c.value.innerHTML = `
|
|
204
|
+
<path style="pointer-events: auto;" fill="transparent" d="M${M} ${Z} L${S} ${P} V${Z} Z" />
|
|
205
|
+
<path style="pointer-events: auto;" fill="transparent" d="M${M} ${y} L${S} ${Q + P} V${y} Z" />
|
|
206
|
+
`;
|
|
207
|
+
} else p || (p = window.setTimeout(w, C.config.hoverThreshold));
|
|
208
|
+
}, K = () => {
|
|
209
|
+
p && (clearTimeout(p), p = void 0);
|
|
210
|
+
}, w = () => {
|
|
211
|
+
c.value && (c.value.innerHTML = "", K());
|
|
212
|
+
};
|
|
213
|
+
return (B, J) => (h(), H(n(Ae), {
|
|
214
|
+
key: N.value,
|
|
215
|
+
tag: "ul",
|
|
216
|
+
role: "menu",
|
|
217
|
+
class: E(n(o).b()),
|
|
218
|
+
"wrap-class": n(o).e("wrap"),
|
|
219
|
+
"view-class": [n(o).e("list"), n(o).is("empty", $.value)],
|
|
220
|
+
onMousemove: R,
|
|
221
|
+
onMouseleave: w
|
|
222
|
+
}, {
|
|
223
|
+
default: D(() => {
|
|
224
|
+
var V;
|
|
225
|
+
return [
|
|
226
|
+
(h(!0), F(
|
|
227
|
+
re,
|
|
228
|
+
null,
|
|
229
|
+
be(u.nodes, (U) => (h(), H(Da, {
|
|
230
|
+
key: U.uid,
|
|
231
|
+
node: U,
|
|
232
|
+
"menu-id": N.value,
|
|
233
|
+
onExpand: I
|
|
234
|
+
}, null, 8, ["node", "menu-id"]))),
|
|
235
|
+
128
|
|
236
|
+
)),
|
|
237
|
+
W.value ? (h(), F(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
key: 0,
|
|
241
|
+
class: E(n(o).e("empty-text"))
|
|
242
|
+
},
|
|
243
|
+
[
|
|
244
|
+
j(n(ue), {
|
|
245
|
+
size: "14",
|
|
246
|
+
class: E(n(o).is("loading"))
|
|
247
|
+
}, {
|
|
248
|
+
default: D(() => [
|
|
249
|
+
j(n(pt))
|
|
250
|
+
]),
|
|
251
|
+
_: 1
|
|
252
|
+
}, 8, ["class"]),
|
|
253
|
+
Ge(
|
|
254
|
+
" " + oe(n(l)("el.cascader.loading")),
|
|
255
|
+
1
|
|
256
|
+
)
|
|
257
|
+
],
|
|
258
|
+
2
|
|
259
|
+
)) : $.value ? (h(), F(
|
|
260
|
+
"div",
|
|
261
|
+
{
|
|
262
|
+
key: 1,
|
|
263
|
+
class: E(n(o).e("empty-text"))
|
|
264
|
+
},
|
|
265
|
+
[
|
|
266
|
+
te(B.$slots, "empty", {}, () => [
|
|
267
|
+
Ge(
|
|
268
|
+
oe(n(l)("el.cascader.noData")),
|
|
269
|
+
1
|
|
270
|
+
)
|
|
271
|
+
])
|
|
272
|
+
],
|
|
273
|
+
2
|
|
274
|
+
)) : (V = n(C)) != null && V.isHoverMenu ? (h(), F(
|
|
275
|
+
re,
|
|
276
|
+
{ key: 2 },
|
|
277
|
+
[
|
|
278
|
+
q(" eslint-disable-next-line vue/html-self-closing "),
|
|
279
|
+
(h(), F(
|
|
280
|
+
"svg",
|
|
281
|
+
{
|
|
282
|
+
ref_key: "hoverZone",
|
|
283
|
+
ref: c,
|
|
284
|
+
class: E(n(o).e("hover-zone"))
|
|
285
|
+
},
|
|
286
|
+
null,
|
|
287
|
+
2
|
|
288
|
+
))
|
|
289
|
+
],
|
|
290
|
+
2112
|
|
291
|
+
)) : q("v-if", !0)
|
|
292
|
+
];
|
|
293
|
+
}),
|
|
294
|
+
_: 3
|
|
295
|
+
}, 8, ["class", "wrap-class", "view-class"]));
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
var Ma = /* @__PURE__ */ xe(Ia, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/menu.vue"]]);
|
|
299
|
+
let za = 0;
|
|
300
|
+
const Fa = (u) => {
|
|
301
|
+
const a = [u];
|
|
302
|
+
let { parent: s } = u;
|
|
303
|
+
for (; s; )
|
|
304
|
+
a.unshift(s), s = s.parent;
|
|
305
|
+
return a;
|
|
306
|
+
};
|
|
307
|
+
class ve {
|
|
308
|
+
constructor(a, s, o, l = !1) {
|
|
309
|
+
this.data = a, this.config = s, this.parent = o, this.root = l, this.uid = za++, this.checked = !1, this.indeterminate = !1, this.loading = !1;
|
|
310
|
+
const { value: d, label: v, children: p } = s, C = a[p], c = Fa(this);
|
|
311
|
+
this.level = l ? 0 : o ? o.level + 1 : 1, this.value = a[d], this.label = a[v], this.pathNodes = c, this.pathValues = c.map(($) => $.value), this.pathLabels = c.map(($) => $.label), this.childrenData = C, this.children = (C || []).map(
|
|
312
|
+
($) => new ve($, s, this)
|
|
313
|
+
), this.loaded = !s.lazy || this.isLeaf || !_e(C), this.text = "";
|
|
314
|
+
}
|
|
315
|
+
get isDisabled() {
|
|
316
|
+
const { data: a, parent: s, config: o } = this, { disabled: l, checkStrictly: d } = o;
|
|
317
|
+
return (et(l) ? l(a, this) : !!a[l]) || !d && !!s?.isDisabled;
|
|
318
|
+
}
|
|
319
|
+
get isLeaf() {
|
|
320
|
+
const { data: a, config: s, childrenData: o, loaded: l } = this, { lazy: d, leaf: v } = s, p = et(v) ? v(a, this) : a[v];
|
|
321
|
+
return ea(p) ? d && !l ? !1 : !(Be(o) && o.length) : !!p;
|
|
322
|
+
}
|
|
323
|
+
get valueByOption() {
|
|
324
|
+
return this.config.emitPath ? this.pathValues : this.value;
|
|
325
|
+
}
|
|
326
|
+
appendChild(a) {
|
|
327
|
+
const { childrenData: s, children: o } = this, l = new ve(a, this.config, this);
|
|
328
|
+
return Be(s) ? s.push(a) : this.childrenData = [a], o.push(l), l;
|
|
329
|
+
}
|
|
330
|
+
calcText(a, s) {
|
|
331
|
+
const o = a ? this.pathLabels.join(s) : this.label;
|
|
332
|
+
return this.text = o, o;
|
|
333
|
+
}
|
|
334
|
+
broadcast(a) {
|
|
335
|
+
this.children.forEach((s) => {
|
|
336
|
+
var o;
|
|
337
|
+
s && (s.broadcast(a), (o = s.onParentCheck) == null || o.call(s, a));
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
emit() {
|
|
341
|
+
var a;
|
|
342
|
+
const { parent: s } = this;
|
|
343
|
+
s && ((a = s.onChildCheck) == null || a.call(s), s.emit());
|
|
344
|
+
}
|
|
345
|
+
onParentCheck(a) {
|
|
346
|
+
this.isDisabled || this.setCheckState(a);
|
|
347
|
+
}
|
|
348
|
+
onChildCheck() {
|
|
349
|
+
const { children: a } = this, s = a.filter((l) => !l.isDisabled), o = s.length ? s.every((l) => l.checked) : !1;
|
|
350
|
+
this.setCheckState(o);
|
|
351
|
+
}
|
|
352
|
+
setCheckState(a) {
|
|
353
|
+
const s = this.children.length, o = this.children.reduce((l, d) => {
|
|
354
|
+
const v = d.checked ? 1 : d.indeterminate ? 0.5 : 0;
|
|
355
|
+
return l + v;
|
|
356
|
+
}, 0);
|
|
357
|
+
this.checked = this.loaded && this.children.filter((l) => !l.isDisabled).every((l) => l.loaded && l.checked) && a, this.indeterminate = this.loaded && o !== s && o > 0;
|
|
358
|
+
}
|
|
359
|
+
doCheck(a) {
|
|
360
|
+
if (this.checked === a)
|
|
361
|
+
return;
|
|
362
|
+
const { checkStrictly: s, multiple: o } = this.config;
|
|
363
|
+
s || !o ? this.checked = a : (this.broadcast(a), this.setCheckState(a), this.emit());
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
const He = (u, a) => u.reduce((s, o) => (o.isLeaf ? s.push(o) : (!a && s.push(o), s = s.concat(He(o.children, a))), s), []);
|
|
367
|
+
class it {
|
|
368
|
+
constructor(a, s) {
|
|
369
|
+
this.config = s;
|
|
370
|
+
const o = (a || []).map(
|
|
371
|
+
(l) => new ve(l, this.config)
|
|
372
|
+
);
|
|
373
|
+
this.nodes = o, this.allNodes = He(o, !1), this.leafNodes = He(o, !0);
|
|
374
|
+
}
|
|
375
|
+
getNodes() {
|
|
376
|
+
return this.nodes;
|
|
377
|
+
}
|
|
378
|
+
getFlattedNodes(a) {
|
|
379
|
+
return a ? this.leafNodes : this.allNodes;
|
|
380
|
+
}
|
|
381
|
+
appendNode(a, s) {
|
|
382
|
+
const o = s ? s.appendChild(a) : new ve(a, this.config);
|
|
383
|
+
s || this.nodes.push(o), this.appendAllNodesAndLeafNodes(o);
|
|
384
|
+
}
|
|
385
|
+
appendNodes(a, s) {
|
|
386
|
+
a.length > 0 ? a.forEach((o) => this.appendNode(o, s)) : s && s.isLeaf && this.leafNodes.push(s);
|
|
387
|
+
}
|
|
388
|
+
appendAllNodesAndLeafNodes(a) {
|
|
389
|
+
this.allNodes.push(a), a.isLeaf && this.leafNodes.push(a), a.children && a.children.forEach((s) => {
|
|
390
|
+
this.appendAllNodesAndLeafNodes(s);
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
getNodeByValue(a, s = !1) {
|
|
394
|
+
return ta(a) ? null : this.getFlattedNodes(s).find(
|
|
395
|
+
(l) => de(l.value, a) || de(l.pathValues, a)
|
|
396
|
+
) || null;
|
|
397
|
+
}
|
|
398
|
+
getSameNode(a) {
|
|
399
|
+
return a && this.getFlattedNodes(!1).find(
|
|
400
|
+
({ value: o, level: l }) => de(a.value, o) && a.level === l
|
|
401
|
+
) || null;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
const yt = Ke({
|
|
405
|
+
modelValue: {
|
|
406
|
+
type: ae([Number, String, Array, Object])
|
|
407
|
+
},
|
|
408
|
+
options: {
|
|
409
|
+
type: ae(Array),
|
|
410
|
+
default: () => []
|
|
411
|
+
},
|
|
412
|
+
props: {
|
|
413
|
+
type: ae(Object),
|
|
414
|
+
default: () => ({})
|
|
415
|
+
}
|
|
416
|
+
}), Ba = {
|
|
417
|
+
expandTrigger: "click",
|
|
418
|
+
multiple: !1,
|
|
419
|
+
checkStrictly: !1,
|
|
420
|
+
emitPath: !0,
|
|
421
|
+
lazy: !1,
|
|
422
|
+
lazyLoad: aa,
|
|
423
|
+
value: "value",
|
|
424
|
+
label: "label",
|
|
425
|
+
children: "children",
|
|
426
|
+
leaf: "leaf",
|
|
427
|
+
disabled: "disabled",
|
|
428
|
+
hoverThreshold: 500,
|
|
429
|
+
checkOnClickNode: !1,
|
|
430
|
+
checkOnClickLeaf: !0,
|
|
431
|
+
showPrefix: !0
|
|
432
|
+
}, _a = Ke({
|
|
433
|
+
...yt,
|
|
434
|
+
border: {
|
|
435
|
+
type: Boolean,
|
|
436
|
+
default: !0
|
|
437
|
+
},
|
|
438
|
+
renderLabel: {
|
|
439
|
+
type: Function
|
|
440
|
+
}
|
|
441
|
+
}), rt = (u) => !0, Oa = {
|
|
442
|
+
[$e]: rt,
|
|
443
|
+
[Te]: rt,
|
|
444
|
+
close: () => !0,
|
|
445
|
+
"expand-change": (u) => u
|
|
446
|
+
}, Aa = (u) => g(() => ({
|
|
447
|
+
...Ba,
|
|
448
|
+
...u.props
|
|
449
|
+
})), ut = (u) => {
|
|
450
|
+
if (!u)
|
|
451
|
+
return 0;
|
|
452
|
+
const a = u.id.split("-");
|
|
453
|
+
return Number(a[a.length - 2]);
|
|
454
|
+
}, Ha = (u) => {
|
|
455
|
+
if (!u)
|
|
456
|
+
return;
|
|
457
|
+
const a = u.querySelector("input");
|
|
458
|
+
a ? a.click() : la(u) && u.click();
|
|
459
|
+
}, Ra = (u, a) => {
|
|
460
|
+
const s = a.slice(0), o = s.map((d) => d.uid), l = u.reduce((d, v) => {
|
|
461
|
+
const p = o.indexOf(v.uid);
|
|
462
|
+
return p > -1 && (d.push(v), s.splice(p, 1), o.splice(p, 1)), d;
|
|
463
|
+
}, []);
|
|
464
|
+
return l.push(...s), l;
|
|
465
|
+
}, qa = fe({
|
|
466
|
+
name: "ElCascaderPanel",
|
|
467
|
+
__name: "index",
|
|
468
|
+
props: _a,
|
|
469
|
+
emits: Oa,
|
|
470
|
+
setup(u, { expose: a, emit: s }) {
|
|
471
|
+
const o = u, l = s;
|
|
472
|
+
let d = !1;
|
|
473
|
+
const v = pe("cascader"), p = Aa(o), C = Ht();
|
|
474
|
+
let c;
|
|
475
|
+
const $ = T(!0), W = T(!1), N = T([]), I = T(), R = T([]), K = T(), w = T([]), B = g(() => p.value.expandTrigger === "hover"), J = g(() => o.renderLabel || C.default), V = () => {
|
|
476
|
+
const { options: r } = o, f = p.value;
|
|
477
|
+
d = !1, c = new it(r, f), R.value = [c.getNodes()], f.lazy && _e(o.options) ? ($.value = !1, U(void 0, (m) => {
|
|
478
|
+
m && (c = new it(m, f), R.value = [c.getNodes()]), $.value = !0, x(!1, !0);
|
|
479
|
+
})) : x(!1, !0);
|
|
480
|
+
}, U = (r, f) => {
|
|
481
|
+
const m = p.value;
|
|
482
|
+
r = r || new ve({}, m, void 0, !0), r.loading = !0;
|
|
483
|
+
const k = (L) => {
|
|
484
|
+
const O = r, z = O.root ? null : O;
|
|
485
|
+
O.loading = !1, O.loaded = !0, O.childrenData = O.childrenData || [], L && c?.appendNodes(L, z), L && f?.(L), r.level === 0 && (W.value = !0);
|
|
486
|
+
}, b = () => {
|
|
487
|
+
r.loading = !1, r.loaded = !1, r.level === 0 && ($.value = !0);
|
|
488
|
+
};
|
|
489
|
+
m.lazyLoad(r, k, b);
|
|
490
|
+
}, S = (r, f) => {
|
|
491
|
+
var m;
|
|
492
|
+
const { level: k } = r, b = R.value.slice(0, k);
|
|
493
|
+
let L;
|
|
494
|
+
r.isLeaf ? L = r.pathNodes[k - 2] : (L = r, b.push(r.children)), ((m = K.value) == null ? void 0 : m.uid) !== L?.uid && (K.value = r, R.value = b, !f && l("expand-change", r?.pathValues || []));
|
|
495
|
+
}, Q = (r, f, m = !0) => {
|
|
496
|
+
const { checkStrictly: k, multiple: b } = p.value, L = w.value[0];
|
|
497
|
+
d = !0, !b && L?.doCheck(!1), r.doCheck(f), X(), m && !b && !k && l("close"), !m && !b && M(r);
|
|
498
|
+
}, M = (r) => {
|
|
499
|
+
r && (r = r.parent, M(r), r && S(r));
|
|
500
|
+
}, Z = (r) => c?.getFlattedNodes(r), y = (r) => {
|
|
501
|
+
var f;
|
|
502
|
+
return (f = Z(r)) == null ? void 0 : f.filter(({ checked: m }) => m !== !1);
|
|
503
|
+
}, P = () => {
|
|
504
|
+
w.value.forEach((r) => r.doCheck(!1)), X(), R.value = R.value.slice(0, 1), K.value = void 0, l("expand-change", []);
|
|
505
|
+
}, X = () => {
|
|
506
|
+
var r;
|
|
507
|
+
const { checkStrictly: f, multiple: m } = p.value, k = w.value, b = y(!f), L = Ra(k, b), O = L.map((z) => z.valueByOption);
|
|
508
|
+
w.value = L, I.value = m ? O : (r = O[0]) != null ? r : null;
|
|
509
|
+
}, x = (r = !1, f = !1) => {
|
|
510
|
+
const { modelValue: m } = o, { lazy: k, multiple: b, checkStrictly: L } = p.value, O = !L;
|
|
511
|
+
if (!(!$.value || d || !f && de(m, I.value)))
|
|
512
|
+
if (k && !r) {
|
|
513
|
+
const ce = tt(
|
|
514
|
+
sa(at(m))
|
|
515
|
+
).map((Y) => c?.getNodeByValue(Y)).filter((Y) => !!Y && !Y.loaded && !Y.loading);
|
|
516
|
+
ce.length ? ce.forEach((Y) => {
|
|
517
|
+
U(Y, () => x(!1, f));
|
|
518
|
+
}) : x(!0, f);
|
|
519
|
+
} else {
|
|
520
|
+
const z = b ? at(m) : [m], ce = tt(
|
|
521
|
+
z.map(
|
|
522
|
+
(Y) => c?.getNodeByValue(Y, O)
|
|
523
|
+
)
|
|
524
|
+
);
|
|
525
|
+
he(ce, f), I.value = ft(m ?? void 0);
|
|
526
|
+
}
|
|
527
|
+
}, he = (r, f = !0) => {
|
|
528
|
+
const { checkStrictly: m } = p.value, k = w.value, b = r.filter(
|
|
529
|
+
(z) => !!z && (m || z.isLeaf)
|
|
530
|
+
), L = c?.getSameNode(K.value), O = f && L || b[0];
|
|
531
|
+
O ? O.pathNodes.forEach((z) => S(z, !0)) : K.value = void 0, k.forEach((z) => z.doCheck(!1)), Je(b).forEach((z) => z.doCheck(!0)), w.value = b, ie(ke);
|
|
532
|
+
}, ke = () => {
|
|
533
|
+
ht && N.value.forEach((r) => {
|
|
534
|
+
const f = r?.$el;
|
|
535
|
+
if (f) {
|
|
536
|
+
const m = f.querySelector(
|
|
537
|
+
`.${v.namespace.value}-scrollbar__wrap`
|
|
538
|
+
), k = f.querySelector(
|
|
539
|
+
`.${v.b("node")}.${v.is("active")}:last-child`
|
|
540
|
+
) || f.querySelector(`.${v.b("node")}.in-active-path`);
|
|
541
|
+
wa(m, k);
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
}, Ce = (r) => {
|
|
545
|
+
const f = r.target, m = Oe(r);
|
|
546
|
+
switch (m) {
|
|
547
|
+
case A.up:
|
|
548
|
+
case A.down: {
|
|
549
|
+
r.preventDefault();
|
|
550
|
+
const k = m === A.up ? -1 : 1;
|
|
551
|
+
Se(
|
|
552
|
+
mt(
|
|
553
|
+
f,
|
|
554
|
+
k,
|
|
555
|
+
`.${v.b("node")}[tabindex="-1"]`
|
|
556
|
+
)
|
|
557
|
+
);
|
|
558
|
+
break;
|
|
559
|
+
}
|
|
560
|
+
case A.left: {
|
|
561
|
+
r.preventDefault();
|
|
562
|
+
const k = N.value[ut(f) - 1], b = k?.$el.querySelector(
|
|
563
|
+
`.${v.b("node")}[aria-expanded="true"]`
|
|
564
|
+
);
|
|
565
|
+
Se(b);
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
case A.right: {
|
|
569
|
+
r.preventDefault();
|
|
570
|
+
const k = N.value[ut(f) + 1], b = k?.$el.querySelector(
|
|
571
|
+
`.${v.b("node")}[tabindex="-1"]`
|
|
572
|
+
);
|
|
573
|
+
Se(b);
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
case A.enter:
|
|
577
|
+
case A.numpadEnter:
|
|
578
|
+
Ha(f);
|
|
579
|
+
break;
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
Rt(
|
|
583
|
+
Ve,
|
|
584
|
+
Je({
|
|
585
|
+
config: p,
|
|
586
|
+
expandingNode: K,
|
|
587
|
+
checkedNodes: w,
|
|
588
|
+
isHoverMenu: B,
|
|
589
|
+
initialLoaded: $,
|
|
590
|
+
renderLabelFn: J,
|
|
591
|
+
lazyLoad: U,
|
|
592
|
+
expandNode: S,
|
|
593
|
+
handleCheckChange: Q
|
|
594
|
+
})
|
|
595
|
+
), ee(
|
|
596
|
+
p,
|
|
597
|
+
(r, f) => {
|
|
598
|
+
de(r, f) || V();
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
immediate: !0
|
|
602
|
+
}
|
|
603
|
+
), ee(() => o.options, V, {
|
|
604
|
+
deep: !0
|
|
605
|
+
}), ee(
|
|
606
|
+
() => o.modelValue,
|
|
607
|
+
() => {
|
|
608
|
+
d = !1, x();
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
deep: !0
|
|
612
|
+
}
|
|
613
|
+
), ee(
|
|
614
|
+
() => I.value,
|
|
615
|
+
(r) => {
|
|
616
|
+
de(r, o.modelValue) || (l($e, r), l(Te, r));
|
|
617
|
+
}
|
|
618
|
+
);
|
|
619
|
+
const Pe = () => {
|
|
620
|
+
W.value || V();
|
|
621
|
+
};
|
|
622
|
+
return qt(() => N.value = []), qe(() => !_e(o.modelValue) && x()), a({
|
|
623
|
+
menuList: N,
|
|
624
|
+
menus: R,
|
|
625
|
+
checkedNodes: w,
|
|
626
|
+
handleKeyDown: Ce,
|
|
627
|
+
handleCheckChange: Q,
|
|
628
|
+
getFlattedNodes: Z,
|
|
629
|
+
getCheckedNodes: y,
|
|
630
|
+
clearCheckedNodes: P,
|
|
631
|
+
calculateCheckedValue: X,
|
|
632
|
+
scrollToExpandingNode: ke,
|
|
633
|
+
loadLazyRootNodes: Pe
|
|
634
|
+
}), (r, f) => (h(), F(
|
|
635
|
+
"div",
|
|
636
|
+
{
|
|
637
|
+
class: E([n(v).b("panel"), n(v).is("bordered", r.border)]),
|
|
638
|
+
onKeydown: Ce
|
|
639
|
+
},
|
|
640
|
+
[
|
|
641
|
+
(h(!0), F(
|
|
642
|
+
re,
|
|
643
|
+
null,
|
|
644
|
+
be(R.value, (m, k) => (h(), H(Ma, {
|
|
645
|
+
key: k,
|
|
646
|
+
ref_for: !0,
|
|
647
|
+
ref: (b) => N.value[k] = b,
|
|
648
|
+
index: k,
|
|
649
|
+
nodes: [...m]
|
|
650
|
+
}, {
|
|
651
|
+
empty: D(() => [
|
|
652
|
+
te(r.$slots, "empty")
|
|
653
|
+
]),
|
|
654
|
+
_: 3
|
|
655
|
+
}, 8, ["index", "nodes"]))),
|
|
656
|
+
128
|
|
657
|
+
))
|
|
658
|
+
],
|
|
659
|
+
34
|
|
660
|
+
));
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
var Ka = /* @__PURE__ */ xe(qa, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/index.vue"]]);
|
|
664
|
+
const Ua = gt(Ka), ja = Ke({
|
|
665
|
+
...yt,
|
|
666
|
+
size: ua,
|
|
667
|
+
placeholder: String,
|
|
668
|
+
disabled: {
|
|
669
|
+
type: Boolean,
|
|
670
|
+
default: void 0
|
|
671
|
+
},
|
|
672
|
+
clearable: Boolean,
|
|
673
|
+
clearIcon: {
|
|
674
|
+
type: ra,
|
|
675
|
+
default: ia
|
|
676
|
+
},
|
|
677
|
+
filterable: Boolean,
|
|
678
|
+
filterMethod: {
|
|
679
|
+
type: ae(
|
|
680
|
+
Function
|
|
681
|
+
),
|
|
682
|
+
default: (u, a) => u.text.includes(a)
|
|
683
|
+
},
|
|
684
|
+
separator: {
|
|
685
|
+
type: String,
|
|
686
|
+
default: " / "
|
|
687
|
+
},
|
|
688
|
+
showAllLevels: {
|
|
689
|
+
type: Boolean,
|
|
690
|
+
default: !0
|
|
691
|
+
},
|
|
692
|
+
collapseTags: Boolean,
|
|
693
|
+
maxCollapseTags: {
|
|
694
|
+
type: Number,
|
|
695
|
+
default: 1
|
|
696
|
+
},
|
|
697
|
+
collapseTagsTooltip: Boolean,
|
|
698
|
+
maxCollapseTagsTooltipHeight: {
|
|
699
|
+
type: [String, Number]
|
|
700
|
+
},
|
|
701
|
+
debounce: {
|
|
702
|
+
type: Number,
|
|
703
|
+
default: 300
|
|
704
|
+
},
|
|
705
|
+
beforeFilter: {
|
|
706
|
+
type: ae(Function),
|
|
707
|
+
default: () => !0
|
|
708
|
+
},
|
|
709
|
+
placement: {
|
|
710
|
+
type: ae(String),
|
|
711
|
+
values: oa,
|
|
712
|
+
default: "bottom-start"
|
|
713
|
+
},
|
|
714
|
+
fallbackPlacements: {
|
|
715
|
+
type: ae(Array),
|
|
716
|
+
default: ["bottom-start", "bottom", "top-start", "top", "right", "left"]
|
|
717
|
+
},
|
|
718
|
+
popperClass: ze.popperClass,
|
|
719
|
+
popperStyle: ze.popperStyle,
|
|
720
|
+
teleported: ze.teleported,
|
|
721
|
+
effect: {
|
|
722
|
+
type: ae(String),
|
|
723
|
+
default: "light"
|
|
724
|
+
},
|
|
725
|
+
tagType: { ...ot.type, default: "info" },
|
|
726
|
+
tagEffect: { ...ot.effect, default: "light" },
|
|
727
|
+
validateEvent: {
|
|
728
|
+
type: Boolean,
|
|
729
|
+
default: !0
|
|
730
|
+
},
|
|
731
|
+
persistent: {
|
|
732
|
+
type: Boolean,
|
|
733
|
+
default: !0
|
|
734
|
+
},
|
|
735
|
+
showCheckedStrategy: {
|
|
736
|
+
type: String,
|
|
737
|
+
values: ["parent", "child"],
|
|
738
|
+
default: "child"
|
|
739
|
+
},
|
|
740
|
+
checkOnClickNode: Boolean,
|
|
741
|
+
showPrefix: {
|
|
742
|
+
type: Boolean,
|
|
743
|
+
default: !0
|
|
744
|
+
},
|
|
745
|
+
...xa
|
|
746
|
+
}), ct = (u) => !0, Wa = {
|
|
747
|
+
[$e]: ct,
|
|
748
|
+
[Te]: ct,
|
|
749
|
+
focus: (u) => u instanceof FocusEvent,
|
|
750
|
+
blur: (u) => u instanceof FocusEvent,
|
|
751
|
+
clear: () => !0,
|
|
752
|
+
visibleChange: (u) => na(u),
|
|
753
|
+
expandChange: (u) => !!u,
|
|
754
|
+
removeTag: (u) => !!u
|
|
755
|
+
}, Za = ["placeholder"], Xa = ["onClick"], Ya = fe({
|
|
756
|
+
name: "ElCascader",
|
|
757
|
+
__name: "cascader",
|
|
758
|
+
props: ja,
|
|
759
|
+
emits: Wa,
|
|
760
|
+
setup(u, { expose: a, emit: s }) {
|
|
761
|
+
const o = {
|
|
762
|
+
modifiers: [
|
|
763
|
+
{
|
|
764
|
+
name: "arrowPosition",
|
|
765
|
+
enabled: !0,
|
|
766
|
+
phase: "main",
|
|
767
|
+
fn: ({ state: e }) => {
|
|
768
|
+
const { modifiersData: t, placement: i } = e;
|
|
769
|
+
["right", "left", "bottom", "top"].includes(i) || t.arrow && (t.arrow.x = 35);
|
|
770
|
+
},
|
|
771
|
+
requires: ["arrow"]
|
|
772
|
+
}
|
|
773
|
+
]
|
|
774
|
+
}, l = u, d = s, v = Kt();
|
|
775
|
+
let p = 0, C = 0;
|
|
776
|
+
const c = pe("cascader"), $ = pe("input"), { t: W } = vt(), { formItem: N } = ca(), I = da(), { valueOnClear: R } = Ta(l), { isComposing: K, handleComposition: w } = pa({
|
|
777
|
+
afterComposition(e) {
|
|
778
|
+
var t;
|
|
779
|
+
const i = (t = e.target) == null ? void 0 : t.value;
|
|
780
|
+
Me(i);
|
|
781
|
+
}
|
|
782
|
+
}), B = T(), J = T(), V = T(), U = T(), S = T(), Q = T(), M = T(!1), Z = T(!1), y = T(!1), P = T(""), X = T(""), x = T([]), he = T([]), ke = g(() => l.props.multiple ? l.collapseTags ? x.value.slice(0, l.maxCollapseTags) : x.value : []), Ce = g(() => l.props.multiple ? l.collapseTags ? x.value.slice(l.maxCollapseTags) : [] : []), Pe = g(() => v.style), r = g(
|
|
783
|
+
() => {
|
|
784
|
+
var e;
|
|
785
|
+
return (e = l.placeholder) != null ? e : W("el.cascader.placeholder");
|
|
786
|
+
}
|
|
787
|
+
), f = g(
|
|
788
|
+
() => X.value || x.value.length > 0 || K.value ? "" : r.value
|
|
789
|
+
), m = va(), k = g(
|
|
790
|
+
() => m.value === "small" ? "small" : "default"
|
|
791
|
+
), b = g(() => !!l.props.multiple), L = g(() => !l.filterable || b.value), O = g(
|
|
792
|
+
() => b.value ? X.value : P.value
|
|
793
|
+
), z = g(
|
|
794
|
+
() => {
|
|
795
|
+
var e;
|
|
796
|
+
return ((e = S.value) == null ? void 0 : e.checkedNodes) || [];
|
|
797
|
+
}
|
|
798
|
+
), { wrapperRef: ce, isFocused: Y, handleBlur: bt } = fa(V, {
|
|
799
|
+
disabled: I,
|
|
800
|
+
beforeBlur(e) {
|
|
801
|
+
var t, i;
|
|
802
|
+
return ((t = B.value) == null ? void 0 : t.isFocusInsideContent(e)) || ((i = J.value) == null ? void 0 : i.isFocusInsideContent(e));
|
|
803
|
+
},
|
|
804
|
+
afterBlur() {
|
|
805
|
+
var e;
|
|
806
|
+
l.validateEvent && ((e = N?.validate) == null || e.call(N, "blur").catch((t) => lt(t)));
|
|
807
|
+
}
|
|
808
|
+
}), kt = g(() => !l.clearable || I.value || y.value || !Z.value && !Y.value ? !1 : !!z.value.length), Ne = g(() => {
|
|
809
|
+
const { showAllLevels: e, separator: t } = l, i = z.value;
|
|
810
|
+
return i.length ? b.value ? "" : i[0].calcText(e, t) : "";
|
|
811
|
+
}), Ct = g(() => N?.validateState || ""), Ue = g({
|
|
812
|
+
get() {
|
|
813
|
+
return ft(l.modelValue);
|
|
814
|
+
},
|
|
815
|
+
set(e) {
|
|
816
|
+
const t = e ?? R.value;
|
|
817
|
+
d($e, t), d(Te, t), l.validateEvent && N?.validate("change").catch((i) => lt(i));
|
|
818
|
+
}
|
|
819
|
+
}), Nt = g(() => [
|
|
820
|
+
c.b(),
|
|
821
|
+
c.m(m.value),
|
|
822
|
+
c.is("disabled", I.value),
|
|
823
|
+
v.class
|
|
824
|
+
]), Et = g(() => [
|
|
825
|
+
$.e("icon"),
|
|
826
|
+
"icon-arrow-down",
|
|
827
|
+
c.is("reverse", M.value)
|
|
828
|
+
]), wt = g(() => c.is("focus", Y.value)), je = g(() => {
|
|
829
|
+
var e, t;
|
|
830
|
+
return (t = (e = B.value) == null ? void 0 : e.popperRef) == null ? void 0 : t.contentRef;
|
|
831
|
+
}), St = (e) => {
|
|
832
|
+
if (Y.value) {
|
|
833
|
+
const t = new FocusEvent("blur", e);
|
|
834
|
+
bt(t);
|
|
835
|
+
}
|
|
836
|
+
G(!1);
|
|
837
|
+
}, G = (e) => {
|
|
838
|
+
var t, i;
|
|
839
|
+
I.value || (e = e ?? !M.value, e !== M.value && (M.value = e, (i = (t = V.value) == null ? void 0 : t.input) == null || i.setAttribute("aria-expanded", `${e}`), e ? (me(), S.value && ie(S.value.scrollToExpandingNode)) : l.filterable && Ie(), d("visibleChange", e)));
|
|
840
|
+
}, me = () => {
|
|
841
|
+
ie(() => {
|
|
842
|
+
var e;
|
|
843
|
+
(e = B.value) == null || e.updatePopper();
|
|
844
|
+
});
|
|
845
|
+
}, Le = () => {
|
|
846
|
+
y.value = !1;
|
|
847
|
+
}, xt = (e) => {
|
|
848
|
+
const { showAllLevels: t, separator: i } = l;
|
|
849
|
+
return {
|
|
850
|
+
node: e,
|
|
851
|
+
key: e.uid,
|
|
852
|
+
text: e.calcText(t, i),
|
|
853
|
+
hitState: !1,
|
|
854
|
+
closable: !I.value && !e.isDisabled
|
|
855
|
+
};
|
|
856
|
+
}, Ee = (e) => {
|
|
857
|
+
var t;
|
|
858
|
+
const i = e.node;
|
|
859
|
+
i.doCheck(!1), (t = S.value) == null || t.calculateCheckedValue(), d("removeTag", i.valueByOption);
|
|
860
|
+
}, Tt = () => {
|
|
861
|
+
switch (l.showCheckedStrategy) {
|
|
862
|
+
case "child":
|
|
863
|
+
return z.value;
|
|
864
|
+
case "parent": {
|
|
865
|
+
const e = Ze(!1), t = e.map((_) => _.value);
|
|
866
|
+
return e.filter(
|
|
867
|
+
(_) => !_.parent || !t.includes(_.parent.value)
|
|
868
|
+
);
|
|
869
|
+
}
|
|
870
|
+
default:
|
|
871
|
+
return [];
|
|
872
|
+
}
|
|
873
|
+
}, $t = () => {
|
|
874
|
+
if (!b.value)
|
|
875
|
+
return;
|
|
876
|
+
const e = Tt(), t = [];
|
|
877
|
+
e.forEach((i) => t.push(xt(i))), x.value = t;
|
|
878
|
+
}, We = () => {
|
|
879
|
+
var e, t;
|
|
880
|
+
const { filterMethod: i, showAllLevels: _, separator: ge } = l, ye = (t = (e = S.value) == null ? void 0 : e.getFlattedNodes(!l.props.checkStrictly)) == null ? void 0 : t.filter((le) => le.isDisabled ? !1 : (le.calcText(_, ge), i(le, O.value)));
|
|
881
|
+
b.value && x.value.forEach((le) => {
|
|
882
|
+
le.hitState = !1;
|
|
883
|
+
}), y.value = !0, he.value = ye, me();
|
|
884
|
+
}, Vt = () => {
|
|
885
|
+
var e;
|
|
886
|
+
let t;
|
|
887
|
+
y.value && Q.value ? t = Q.value.$el.querySelector(
|
|
888
|
+
`.${c.e("suggestion-item")}`
|
|
889
|
+
) : t = (e = S.value) == null ? void 0 : e.$el.querySelector(
|
|
890
|
+
`.${c.b("node")}[tabindex="-1"]`
|
|
891
|
+
), t && (t.focus(), !y.value && t.click());
|
|
892
|
+
}, De = () => {
|
|
893
|
+
var e, t;
|
|
894
|
+
const i = (e = V.value) == null ? void 0 : e.input, _ = U.value, ge = (t = Q.value) == null ? void 0 : t.$el;
|
|
895
|
+
if (!(!ht || !i)) {
|
|
896
|
+
if (ge) {
|
|
897
|
+
const ye = ge.querySelector(
|
|
898
|
+
`.${c.e("suggestion-list")}`
|
|
899
|
+
);
|
|
900
|
+
ye.style.minWidth = `${i.offsetWidth}px`;
|
|
901
|
+
}
|
|
902
|
+
if (_) {
|
|
903
|
+
const { offsetHeight: ye } = _, le = x.value.length > 0 ? `${Math.max(ye, p) - 2}px` : `${p}px`;
|
|
904
|
+
i.style.height = le, me();
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}, Ze = (e) => {
|
|
908
|
+
var t;
|
|
909
|
+
return (t = S.value) == null ? void 0 : t.getCheckedNodes(e);
|
|
910
|
+
}, Pt = (e) => {
|
|
911
|
+
me(), d("expandChange", e);
|
|
912
|
+
}, Lt = (e) => {
|
|
913
|
+
if (K.value)
|
|
914
|
+
return;
|
|
915
|
+
switch (Oe(e)) {
|
|
916
|
+
case A.enter:
|
|
917
|
+
case A.numpadEnter:
|
|
918
|
+
G();
|
|
919
|
+
break;
|
|
920
|
+
case A.down:
|
|
921
|
+
G(!0), ie(Vt), e.preventDefault();
|
|
922
|
+
break;
|
|
923
|
+
case A.esc:
|
|
924
|
+
M.value === !0 && (e.preventDefault(), e.stopPropagation(), G(!1));
|
|
925
|
+
break;
|
|
926
|
+
case A.tab:
|
|
927
|
+
G(!1);
|
|
928
|
+
break;
|
|
929
|
+
}
|
|
930
|
+
}, Dt = () => {
|
|
931
|
+
var e;
|
|
932
|
+
(e = S.value) == null || e.clearCheckedNodes(), !M.value && l.filterable && Ie(), G(!1), d("clear");
|
|
933
|
+
}, Ie = () => {
|
|
934
|
+
const { value: e } = Ne;
|
|
935
|
+
P.value = e, X.value = e;
|
|
936
|
+
}, It = (e) => {
|
|
937
|
+
var t, i;
|
|
938
|
+
const { checked: _ } = e;
|
|
939
|
+
b.value ? (t = S.value) == null || t.handleCheckChange(e, !_, !1) : (!_ && ((i = S.value) == null || i.handleCheckChange(e, !0, !1)), G(!1));
|
|
940
|
+
}, Mt = (e) => {
|
|
941
|
+
const t = e.target, i = Oe(e);
|
|
942
|
+
switch (i) {
|
|
943
|
+
case A.up:
|
|
944
|
+
case A.down: {
|
|
945
|
+
e.preventDefault();
|
|
946
|
+
const _ = i === A.up ? -1 : 1;
|
|
947
|
+
Se(
|
|
948
|
+
mt(
|
|
949
|
+
t,
|
|
950
|
+
_,
|
|
951
|
+
`.${c.e("suggestion-item")}[tabindex="-1"]`
|
|
952
|
+
)
|
|
953
|
+
);
|
|
954
|
+
break;
|
|
955
|
+
}
|
|
956
|
+
case A.enter:
|
|
957
|
+
case A.numpadEnter:
|
|
958
|
+
t.click();
|
|
959
|
+
break;
|
|
960
|
+
}
|
|
961
|
+
}, zt = () => {
|
|
962
|
+
const e = x.value[x.value.length - 1];
|
|
963
|
+
C = X.value ? 0 : C + 1, !(!e || !C || l.collapseTags && x.value.length > 1) && (e.hitState ? Ee(e) : e.hitState = !0);
|
|
964
|
+
}, Ft = g(() => l.debounce), Bt = ha(() => {
|
|
965
|
+
const { value: e } = O;
|
|
966
|
+
if (!e)
|
|
967
|
+
return;
|
|
968
|
+
const t = l.beforeFilter(e);
|
|
969
|
+
ba(t) ? t.then(We).catch(() => {
|
|
970
|
+
}) : t !== !1 ? We() : Le();
|
|
971
|
+
}, Ft), Me = (e, t) => {
|
|
972
|
+
!M.value && G(!0), !t?.isComposing && (e ? Bt() : Le());
|
|
973
|
+
}, Xe = (e) => Number.parseFloat(
|
|
974
|
+
ka($.cssVarName("input-height"), e).value
|
|
975
|
+
) - 2, _t = () => {
|
|
976
|
+
var e;
|
|
977
|
+
(e = V.value) == null || e.focus();
|
|
978
|
+
}, Ot = () => {
|
|
979
|
+
var e;
|
|
980
|
+
(e = V.value) == null || e.blur();
|
|
981
|
+
};
|
|
982
|
+
return ee(y, me), ee(
|
|
983
|
+
[
|
|
984
|
+
z,
|
|
985
|
+
I,
|
|
986
|
+
() => l.collapseTags,
|
|
987
|
+
() => l.maxCollapseTags
|
|
988
|
+
],
|
|
989
|
+
$t
|
|
990
|
+
), ee(x, () => {
|
|
991
|
+
ie(() => De());
|
|
992
|
+
}), ee(m, async () => {
|
|
993
|
+
await ie();
|
|
994
|
+
const e = V.value.input;
|
|
995
|
+
p = Xe(e) || p, De();
|
|
996
|
+
}), ee(Ne, Ie, { immediate: !0 }), ee(
|
|
997
|
+
() => M.value,
|
|
998
|
+
(e) => {
|
|
999
|
+
var t;
|
|
1000
|
+
e && l.props.lazy && l.props.lazyLoad && ((t = S.value) == null || t.loadLazyRootNodes());
|
|
1001
|
+
}
|
|
1002
|
+
), qe(() => {
|
|
1003
|
+
const e = V.value.input, t = Xe(e);
|
|
1004
|
+
p = e.offsetHeight || t, ma(e, De);
|
|
1005
|
+
}), a({
|
|
1006
|
+
getCheckedNodes: Ze,
|
|
1007
|
+
cascaderPanelRef: S,
|
|
1008
|
+
togglePopperVisible: G,
|
|
1009
|
+
contentRef: je,
|
|
1010
|
+
presentText: Ne,
|
|
1011
|
+
focus: _t,
|
|
1012
|
+
blur: Ot
|
|
1013
|
+
}), (e, t) => (h(), H(n(st), {
|
|
1014
|
+
ref_key: "tooltipRef",
|
|
1015
|
+
ref: B,
|
|
1016
|
+
visible: M.value,
|
|
1017
|
+
teleported: e.teleported,
|
|
1018
|
+
"popper-class": [n(c).e("dropdown"), e.popperClass],
|
|
1019
|
+
"popper-style": e.popperStyle,
|
|
1020
|
+
"popper-options": o,
|
|
1021
|
+
"fallback-placements": e.fallbackPlacements,
|
|
1022
|
+
"stop-popper-mouse-event": !1,
|
|
1023
|
+
"gpu-acceleration": !1,
|
|
1024
|
+
placement: e.placement,
|
|
1025
|
+
transition: `${n(c).namespace.value}-zoom-in-top`,
|
|
1026
|
+
effect: e.effect,
|
|
1027
|
+
pure: "",
|
|
1028
|
+
persistent: e.persistent,
|
|
1029
|
+
onHide: Le
|
|
1030
|
+
}, {
|
|
1031
|
+
default: D(() => [
|
|
1032
|
+
we((h(), F(
|
|
1033
|
+
"div",
|
|
1034
|
+
{
|
|
1035
|
+
ref_key: "wrapperRef",
|
|
1036
|
+
ref: ce,
|
|
1037
|
+
class: E(Nt.value),
|
|
1038
|
+
style: Ut(Pe.value),
|
|
1039
|
+
onClick: t[8] || (t[8] = () => G(L.value ? void 0 : !0)),
|
|
1040
|
+
onKeydown: Lt,
|
|
1041
|
+
onMouseenter: t[9] || (t[9] = (i) => Z.value = !0),
|
|
1042
|
+
onMouseleave: t[10] || (t[10] = (i) => Z.value = !1)
|
|
1043
|
+
},
|
|
1044
|
+
[
|
|
1045
|
+
j(n(ga), {
|
|
1046
|
+
ref_key: "inputRef",
|
|
1047
|
+
ref: V,
|
|
1048
|
+
modelValue: P.value,
|
|
1049
|
+
"onUpdate:modelValue": t[1] || (t[1] = (i) => P.value = i),
|
|
1050
|
+
placeholder: f.value,
|
|
1051
|
+
readonly: L.value,
|
|
1052
|
+
disabled: n(I),
|
|
1053
|
+
"validate-event": !1,
|
|
1054
|
+
size: n(m),
|
|
1055
|
+
class: E(wt.value),
|
|
1056
|
+
tabindex: b.value && e.filterable && !n(I) ? -1 : void 0,
|
|
1057
|
+
onCompositionstart: n(w),
|
|
1058
|
+
onCompositionupdate: n(w),
|
|
1059
|
+
onCompositionend: n(w),
|
|
1060
|
+
onInput: Me
|
|
1061
|
+
}, jt({
|
|
1062
|
+
suffix: D(() => [
|
|
1063
|
+
kt.value ? (h(), H(n(ue), {
|
|
1064
|
+
key: "clear",
|
|
1065
|
+
class: E([n($).e("icon"), "icon-circle-close"]),
|
|
1066
|
+
onClick: ne(Dt, ["stop"])
|
|
1067
|
+
}, {
|
|
1068
|
+
default: D(() => [
|
|
1069
|
+
(h(), H(Wt(e.clearIcon)))
|
|
1070
|
+
]),
|
|
1071
|
+
_: 1
|
|
1072
|
+
}, 8, ["class"])) : (h(), H(n(ue), {
|
|
1073
|
+
key: "arrow-down",
|
|
1074
|
+
class: E(Et.value),
|
|
1075
|
+
onClick: t[0] || (t[0] = ne((i) => G(), ["stop"]))
|
|
1076
|
+
}, {
|
|
1077
|
+
default: D(() => [
|
|
1078
|
+
j(n(ya))
|
|
1079
|
+
]),
|
|
1080
|
+
_: 1
|
|
1081
|
+
}, 8, ["class"]))
|
|
1082
|
+
]),
|
|
1083
|
+
_: 2
|
|
1084
|
+
}, [
|
|
1085
|
+
e.$slots.prefix ? {
|
|
1086
|
+
name: "prefix",
|
|
1087
|
+
fn: D(() => [
|
|
1088
|
+
te(e.$slots, "prefix")
|
|
1089
|
+
]),
|
|
1090
|
+
key: "0"
|
|
1091
|
+
} : void 0
|
|
1092
|
+
]), 1032, ["modelValue", "placeholder", "readonly", "disabled", "size", "class", "tabindex", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
|
|
1093
|
+
b.value ? (h(), F(
|
|
1094
|
+
"div",
|
|
1095
|
+
{
|
|
1096
|
+
key: 0,
|
|
1097
|
+
ref_key: "tagWrapper",
|
|
1098
|
+
ref: U,
|
|
1099
|
+
class: E([
|
|
1100
|
+
n(c).e("tags"),
|
|
1101
|
+
n(c).is("validate", !!Ct.value)
|
|
1102
|
+
])
|
|
1103
|
+
},
|
|
1104
|
+
[
|
|
1105
|
+
te(e.$slots, "tag", {
|
|
1106
|
+
data: x.value,
|
|
1107
|
+
deleteTag: Ee
|
|
1108
|
+
}, () => [
|
|
1109
|
+
(h(!0), F(
|
|
1110
|
+
re,
|
|
1111
|
+
null,
|
|
1112
|
+
be(ke.value, (i) => (h(), H(n(Fe), {
|
|
1113
|
+
key: i.key,
|
|
1114
|
+
type: e.tagType,
|
|
1115
|
+
size: k.value,
|
|
1116
|
+
effect: e.tagEffect,
|
|
1117
|
+
hit: i.hitState,
|
|
1118
|
+
closable: i.closable,
|
|
1119
|
+
"disable-transitions": "",
|
|
1120
|
+
onClose: (_) => Ee(i)
|
|
1121
|
+
}, {
|
|
1122
|
+
default: D(() => [
|
|
1123
|
+
se(
|
|
1124
|
+
"span",
|
|
1125
|
+
null,
|
|
1126
|
+
oe(i.text),
|
|
1127
|
+
1
|
|
1128
|
+
)
|
|
1129
|
+
]),
|
|
1130
|
+
_: 2
|
|
1131
|
+
}, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))),
|
|
1132
|
+
128
|
|
1133
|
+
))
|
|
1134
|
+
]),
|
|
1135
|
+
e.collapseTags && x.value.length > e.maxCollapseTags ? (h(), H(n(st), {
|
|
1136
|
+
key: 0,
|
|
1137
|
+
ref_key: "tagTooltipRef",
|
|
1138
|
+
ref: J,
|
|
1139
|
+
disabled: M.value || !e.collapseTagsTooltip,
|
|
1140
|
+
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
1141
|
+
placement: "bottom",
|
|
1142
|
+
"popper-class": e.popperClass,
|
|
1143
|
+
"popper-style": e.popperStyle,
|
|
1144
|
+
effect: e.effect,
|
|
1145
|
+
persistent: e.persistent
|
|
1146
|
+
}, {
|
|
1147
|
+
default: D(() => [
|
|
1148
|
+
j(n(Fe), {
|
|
1149
|
+
closable: !1,
|
|
1150
|
+
size: k.value,
|
|
1151
|
+
type: e.tagType,
|
|
1152
|
+
effect: e.tagEffect,
|
|
1153
|
+
"disable-transitions": ""
|
|
1154
|
+
}, {
|
|
1155
|
+
default: D(() => [
|
|
1156
|
+
se(
|
|
1157
|
+
"span",
|
|
1158
|
+
{
|
|
1159
|
+
class: E(n(c).e("tags-text"))
|
|
1160
|
+
},
|
|
1161
|
+
" + " + oe(x.value.length - e.maxCollapseTags),
|
|
1162
|
+
3
|
|
1163
|
+
)
|
|
1164
|
+
]),
|
|
1165
|
+
_: 1
|
|
1166
|
+
}, 8, ["size", "type", "effect"])
|
|
1167
|
+
]),
|
|
1168
|
+
content: D(() => [
|
|
1169
|
+
j(n(Ae), { "max-height": e.maxCollapseTagsTooltipHeight }, {
|
|
1170
|
+
default: D(() => [
|
|
1171
|
+
se(
|
|
1172
|
+
"div",
|
|
1173
|
+
{
|
|
1174
|
+
class: E(n(c).e("collapse-tags"))
|
|
1175
|
+
},
|
|
1176
|
+
[
|
|
1177
|
+
(h(!0), F(
|
|
1178
|
+
re,
|
|
1179
|
+
null,
|
|
1180
|
+
be(Ce.value, (i, _) => (h(), F(
|
|
1181
|
+
"div",
|
|
1182
|
+
{
|
|
1183
|
+
key: _,
|
|
1184
|
+
class: E(n(c).e("collapse-tag"))
|
|
1185
|
+
},
|
|
1186
|
+
[
|
|
1187
|
+
(h(), H(n(Fe), {
|
|
1188
|
+
key: i.key,
|
|
1189
|
+
class: "in-tooltip",
|
|
1190
|
+
type: e.tagType,
|
|
1191
|
+
size: k.value,
|
|
1192
|
+
effect: e.tagEffect,
|
|
1193
|
+
hit: i.hitState,
|
|
1194
|
+
closable: i.closable,
|
|
1195
|
+
"disable-transitions": "",
|
|
1196
|
+
onClose: (ge) => Ee(i)
|
|
1197
|
+
}, {
|
|
1198
|
+
default: D(() => [
|
|
1199
|
+
se(
|
|
1200
|
+
"span",
|
|
1201
|
+
null,
|
|
1202
|
+
oe(i.text),
|
|
1203
|
+
1
|
|
1204
|
+
)
|
|
1205
|
+
]),
|
|
1206
|
+
_: 2
|
|
1207
|
+
}, 1032, ["type", "size", "effect", "hit", "closable", "onClose"]))
|
|
1208
|
+
],
|
|
1209
|
+
2
|
|
1210
|
+
))),
|
|
1211
|
+
128
|
|
1212
|
+
))
|
|
1213
|
+
],
|
|
1214
|
+
2
|
|
1215
|
+
)
|
|
1216
|
+
]),
|
|
1217
|
+
_: 1
|
|
1218
|
+
}, 8, ["max-height"])
|
|
1219
|
+
]),
|
|
1220
|
+
_: 1
|
|
1221
|
+
}, 8, ["disabled", "popper-class", "popper-style", "effect", "persistent"])) : q("v-if", !0),
|
|
1222
|
+
e.filterable && !n(I) ? we((h(), F("input", {
|
|
1223
|
+
key: 1,
|
|
1224
|
+
"onUpdate:modelValue": t[2] || (t[2] = (i) => X.value = i),
|
|
1225
|
+
type: "text",
|
|
1226
|
+
class: E(n(c).e("search-input")),
|
|
1227
|
+
placeholder: Ne.value ? "" : r.value,
|
|
1228
|
+
onInput: t[3] || (t[3] = (i) => Me(X.value, i)),
|
|
1229
|
+
onClick: t[4] || (t[4] = ne((i) => G(!0), ["stop"])),
|
|
1230
|
+
onKeydown: Zt(zt, ["delete"]),
|
|
1231
|
+
onCompositionstart: t[5] || (t[5] = (...i) => n(w) && n(w)(...i)),
|
|
1232
|
+
onCompositionupdate: t[6] || (t[6] = (...i) => n(w) && n(w)(...i)),
|
|
1233
|
+
onCompositionend: t[7] || (t[7] = (...i) => n(w) && n(w)(...i))
|
|
1234
|
+
}, null, 42, Za)), [
|
|
1235
|
+
[Xt, X.value]
|
|
1236
|
+
]) : q("v-if", !0)
|
|
1237
|
+
],
|
|
1238
|
+
2
|
|
1239
|
+
)) : q("v-if", !0)
|
|
1240
|
+
],
|
|
1241
|
+
38
|
|
1242
|
+
)), [
|
|
1243
|
+
[n(Sa), St, je.value]
|
|
1244
|
+
])
|
|
1245
|
+
]),
|
|
1246
|
+
content: D(() => [
|
|
1247
|
+
e.$slots.header ? (h(), F(
|
|
1248
|
+
"div",
|
|
1249
|
+
{
|
|
1250
|
+
key: 0,
|
|
1251
|
+
class: E(n(c).e("header")),
|
|
1252
|
+
onClick: t[11] || (t[11] = ne(() => {
|
|
1253
|
+
}, ["stop"]))
|
|
1254
|
+
},
|
|
1255
|
+
[
|
|
1256
|
+
te(e.$slots, "header")
|
|
1257
|
+
],
|
|
1258
|
+
2
|
|
1259
|
+
)) : q("v-if", !0),
|
|
1260
|
+
we(j(n(Ua), {
|
|
1261
|
+
ref_key: "cascaderPanelRef",
|
|
1262
|
+
ref: S,
|
|
1263
|
+
modelValue: Ue.value,
|
|
1264
|
+
"onUpdate:modelValue": t[12] || (t[12] = (i) => Ue.value = i),
|
|
1265
|
+
options: e.options,
|
|
1266
|
+
props: l.props,
|
|
1267
|
+
border: !1,
|
|
1268
|
+
"render-label": e.$slots.default,
|
|
1269
|
+
onExpandChange: Pt,
|
|
1270
|
+
onClose: t[13] || (t[13] = (i) => e.$nextTick(() => G(!1)))
|
|
1271
|
+
}, {
|
|
1272
|
+
empty: D(() => [
|
|
1273
|
+
te(e.$slots, "empty")
|
|
1274
|
+
]),
|
|
1275
|
+
_: 3
|
|
1276
|
+
}, 8, ["modelValue", "options", "props", "render-label"]), [
|
|
1277
|
+
[Qe, !y.value]
|
|
1278
|
+
]),
|
|
1279
|
+
e.filterable ? we((h(), H(n(Ae), {
|
|
1280
|
+
key: 1,
|
|
1281
|
+
ref_key: "suggestionPanel",
|
|
1282
|
+
ref: Q,
|
|
1283
|
+
tag: "ul",
|
|
1284
|
+
class: E(n(c).e("suggestion-panel")),
|
|
1285
|
+
"view-class": n(c).e("suggestion-list"),
|
|
1286
|
+
onKeydown: Mt
|
|
1287
|
+
}, {
|
|
1288
|
+
default: D(() => [
|
|
1289
|
+
he.value.length ? (h(!0), F(
|
|
1290
|
+
re,
|
|
1291
|
+
{ key: 0 },
|
|
1292
|
+
be(he.value, (i) => (h(), F("li", {
|
|
1293
|
+
key: i.uid,
|
|
1294
|
+
class: E([
|
|
1295
|
+
n(c).e("suggestion-item"),
|
|
1296
|
+
n(c).is("checked", i.checked)
|
|
1297
|
+
]),
|
|
1298
|
+
tabindex: -1,
|
|
1299
|
+
onClick: (_) => It(i)
|
|
1300
|
+
}, [
|
|
1301
|
+
te(e.$slots, "suggestion-item", { item: i }, () => [
|
|
1302
|
+
se(
|
|
1303
|
+
"span",
|
|
1304
|
+
null,
|
|
1305
|
+
oe(i.text),
|
|
1306
|
+
1
|
|
1307
|
+
),
|
|
1308
|
+
i.checked ? (h(), H(n(ue), { key: 0 }, {
|
|
1309
|
+
default: D(() => [
|
|
1310
|
+
j(n(dt))
|
|
1311
|
+
]),
|
|
1312
|
+
_: 1
|
|
1313
|
+
})) : q("v-if", !0)
|
|
1314
|
+
])
|
|
1315
|
+
], 10, Xa))),
|
|
1316
|
+
128
|
|
1317
|
+
)) : te(e.$slots, "empty", { key: 1 }, () => [
|
|
1318
|
+
se(
|
|
1319
|
+
"li",
|
|
1320
|
+
{
|
|
1321
|
+
class: E(n(c).e("empty-text"))
|
|
1322
|
+
},
|
|
1323
|
+
oe(n(W)("el.cascader.noMatch")),
|
|
1324
|
+
3
|
|
1325
|
+
)
|
|
1326
|
+
])
|
|
1327
|
+
]),
|
|
1328
|
+
_: 3
|
|
1329
|
+
}, 8, ["class", "view-class"])), [
|
|
1330
|
+
[Qe, y.value]
|
|
1331
|
+
]) : q("v-if", !0),
|
|
1332
|
+
e.$slots.footer ? (h(), F(
|
|
1333
|
+
"div",
|
|
1334
|
+
{
|
|
1335
|
+
key: 2,
|
|
1336
|
+
class: E(n(c).e("footer")),
|
|
1337
|
+
onClick: t[14] || (t[14] = ne(() => {
|
|
1338
|
+
}, ["stop"]))
|
|
1339
|
+
},
|
|
1340
|
+
[
|
|
1341
|
+
te(e.$slots, "footer")
|
|
1342
|
+
],
|
|
1343
|
+
2
|
|
1344
|
+
)) : q("v-if", !0)
|
|
1345
|
+
]),
|
|
1346
|
+
_: 3
|
|
1347
|
+
}, 8, ["visible", "teleported", "popper-class", "popper-style", "fallback-placements", "placement", "transition", "effect", "persistent"]));
|
|
1348
|
+
}
|
|
1349
|
+
});
|
|
1350
|
+
var Ga = /* @__PURE__ */ xe(Ya, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader/src/cascader.vue"]]);
|
|
1351
|
+
const Ja = gt(Ga), Qa = /* @__PURE__ */ fe({
|
|
1352
|
+
__name: "index",
|
|
1353
|
+
props: {
|
|
1354
|
+
modelValue: String,
|
|
1355
|
+
label: {
|
|
1356
|
+
type: String,
|
|
1357
|
+
default: ""
|
|
1358
|
+
},
|
|
1359
|
+
inline: {
|
|
1360
|
+
type: [Boolean, String],
|
|
1361
|
+
default: !1
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
emits: [nt],
|
|
1365
|
+
setup(u, { emit: a }) {
|
|
1366
|
+
const s = u, o = a, { setUrl: l } = Gt(), d = T(s.modelValue), v = T([]);
|
|
1367
|
+
qe(async () => {
|
|
1368
|
+
const C = await Yt.get(l("/public/mapjson/pca-code.json"));
|
|
1369
|
+
v.value = C.data;
|
|
1370
|
+
});
|
|
1371
|
+
async function p(C) {
|
|
1372
|
+
ie(() => {
|
|
1373
|
+
o(nt, C);
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
return (C, c) => (h(), F("div", {
|
|
1377
|
+
class: E(["datav-gui g-upload", [
|
|
1378
|
+
{
|
|
1379
|
+
"--inline --single": !!u.inline
|
|
1380
|
+
}
|
|
1381
|
+
]])
|
|
1382
|
+
}, [
|
|
1383
|
+
j(n(Ja), {
|
|
1384
|
+
modelValue: d.value,
|
|
1385
|
+
"onUpdate:modelValue": c[0] || (c[0] = ($) => d.value = $),
|
|
1386
|
+
placeholder: "选择地图范围",
|
|
1387
|
+
options: v.value,
|
|
1388
|
+
filterable: "",
|
|
1389
|
+
props: {
|
|
1390
|
+
value: "code",
|
|
1391
|
+
label: "name",
|
|
1392
|
+
expandTrigger: "click"
|
|
1393
|
+
},
|
|
1394
|
+
onChange: p
|
|
1395
|
+
}, null, 8, ["modelValue", "options"])
|
|
1396
|
+
], 2));
|
|
1397
|
+
}
|
|
1398
|
+
}), cl = /* @__PURE__ */ Ca(Qa, [["__scopeId", "data-v-e95d1a1c"]]);
|
|
1399
|
+
export {
|
|
1400
|
+
cl as default
|
|
1401
|
+
};
|