@rhino-design/vue 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -18
- package/README.zh-CN.md +115 -0
- package/dist/arco.less +95 -76
- package/dist/components/XButton.vue.js +2 -2
- package/dist/components/XConfigProvider.vue.js +1 -1
- package/dist/components/XMenuOverflowWrap.vue.js +66 -59
- package/dist/components/XScrollbar.vue.js +1 -1
- package/dist/components/XSubMenuPop.vue.js +1 -1
- package/dist/components/XTable.vue.d.ts +1 -0
- package/dist/components/XTable.vue.js +3 -3
- package/dist/components/XTable.vue2.js +774 -614
- package/dist/components/XToast.vue.d.ts +25 -0
- package/dist/components/XToast.vue.js +7 -0
- package/dist/components/XToast.vue2.js +27 -0
- package/dist/components/XTour.vue.d.ts +2 -0
- package/dist/components/XTour.vue.js +69 -61
- package/dist/components/XTree.vue.d.ts +2 -0
- package/dist/components/XTree.vue.js +1 -1
- package/dist/components/XTree.vue2.js +124 -121
- package/dist/components/XTreeNode.vue.d.ts +1 -0
- package/dist/components/XTreeNode.vue.js +2 -2
- package/dist/components/XTreeNode.vue2.js +21 -20
- package/dist/components/XTreeSelect.vue.js +4 -4
- package/dist/components/XTreeSelect.vue2.js +314 -291
- package/dist/components/XWatermark.vue.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +55 -53
- package/dist/index.cjs +9 -9
- package/dist/index.css +95 -76
- package/dist/index.js +62 -60
- package/dist/index.less +95 -76
- package/dist/index.scss +14853 -0
- package/dist/style.css +95 -76
- package/dist/style.less +95 -76
- package/dist/style.scss +14853 -0
- package/package.json +14 -6
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Tl, ref as L, computed as r, watch as Nl, openBlock as i, createBlock as le, mergeProps as ve, withCtx as E, createElementVNode as F, normalizeClass as q, createElementBlock as c, renderSlot as b, createCommentVNode as $, createVNode as te, unref as B, toDisplayString as R, resolveDynamicComponent as El, createSlots as Fl, Fragment as he, renderList as $l, createTextVNode as Le, withModifiers as Re, nextTick as je } from "vue";
|
|
2
2
|
import G from "./XIcon.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useXConfig as
|
|
7
|
-
import { useXFormField as
|
|
8
|
-
import { useXI18n as
|
|
9
|
-
const
|
|
3
|
+
import Pl from "./XScrollbar.vue.js";
|
|
4
|
+
import Il from "./XTrigger.vue.js";
|
|
5
|
+
import zl from "./XTree.vue.js";
|
|
6
|
+
import { useXConfig as Al, sizeClass as Dl } from "../composables/config.js";
|
|
7
|
+
import { useXFormField as Ol } from "../composables/form.js";
|
|
8
|
+
import { useXI18n as Ll } from "../composables/i18n.js";
|
|
9
|
+
const Rl = ["tabindex"], jl = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "x-tree-select__prefix"
|
|
12
|
-
},
|
|
12
|
+
}, Xl = { class: "x-tree-select__value" }, Hl = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "x-tree-select__tags"
|
|
15
|
-
},
|
|
15
|
+
}, ql = { class: "x-tree-select__tag-label" }, Gl = ["onClick"], Ul = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "x-tree-select__tag x-tree-select__tag--rest"
|
|
18
|
-
},
|
|
18
|
+
}, Jl = ["value", "placeholder", "disabled", "id"], Ql = {
|
|
19
19
|
key: 2,
|
|
20
20
|
class: "x-tree-select__display is-placeholder"
|
|
21
|
-
},
|
|
21
|
+
}, Wl = ["value", "placeholder", "disabled", "id"], Yl = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "x-tree-select__display"
|
|
24
|
-
},
|
|
24
|
+
}, Zl = {
|
|
25
25
|
key: 2,
|
|
26
26
|
class: "x-tree-select__display is-placeholder"
|
|
27
|
-
},
|
|
27
|
+
}, et = { class: "x-tree-select__suffix" }, lt = {
|
|
28
28
|
key: 0,
|
|
29
29
|
class: "x-tree-select__header"
|
|
30
|
-
},
|
|
30
|
+
}, tt = { class: "x-tree-select__loading" }, at = { class: "x-tree-select__state" }, ot = {
|
|
31
31
|
key: 4,
|
|
32
32
|
class: "x-tree-select__footer"
|
|
33
|
-
},
|
|
33
|
+
}, pt = /* @__PURE__ */ Tl({
|
|
34
34
|
__name: "XTreeSelect",
|
|
35
35
|
props: {
|
|
36
36
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -79,64 +79,65 @@ const Al = ["tabindex"], Dl = {
|
|
|
79
79
|
clearable: { type: Boolean, default: void 0 }
|
|
80
80
|
},
|
|
81
81
|
emits: ["update:modelValue", "change", "update:popupVisible", "popup-visible-change", "popupVisibleChange", "update:open", "update:inputValue", "update:searchValue", "inputValueChange", "input-value-change", "search", "clear"],
|
|
82
|
-
setup(
|
|
83
|
-
const t =
|
|
82
|
+
setup(S, { expose: Xe, emit: He }) {
|
|
83
|
+
const t = S, g = He, qe = Al(), u = Ol(), { t: ye } = Ll(), P = L(null), ae = L(!1), I = r(() => {
|
|
84
84
|
var e;
|
|
85
85
|
return ((e = t.fieldNames) == null ? void 0 : e.key) || "key";
|
|
86
|
-
}),
|
|
86
|
+
}), ge = r(() => {
|
|
87
87
|
var e;
|
|
88
88
|
return ((e = t.fieldNames) == null ? void 0 : e.title) || "title";
|
|
89
|
-
}), U =
|
|
89
|
+
}), U = r(() => {
|
|
90
90
|
var e;
|
|
91
91
|
return ((e = t.fieldNames) == null ? void 0 : e.children) || "children";
|
|
92
|
-
}),
|
|
93
|
-
t.defaultValue ?? (
|
|
94
|
-
),
|
|
95
|
-
function
|
|
92
|
+
}), be = r(() => t.size ?? qe.size.value), f = r(() => !!(t.disabled || u != null && u.disabled.value)), J = r(() => t.placeholder === "请选择" ? ye("treeSelect.placeholder", void 0, "请选择") : t.placeholder), p = r(() => t.treeCheckable ?? t.checkable ?? !1), j = r(() => t.treeCheckStrictly ?? t.checkStrictly ?? !1), ke = r(() => t.treeCheckedStrategy ?? t.checkedStrategy ?? "all"), v = r(() => !!(t.multiple || p.value)), _ = r(() => t.filterable !== void 0 ? t.filterable : t.allowSearch !== void 0 ? t.allowSearch !== !1 : !!t.multiple), Q = r(() => typeof t.allowSearch == "object" && !!t.allowSearch.retainInputValue), Ge = r(() => t.allowClear ?? t.clearable ?? !1), Ue = r(() => t.popupVisible !== void 0 || t.open !== void 0), Je = r(() => t.inputValue !== void 0 || t.searchValue !== void 0), me = r(() => t.modelValue !== void 0), Ce = L(!!(t.defaultPopupVisible ?? t.defaultOpen)), Se = L(t.defaultInputValue ?? t.defaultSearchValue ?? ""), _e = L(
|
|
93
|
+
t.defaultValue ?? (v.value ? [] : void 0)
|
|
94
|
+
), h = r(() => t.popupVisible !== void 0 ? !!t.popupVisible : t.open !== void 0 ? !!t.open : Ce.value), w = r(() => t.inputValue !== void 0 ? String(t.inputValue ?? "") : t.searchValue !== void 0 ? String(t.searchValue ?? "") : Se.value), we = r(() => me.value ? t.modelValue : _e.value);
|
|
95
|
+
function M(e) {
|
|
96
96
|
return e != null && e !== "";
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Qe(e) {
|
|
99
99
|
return typeof e == "object" && e !== null && "value" in e;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function We(e) {
|
|
102
102
|
return e == null ? [] : Array.isArray(e) ? e : [e];
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
const e = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(),
|
|
106
|
-
let
|
|
107
|
-
const
|
|
108
|
-
const
|
|
109
|
-
let
|
|
110
|
-
return
|
|
111
|
-
},
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
return (ee.length > 0 || U.value in Z) && (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
),
|
|
119
|
-
key:
|
|
120
|
-
node:
|
|
121
|
-
parentKeys: [...
|
|
122
|
-
})),
|
|
104
|
+
const s = r(() => {
|
|
105
|
+
const e = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Set(), T = [];
|
|
106
|
+
let de = 0;
|
|
107
|
+
const ze = (H, D, N) => {
|
|
108
|
+
const m = t.selectable;
|
|
109
|
+
let y = !0;
|
|
110
|
+
return m === "leaf" ? y = N : typeof m == "function" ? y = !!m(H, { isLeaf: N, level: D }) : y = m !== !1, H.selectable === !1 && (y = !1), y;
|
|
111
|
+
}, fe = (H, D, N, m) => H.map((y) => {
|
|
112
|
+
const O = { ...y }, Z = y, ee = Array.isArray(Z[U.value]) ? Z[U.value] : [], C = Z[I.value], pe = M(C), Bl = !!(y.isLeaf ?? ee.length === 0), Ae = ze(y, D, Bl), De = y.checkable !== !1 && Ae && !y.disabled;
|
|
113
|
+
O.selectable = Ae, p.value && (O.checkable = De);
|
|
114
|
+
const Ml = pe ? [...m, C] : [...m], xl = pe ? C : N, Oe = ee.length ? fe(ee, D + 1, xl, Ml) : [];
|
|
115
|
+
return (ee.length > 0 || U.value in Z) && (O[U.value] = Oe), pe && (e.set(C, O), l.set(C, y), a.set(C, N), n.set(
|
|
116
|
+
C,
|
|
117
|
+
Oe.map((Kl) => Kl[I.value]).filter(M)
|
|
118
|
+
), o.set(C, D), d.set(C, de), de += 1, De && Y.add(C), T.push({
|
|
119
|
+
key: C,
|
|
120
|
+
node: O,
|
|
121
|
+
parentKeys: [...m]
|
|
122
|
+
})), O;
|
|
123
123
|
});
|
|
124
124
|
return {
|
|
125
|
-
clonedData:
|
|
125
|
+
clonedData: fe(t.data ?? [], 0, void 0, []),
|
|
126
126
|
keyMap: e,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
127
|
+
originNodeMap: l,
|
|
128
|
+
parentMap: a,
|
|
129
|
+
childrenMap: n,
|
|
130
|
+
levelMap: o,
|
|
131
|
+
orderMap: d,
|
|
132
|
+
checkableSet: Y,
|
|
133
|
+
flatNodes: T
|
|
133
134
|
};
|
|
134
135
|
});
|
|
135
136
|
function oe(e) {
|
|
136
|
-
const l = e[
|
|
137
|
+
const l = e[ge.value];
|
|
137
138
|
return l == null || l === "" ? "" : typeof l == "number" ? l : String(l);
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
+
function Ve(e) {
|
|
140
141
|
if (t.fallbackOption === !1) return null;
|
|
141
142
|
if (typeof t.fallbackOption == "function") {
|
|
142
143
|
const l = t.fallbackOption(e);
|
|
@@ -145,53 +146,53 @@ const Al = ["tabindex"], Dl = {
|
|
|
145
146
|
return l;
|
|
146
147
|
}
|
|
147
148
|
return {
|
|
148
|
-
[
|
|
149
|
-
[
|
|
149
|
+
[I.value]: e,
|
|
150
|
+
[ge.value]: String(e)
|
|
150
151
|
};
|
|
151
152
|
}
|
|
152
153
|
function re(e, l) {
|
|
153
154
|
if (l != null && l !== "")
|
|
154
155
|
return l;
|
|
155
|
-
const a =
|
|
156
|
+
const a = s.value.keyMap.get(e);
|
|
156
157
|
if (a) {
|
|
157
158
|
const o = oe(a);
|
|
158
159
|
return o === "" ? String(e) : o;
|
|
159
160
|
}
|
|
160
|
-
const
|
|
161
|
-
if (
|
|
162
|
-
const o = oe(
|
|
161
|
+
const n = Ve(e);
|
|
162
|
+
if (n) {
|
|
163
|
+
const o = oe(n);
|
|
163
164
|
return o === "" ? String(e) : o;
|
|
164
165
|
}
|
|
165
166
|
return String(e);
|
|
166
167
|
}
|
|
167
|
-
const ne =
|
|
168
|
-
const e =
|
|
169
|
-
return
|
|
170
|
-
}),
|
|
168
|
+
const ne = r(() => {
|
|
169
|
+
const e = We(we.value).map((l) => Qe(l) ? { key: l.value, label: l.label } : { key: l }).filter((l) => M(l.key));
|
|
170
|
+
return v.value ? e : e.slice(0, 1);
|
|
171
|
+
}), se = r(() => ne.value.map((e) => e.key)), Ye = r(() => {
|
|
171
172
|
const e = /* @__PURE__ */ new Map();
|
|
172
173
|
return ne.value.forEach((l) => {
|
|
173
174
|
l.label !== void 0 && l.label !== null && l.label !== "" && e.set(l.key, l.label);
|
|
174
175
|
}), e;
|
|
175
176
|
});
|
|
176
|
-
function
|
|
177
|
-
return e.disabled ? !1 :
|
|
177
|
+
function Ze(e) {
|
|
178
|
+
return e.disabled ? !1 : p.value ? e.checkable !== !1 : e.selectable !== !1;
|
|
178
179
|
}
|
|
179
|
-
const k =
|
|
180
|
+
const k = r(() => {
|
|
180
181
|
const e = [], l = /* @__PURE__ */ new Set();
|
|
181
182
|
return ne.value.forEach((a) => {
|
|
182
183
|
if (l.has(a.key)) return;
|
|
183
184
|
l.add(a.key);
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
185
|
+
const n = s.value.keyMap.get(a.key);
|
|
186
|
+
if (n) {
|
|
186
187
|
e.push({
|
|
187
188
|
key: a.key,
|
|
188
189
|
label: re(a.key, a.label),
|
|
189
|
-
closable: !f.value &&
|
|
190
|
-
data:
|
|
190
|
+
closable: !f.value && Ze(n),
|
|
191
|
+
data: n
|
|
191
192
|
});
|
|
192
193
|
return;
|
|
193
194
|
}
|
|
194
|
-
const o =
|
|
195
|
+
const o = Ve(a.key);
|
|
195
196
|
o && e.push({
|
|
196
197
|
key: a.key,
|
|
197
198
|
label: re(a.key, a.label),
|
|
@@ -199,353 +200,375 @@ const Al = ["tabindex"], Dl = {
|
|
|
199
200
|
data: o
|
|
200
201
|
});
|
|
201
202
|
}), e;
|
|
202
|
-
}),
|
|
203
|
+
}), el = r(() => k.value.length > 0), X = r(() => v.value ? !t.maxTagCount || t.maxTagCount <= 0 ? k.value : k.value.slice(0, t.maxTagCount) : []), Be = r(() => !v.value || !t.maxTagCount || t.maxTagCount <= 0 ? 0 : Math.max(k.value.length - X.value.length, 0)), ll = r(() => {
|
|
203
204
|
var e;
|
|
204
205
|
return ((e = k.value[0]) == null ? void 0 : e.label) ?? "";
|
|
205
|
-
}),
|
|
206
|
-
function
|
|
207
|
-
return Array.from(new Set(e.filter(
|
|
208
|
-
const o =
|
|
206
|
+
}), tl = r(() => h.value ? w.value : w.value || String(ll.value || "")), al = r(() => Ge.value && !f.value && !t.loading && el.value && ae.value);
|
|
207
|
+
function V(e) {
|
|
208
|
+
return Array.from(new Set(e.filter(M))).sort((a, n) => {
|
|
209
|
+
const o = s.value.orderMap.get(a) ?? Number.MAX_SAFE_INTEGER, d = s.value.orderMap.get(n) ?? Number.MAX_SAFE_INTEGER;
|
|
209
210
|
return o - d;
|
|
210
211
|
});
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
-
return Array.from(
|
|
214
|
-
const a =
|
|
215
|
-
return a ===
|
|
213
|
+
function Me() {
|
|
214
|
+
return Array.from(s.value.orderMap.keys()).sort((e, l) => {
|
|
215
|
+
const a = s.value.levelMap.get(e) ?? 0, n = s.value.levelMap.get(l) ?? 0;
|
|
216
|
+
return a === n ? (s.value.orderMap.get(l) ?? 0) - (s.value.orderMap.get(e) ?? 0) : n - a;
|
|
216
217
|
});
|
|
217
218
|
}
|
|
218
|
-
function
|
|
219
|
-
const a = [],
|
|
220
|
-
(l || o !== e) && a.push(o), (
|
|
221
|
-
|
|
219
|
+
function ol(e, l = !1) {
|
|
220
|
+
const a = [], n = (o) => {
|
|
221
|
+
(l || o !== e) && a.push(o), (s.value.childrenMap.get(o) ?? []).forEach((d) => {
|
|
222
|
+
n(d);
|
|
222
223
|
});
|
|
223
224
|
};
|
|
224
|
-
return
|
|
225
|
+
return n(e), a;
|
|
225
226
|
}
|
|
226
|
-
function
|
|
227
|
+
function xe(e) {
|
|
227
228
|
const l = /* @__PURE__ */ new Set();
|
|
228
|
-
if (
|
|
229
|
+
if (j.value)
|
|
229
230
|
return e.forEach((o) => {
|
|
230
|
-
|
|
231
|
-
}),
|
|
231
|
+
s.value.checkableSet.has(o) && l.add(o);
|
|
232
|
+
}), V(Array.from(l));
|
|
232
233
|
const a = (o) => {
|
|
233
|
-
|
|
234
|
+
s.value.checkableSet.has(o) && (l.add(o), (s.value.childrenMap.get(o) ?? []).forEach((d) => {
|
|
234
235
|
a(d);
|
|
235
236
|
}));
|
|
236
237
|
};
|
|
237
238
|
return e.forEach((o) => {
|
|
238
239
|
a(o);
|
|
239
|
-
}),
|
|
240
|
-
if (!
|
|
241
|
-
const d = (
|
|
240
|
+
}), Me().forEach((o) => {
|
|
241
|
+
if (!s.value.checkableSet.has(o)) return;
|
|
242
|
+
const d = (s.value.childrenMap.get(o) ?? []).filter((T) => s.value.checkableSet.has(T));
|
|
242
243
|
if (!d.length) return;
|
|
243
|
-
d.every((
|
|
244
|
-
}),
|
|
244
|
+
d.every((T) => l.has(T)) ? l.add(o) : l.delete(o);
|
|
245
|
+
}), V(Array.from(l));
|
|
245
246
|
}
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
() => [
|
|
247
|
+
const K = L([]);
|
|
248
|
+
Nl(
|
|
249
|
+
() => [se.value, p.value, j.value, s.value.orderMap.size],
|
|
249
250
|
() => {
|
|
250
|
-
if (!
|
|
251
|
-
|
|
251
|
+
if (!p.value) {
|
|
252
|
+
K.value = [];
|
|
252
253
|
return;
|
|
253
254
|
}
|
|
254
|
-
|
|
255
|
+
K.value = xe(se.value);
|
|
255
256
|
},
|
|
256
257
|
{ immediate: !0, deep: !0 }
|
|
257
258
|
);
|
|
258
|
-
function
|
|
259
|
-
const l =
|
|
260
|
-
if (!
|
|
259
|
+
function rl(e) {
|
|
260
|
+
const l = V(e);
|
|
261
|
+
if (!p.value || j.value) return l;
|
|
261
262
|
const a = new Set(l);
|
|
262
|
-
return
|
|
263
|
-
let o =
|
|
263
|
+
return ke.value === "child" ? l.filter((n) => (s.value.childrenMap.get(n) ?? []).filter((d) => s.value.checkableSet.has(d)).length === 0) : ke.value === "parent" ? l.filter((n) => {
|
|
264
|
+
let o = s.value.parentMap.get(n);
|
|
264
265
|
for (; o !== void 0; ) {
|
|
265
266
|
if (a.has(o))
|
|
266
267
|
return !1;
|
|
267
|
-
o =
|
|
268
|
+
o = s.value.parentMap.get(o);
|
|
268
269
|
}
|
|
269
270
|
return !0;
|
|
270
271
|
}) : l;
|
|
271
272
|
}
|
|
272
|
-
function
|
|
273
|
-
const l =
|
|
273
|
+
function nl(e) {
|
|
274
|
+
const l = V(e);
|
|
274
275
|
if (t.labelInValue) {
|
|
275
|
-
const a = l.map((
|
|
276
|
-
value:
|
|
277
|
-
label: re(
|
|
276
|
+
const a = l.map((n) => ({
|
|
277
|
+
value: n,
|
|
278
|
+
label: re(n, Ye.value.get(n))
|
|
278
279
|
}));
|
|
279
|
-
return
|
|
280
|
+
return v.value ? a : a[0];
|
|
280
281
|
}
|
|
281
|
-
return
|
|
282
|
+
return v.value ? l : l[0];
|
|
282
283
|
}
|
|
283
|
-
function
|
|
284
|
-
const a =
|
|
285
|
-
|
|
284
|
+
function Ke(e, l) {
|
|
285
|
+
const a = nl(e);
|
|
286
|
+
me.value || (_e.value = a), g("update:modelValue", a), g("change", a), u == null || u.notifyChange(), p.value && l && (K.value = V(l));
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
-
const l =
|
|
289
|
-
|
|
288
|
+
function ue(e) {
|
|
289
|
+
const l = v.value ? V(e) : V(e).slice(0, 1);
|
|
290
|
+
Ke(l), v.value || x(!1), !Q.value && w.value && A("", !1);
|
|
290
291
|
}
|
|
291
292
|
function W(e) {
|
|
292
|
-
const l =
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
const
|
|
296
|
-
function
|
|
297
|
-
const a = l[
|
|
298
|
-
return
|
|
299
|
-
}
|
|
300
|
-
const Te =
|
|
301
|
-
if (t.disableFilter || !
|
|
302
|
-
const e = /* @__PURE__ */ new Set(), l = t.filterTreeNode ??
|
|
303
|
-
return
|
|
304
|
-
l(
|
|
293
|
+
const l = xe(e), a = rl(l);
|
|
294
|
+
Ke(a, l), !Q.value && w.value && A("", !1);
|
|
295
|
+
}
|
|
296
|
+
const z = r(() => w.value.trim());
|
|
297
|
+
function sl(e, l) {
|
|
298
|
+
const a = l[I.value];
|
|
299
|
+
return M(a) ? String(a).toLowerCase().includes(e.toLowerCase()) : !1;
|
|
300
|
+
}
|
|
301
|
+
const Te = r(() => {
|
|
302
|
+
if (t.disableFilter || !z.value) return;
|
|
303
|
+
const e = /* @__PURE__ */ new Set(), l = t.filterTreeNode ?? sl;
|
|
304
|
+
return s.value.flatNodes.forEach((a) => {
|
|
305
|
+
l(z.value, a.node) && (e.add(a.key), a.parentKeys.forEach((n) => e.add(n)));
|
|
305
306
|
}), e;
|
|
306
|
-
}), ul =
|
|
307
|
-
if (!(t.disableFilter || !
|
|
307
|
+
}), ul = r(() => {
|
|
308
|
+
if (!(t.disableFilter || !z.value))
|
|
308
309
|
return (e) => {
|
|
309
310
|
var a;
|
|
310
|
-
const l = e[
|
|
311
|
-
return
|
|
311
|
+
const l = e[I.value];
|
|
312
|
+
return M(l) ? ((a = Te.value) == null ? void 0 : a.has(l)) ?? !1 : !1;
|
|
312
313
|
};
|
|
313
|
-
}), ie =
|
|
314
|
+
}), ie = r(() => {
|
|
314
315
|
var e;
|
|
315
|
-
return
|
|
316
|
-
}),
|
|
316
|
+
return s.value.flatNodes.length ? t.disableFilter || !z.value ? !1 : (((e = Te.value) == null ? void 0 : e.size) ?? 0) === 0 : !0;
|
|
317
|
+
}), il = r(() => {
|
|
317
318
|
var e;
|
|
318
319
|
return t.scrollbar !== !1 && !((e = t.treeProps) != null && e.virtualListProps);
|
|
319
|
-
}),
|
|
320
|
+
}), cl = r(() => t.scrollbar && typeof t.scrollbar == "object" ? t.scrollbar : {}), dl = r(() => {
|
|
320
321
|
var e;
|
|
321
322
|
return [
|
|
322
323
|
"x-tree-select__panel",
|
|
323
324
|
t.dropdownClassName,
|
|
324
325
|
(e = t.triggerProps) == null ? void 0 : e.contentClass
|
|
325
326
|
];
|
|
326
|
-
}),
|
|
327
|
+
}), fl = r(() => {
|
|
327
328
|
var l;
|
|
328
329
|
const e = { ...t.dropdownStyle ?? {} };
|
|
329
330
|
return (l = t.treeProps) != null && l.virtualListProps && (e.maxHeight = "unset"), e;
|
|
330
|
-
}),
|
|
331
|
+
}), pl = r(() => {
|
|
332
|
+
if (!z.value) return;
|
|
333
|
+
const e = Array.from(s.value.childrenMap.entries()).filter(([, l]) => l.length > 0).map(([l]) => l);
|
|
334
|
+
return V(e);
|
|
335
|
+
}), vl = r(() => {
|
|
336
|
+
var a;
|
|
337
|
+
const e = (a = t.treeProps) == null ? void 0 : a.expandedKeys, l = pl.value;
|
|
338
|
+
return l ? V([
|
|
339
|
+
...e ?? [],
|
|
340
|
+
...l
|
|
341
|
+
]) : e;
|
|
342
|
+
});
|
|
343
|
+
async function hl(e) {
|
|
344
|
+
if (!t.loadMore) return;
|
|
345
|
+
const l = e[I.value], a = M(l) ? s.value.originNodeMap.get(l) ?? e : e;
|
|
346
|
+
await t.loadMore(a);
|
|
347
|
+
}
|
|
348
|
+
const yl = r(() => {
|
|
349
|
+
var m;
|
|
331
350
|
const {
|
|
332
351
|
data: e,
|
|
333
352
|
fieldNames: l,
|
|
334
353
|
size: a,
|
|
335
|
-
loadMore:
|
|
354
|
+
loadMore: n,
|
|
336
355
|
filterTreeNode: o,
|
|
337
356
|
searchValue: d,
|
|
338
357
|
checkable: Y,
|
|
339
|
-
selectable:
|
|
340
|
-
multiple:
|
|
341
|
-
checkedKeys:
|
|
342
|
-
selectedKeys:
|
|
358
|
+
selectable: T,
|
|
359
|
+
multiple: de,
|
|
360
|
+
checkedKeys: ze,
|
|
361
|
+
selectedKeys: fe,
|
|
362
|
+
expandedKeys: Vl,
|
|
343
363
|
checkedStrategy: H,
|
|
344
|
-
checkStrictly:
|
|
364
|
+
checkStrictly: D,
|
|
345
365
|
...N
|
|
346
366
|
} = t.treeProps ?? {};
|
|
347
367
|
return {
|
|
368
|
+
actionOnNodeClick: t.selectable === "leaf" ? "expand" : void 0,
|
|
348
369
|
...N,
|
|
349
|
-
data:
|
|
370
|
+
data: s.value.clonedData,
|
|
350
371
|
fieldNames: t.fieldNames,
|
|
351
|
-
size:
|
|
352
|
-
loadMore: t.loadMore,
|
|
372
|
+
size: be.value,
|
|
373
|
+
loadMore: t.loadMore ? hl : void 0,
|
|
353
374
|
filterTreeNode: ul.value,
|
|
354
|
-
searchValue:
|
|
355
|
-
multiple:
|
|
356
|
-
|
|
375
|
+
searchValue: z.value,
|
|
376
|
+
multiple: v.value,
|
|
377
|
+
blockNode: ((m = t.treeProps) == null ? void 0 : m.blockNode) ?? !0,
|
|
378
|
+
checkable: p.value,
|
|
357
379
|
selectable: !0,
|
|
358
380
|
checkedStrategy: "all",
|
|
359
|
-
checkStrictly:
|
|
360
|
-
|
|
361
|
-
|
|
381
|
+
checkStrictly: j.value,
|
|
382
|
+
expandedKeys: vl.value,
|
|
383
|
+
checkedKeys: p.value ? K.value : void 0,
|
|
384
|
+
selectedKeys: p.value ? [] : se.value
|
|
362
385
|
};
|
|
363
386
|
});
|
|
364
|
-
function
|
|
365
|
-
|
|
387
|
+
function A(e, l = !1) {
|
|
388
|
+
Je.value || (Se.value = e), g("update:inputValue", e), g("update:searchValue", e), g("inputValueChange", e), g("input-value-change", e), l && g("search", e);
|
|
366
389
|
}
|
|
367
|
-
function
|
|
368
|
-
if (!(f.value && e) && e !==
|
|
369
|
-
if (
|
|
370
|
-
|
|
390
|
+
function x(e) {
|
|
391
|
+
if (!(f.value && e) && e !== h.value) {
|
|
392
|
+
if (Ue.value || (Ce.value = e), g("update:popupVisible", e), g("update:open", e), g("popup-visible-change", e), g("popupVisibleChange", e), e) {
|
|
393
|
+
_.value && je(() => {
|
|
371
394
|
var l;
|
|
372
|
-
(l =
|
|
395
|
+
(l = P.value) == null || l.focus();
|
|
373
396
|
});
|
|
374
397
|
return;
|
|
375
398
|
}
|
|
376
|
-
!Q.value &&
|
|
399
|
+
!Q.value && w.value && A("", !1);
|
|
377
400
|
}
|
|
378
401
|
}
|
|
379
|
-
function
|
|
402
|
+
function Ne() {
|
|
380
403
|
if (!f.value) {
|
|
381
|
-
if (
|
|
382
|
-
|
|
404
|
+
if (_.value) {
|
|
405
|
+
x(!0), je(() => {
|
|
383
406
|
var e;
|
|
384
|
-
(e =
|
|
407
|
+
(e = P.value) == null || e.focus();
|
|
385
408
|
});
|
|
386
409
|
return;
|
|
387
410
|
}
|
|
388
|
-
|
|
411
|
+
x(!h.value);
|
|
389
412
|
}
|
|
390
413
|
}
|
|
391
|
-
function
|
|
392
|
-
e !==
|
|
393
|
-
}
|
|
394
|
-
function Ne(e) {
|
|
395
|
-
const l = e.target.value;
|
|
396
|
-
P(l, !0), s == null || s.notifyInput(e), y.value || T(!0);
|
|
414
|
+
function gl(e) {
|
|
415
|
+
e !== h.value && x(e);
|
|
397
416
|
}
|
|
398
417
|
function Ee(e) {
|
|
399
|
-
|
|
418
|
+
const l = e.target.value;
|
|
419
|
+
A(l, !0), u == null || u.notifyInput(e), h.value || x(!0);
|
|
400
420
|
}
|
|
401
421
|
function Fe(e) {
|
|
402
|
-
|
|
422
|
+
u == null || u.notifyBlur(e), !Q.value && w.value && A("", !1);
|
|
423
|
+
}
|
|
424
|
+
function $e(e) {
|
|
425
|
+
u == null || u.notifyFocus(e), h.value || x(!0);
|
|
403
426
|
}
|
|
404
|
-
function
|
|
405
|
-
|
|
427
|
+
function bl(e) {
|
|
428
|
+
_.value || u == null || u.notifyFocus(e);
|
|
406
429
|
}
|
|
407
|
-
function
|
|
408
|
-
|
|
430
|
+
function kl(e) {
|
|
431
|
+
_.value || u == null || u.notifyBlur(e);
|
|
409
432
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
412
|
-
if (!
|
|
413
|
-
const a = (
|
|
433
|
+
function ml(e) {
|
|
434
|
+
Me().forEach((l) => {
|
|
435
|
+
if (!s.value.checkableSet.has(l)) return;
|
|
436
|
+
const a = (s.value.childrenMap.get(l) ?? []).filter((o) => s.value.checkableSet.has(o));
|
|
414
437
|
if (!a.length) return;
|
|
415
438
|
a.every((o) => e.has(o)) ? e.add(l) : e.delete(l);
|
|
416
439
|
});
|
|
417
440
|
}
|
|
418
|
-
function
|
|
419
|
-
const l = new Set(
|
|
420
|
-
|
|
441
|
+
function Pe(e) {
|
|
442
|
+
const l = new Set(K.value);
|
|
443
|
+
j.value ? l.delete(e) : ([e, ...ol(e)].forEach((a) => {
|
|
421
444
|
l.delete(a);
|
|
422
|
-
}),
|
|
445
|
+
}), ml(l)), W(Array.from(l));
|
|
423
446
|
}
|
|
424
|
-
function
|
|
425
|
-
if (
|
|
447
|
+
function Cl(e) {
|
|
448
|
+
if (p.value) {
|
|
426
449
|
const l = e[e.length - 1];
|
|
427
|
-
if (!
|
|
428
|
-
if (
|
|
429
|
-
|
|
450
|
+
if (!M(l) || !s.value.checkableSet.has(l)) return;
|
|
451
|
+
if (K.value.includes(l)) {
|
|
452
|
+
Pe(l);
|
|
430
453
|
return;
|
|
431
454
|
}
|
|
432
|
-
W([...
|
|
455
|
+
W([...K.value, l]);
|
|
433
456
|
return;
|
|
434
457
|
}
|
|
435
|
-
|
|
458
|
+
ue(e);
|
|
436
459
|
}
|
|
437
|
-
function
|
|
438
|
-
|
|
460
|
+
function Sl(e) {
|
|
461
|
+
p.value && W(e);
|
|
439
462
|
}
|
|
440
|
-
function
|
|
441
|
-
e.stopPropagation(),
|
|
463
|
+
function _l(e) {
|
|
464
|
+
e.stopPropagation(), p.value ? W([]) : ue([]), A("", !1), g("clear");
|
|
442
465
|
}
|
|
443
466
|
function Ie(e, l) {
|
|
444
467
|
if (l.stopPropagation(), f.value || !e.closable) return;
|
|
445
|
-
if (
|
|
446
|
-
|
|
468
|
+
if (p.value) {
|
|
469
|
+
Pe(e.key);
|
|
447
470
|
return;
|
|
448
471
|
}
|
|
449
|
-
const a = k.value.filter((
|
|
450
|
-
|
|
472
|
+
const a = k.value.filter((n) => n.key !== e.key).map((n) => n.key);
|
|
473
|
+
ue(a);
|
|
451
474
|
}
|
|
452
475
|
function ce(e) {
|
|
453
476
|
if (!f.value) {
|
|
454
|
-
if (e.key === "Escape" &&
|
|
455
|
-
e.preventDefault(),
|
|
477
|
+
if (e.key === "Escape" && h.value) {
|
|
478
|
+
e.preventDefault(), x(!1);
|
|
456
479
|
return;
|
|
457
480
|
}
|
|
458
481
|
if (e.key === "ArrowDown" || e.key === "Enter") {
|
|
459
|
-
|
|
482
|
+
h.value || (e.preventDefault(), x(!0));
|
|
460
483
|
return;
|
|
461
484
|
}
|
|
462
|
-
if (e.key === "Backspace" &&
|
|
485
|
+
if (e.key === "Backspace" && v.value && _.value && w.value.length === 0 && k.value.length > 0) {
|
|
463
486
|
const l = [...k.value].reverse().find((a) => a.closable);
|
|
464
487
|
if (!l) return;
|
|
465
488
|
e.preventDefault(), Ie(l, e);
|
|
466
489
|
}
|
|
467
490
|
}
|
|
468
491
|
}
|
|
469
|
-
function
|
|
492
|
+
function wl(e) {
|
|
470
493
|
return oe(e);
|
|
471
494
|
}
|
|
472
|
-
return
|
|
495
|
+
return Xe({
|
|
473
496
|
focus: () => {
|
|
474
497
|
var e;
|
|
475
|
-
return (e =
|
|
498
|
+
return (e = P.value) == null ? void 0 : e.focus();
|
|
476
499
|
},
|
|
477
500
|
blur: () => {
|
|
478
501
|
var e;
|
|
479
|
-
return (e =
|
|
502
|
+
return (e = P.value) == null ? void 0 : e.blur();
|
|
480
503
|
}
|
|
481
|
-
}), (e, l) => (i(), le(
|
|
504
|
+
}), (e, l) => (i(), le(Il, ve(S.triggerProps, {
|
|
482
505
|
class: "x-tree-select__trigger-wrapper",
|
|
483
|
-
"popup-visible":
|
|
484
|
-
"popup-container":
|
|
506
|
+
"popup-visible": h.value,
|
|
507
|
+
"popup-container": S.popupContainer,
|
|
485
508
|
disabled: f.value,
|
|
486
509
|
trigger: [],
|
|
487
510
|
position: "bottom-start",
|
|
488
|
-
"click-to-close": !
|
|
511
|
+
"click-to-close": !_.value,
|
|
489
512
|
"unmount-on-close": !1,
|
|
490
513
|
"auto-fit-popup-min-width": !0,
|
|
491
|
-
"content-class":
|
|
492
|
-
"content-style":
|
|
493
|
-
"onUpdate:popupVisible":
|
|
514
|
+
"content-class": dl.value,
|
|
515
|
+
"content-style": fl.value,
|
|
516
|
+
"onUpdate:popupVisible": gl
|
|
494
517
|
}), {
|
|
495
518
|
default: E(() => {
|
|
496
|
-
var a,
|
|
519
|
+
var a, n;
|
|
497
520
|
return [
|
|
498
521
|
e.$slots.trigger ? (i(), c("div", {
|
|
499
522
|
key: 0,
|
|
500
523
|
class: q(["x-tree-select__custom-trigger", { "is-disabled": f.value }]),
|
|
501
|
-
onClick:
|
|
524
|
+
onClick: Ne
|
|
502
525
|
}, [
|
|
503
526
|
b(e.$slots, "trigger", {
|
|
504
|
-
value:
|
|
505
|
-
open:
|
|
527
|
+
value: we.value,
|
|
528
|
+
open: h.value
|
|
506
529
|
}, void 0, !0)
|
|
507
530
|
], 2)) : (i(), c("div", {
|
|
508
531
|
key: 1,
|
|
509
532
|
class: q(["x-tree-select", [
|
|
510
|
-
|
|
533
|
+
B(Dl)(be.value),
|
|
511
534
|
{
|
|
512
|
-
"is-open":
|
|
535
|
+
"is-open": h.value,
|
|
513
536
|
"is-disabled": f.value,
|
|
514
|
-
"is-error":
|
|
515
|
-
"is-multiple":
|
|
516
|
-
"is-borderless": !
|
|
537
|
+
"is-error": S.error,
|
|
538
|
+
"is-multiple": v.value,
|
|
539
|
+
"is-borderless": !S.border
|
|
517
540
|
}
|
|
518
541
|
]]),
|
|
519
|
-
tabindex: f.value ||
|
|
542
|
+
tabindex: f.value || _.value ? -1 : 0,
|
|
520
543
|
onMouseenter: l[2] || (l[2] = (o) => ae.value = !0),
|
|
521
544
|
onMouseleave: l[3] || (l[3] = (o) => ae.value = !1),
|
|
522
|
-
onFocus:
|
|
523
|
-
onBlur:
|
|
545
|
+
onFocus: bl,
|
|
546
|
+
onBlur: kl,
|
|
524
547
|
onKeydown: ce
|
|
525
548
|
}, [
|
|
526
549
|
F("div", {
|
|
527
550
|
class: q(["x-tree-select__control x-tree-select__trigger", {
|
|
528
|
-
"x-tree-select__trigger--focused":
|
|
551
|
+
"x-tree-select__trigger--focused": h.value,
|
|
529
552
|
"x-tree-select__trigger--disabled": f.value,
|
|
530
|
-
"x-tree-select__trigger--multiple":
|
|
553
|
+
"x-tree-select__trigger--multiple": v.value
|
|
531
554
|
}]),
|
|
532
|
-
onClick:
|
|
555
|
+
onClick: Ne
|
|
533
556
|
}, [
|
|
534
|
-
e.$slots.prefix ? (i(), c("span",
|
|
557
|
+
e.$slots.prefix ? (i(), c("span", jl, [
|
|
535
558
|
b(e.$slots, "prefix", {}, void 0, !0)
|
|
536
559
|
])) : $("", !0),
|
|
537
|
-
F("div",
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
(i(!0), c(
|
|
560
|
+
F("div", Xl, [
|
|
561
|
+
v.value ? (i(), c("div", Hl, [
|
|
562
|
+
X.value.length ? (i(), c(he, { key: 0 }, [
|
|
563
|
+
(i(!0), c(he, null, $l(X.value, (o) => (i(), c("span", {
|
|
541
564
|
key: o.key,
|
|
542
565
|
class: "x-tree-select__tag"
|
|
543
566
|
}, [
|
|
544
|
-
F("span",
|
|
567
|
+
F("span", ql, [
|
|
545
568
|
b(e.$slots, "label", {
|
|
546
569
|
data: o.data
|
|
547
570
|
}, () => [
|
|
548
|
-
|
|
571
|
+
Le(R(o.label), 1)
|
|
549
572
|
], !0)
|
|
550
573
|
]),
|
|
551
574
|
o.closable ? (i(), c("button", {
|
|
@@ -554,76 +577,76 @@ const Al = ["tabindex"], Dl = {
|
|
|
554
577
|
class: "x-tree-select__tag-remove",
|
|
555
578
|
onClick: (d) => Ie(o, d)
|
|
556
579
|
}, [
|
|
557
|
-
te(
|
|
580
|
+
te(B(G), {
|
|
558
581
|
name: "guanbi",
|
|
559
582
|
size: 10
|
|
560
583
|
})
|
|
561
|
-
], 8,
|
|
584
|
+
], 8, Gl)) : $("", !0)
|
|
562
585
|
]))), 128)),
|
|
563
|
-
|
|
586
|
+
Be.value > 0 ? (i(), c("span", Ul, " +" + R(Be.value), 1)) : $("", !0)
|
|
564
587
|
], 64)) : $("", !0),
|
|
565
|
-
|
|
588
|
+
_.value ? (i(), c("input", {
|
|
566
589
|
key: 1,
|
|
567
590
|
ref_key: "inputRef",
|
|
568
|
-
ref:
|
|
591
|
+
ref: P,
|
|
569
592
|
class: "x-tree-select__search x-tree-select__input",
|
|
570
|
-
value:
|
|
571
|
-
placeholder:
|
|
593
|
+
value: w.value,
|
|
594
|
+
placeholder: X.value.length ? "" : J.value,
|
|
572
595
|
disabled: f.value,
|
|
573
|
-
id: (a =
|
|
574
|
-
onInput:
|
|
575
|
-
onFocus:
|
|
576
|
-
onBlur:
|
|
596
|
+
id: (a = B(u)) == null ? void 0 : a.id,
|
|
597
|
+
onInput: Ee,
|
|
598
|
+
onFocus: $e,
|
|
599
|
+
onBlur: Fe,
|
|
577
600
|
onKeydown: ce,
|
|
578
601
|
onClick: l[0] || (l[0] = Re(() => {
|
|
579
602
|
}, ["stop"]))
|
|
580
|
-
}, null, 40,
|
|
581
|
-
])) : (i(), c(
|
|
582
|
-
|
|
603
|
+
}, null, 40, Jl)) : X.value.length ? $("", !0) : (i(), c("span", Ql, R(J.value), 1))
|
|
604
|
+
])) : (i(), c(he, { key: 1 }, [
|
|
605
|
+
_.value ? (i(), c("input", {
|
|
583
606
|
key: 0,
|
|
584
607
|
ref_key: "inputRef",
|
|
585
|
-
ref:
|
|
608
|
+
ref: P,
|
|
586
609
|
class: "x-tree-select__search x-tree-select__input",
|
|
587
|
-
value:
|
|
610
|
+
value: tl.value,
|
|
588
611
|
placeholder: J.value,
|
|
589
612
|
disabled: f.value,
|
|
590
|
-
id: (
|
|
591
|
-
onInput:
|
|
592
|
-
onFocus:
|
|
593
|
-
onBlur:
|
|
613
|
+
id: (n = B(u)) == null ? void 0 : n.id,
|
|
614
|
+
onInput: Ee,
|
|
615
|
+
onFocus: $e,
|
|
616
|
+
onBlur: Fe,
|
|
594
617
|
onKeydown: ce,
|
|
595
618
|
onClick: l[1] || (l[1] = Re(() => {
|
|
596
619
|
}, ["stop"]))
|
|
597
|
-
}, null, 40,
|
|
620
|
+
}, null, 40, Wl)) : k.value.length ? (i(), c("span", Yl, [
|
|
598
621
|
b(e.$slots, "label", {
|
|
599
622
|
data: k.value[0].data
|
|
600
623
|
}, () => [
|
|
601
|
-
|
|
624
|
+
Le(R(k.value[0].label), 1)
|
|
602
625
|
], !0)
|
|
603
|
-
])) : (i(), c("span",
|
|
626
|
+
])) : (i(), c("span", Zl, R(J.value), 1))
|
|
604
627
|
], 64))
|
|
605
628
|
]),
|
|
606
|
-
F("span",
|
|
607
|
-
|
|
629
|
+
F("span", et, [
|
|
630
|
+
al.value ? (i(), c("button", {
|
|
608
631
|
key: 0,
|
|
609
632
|
type: "button",
|
|
610
633
|
class: "x-tree-select__clear",
|
|
611
|
-
onClick:
|
|
634
|
+
onClick: _l
|
|
612
635
|
}, [
|
|
613
|
-
te(
|
|
636
|
+
te(B(G), {
|
|
614
637
|
name: "guanbi",
|
|
615
638
|
size: 12
|
|
616
639
|
})
|
|
617
640
|
])) : (i(), c("span", {
|
|
618
641
|
key: 1,
|
|
619
|
-
class: q(["x-tree-select__icon", { "is-open":
|
|
642
|
+
class: q(["x-tree-select__icon", { "is-open": h.value }])
|
|
620
643
|
}, [
|
|
621
|
-
|
|
644
|
+
S.loading ? (i(), le(B(G), {
|
|
622
645
|
key: 0,
|
|
623
646
|
name: "jiazai",
|
|
624
647
|
size: 12,
|
|
625
648
|
spin: ""
|
|
626
|
-
})) : (i(), le(
|
|
649
|
+
})) : (i(), le(B(G), {
|
|
627
650
|
key: 1,
|
|
628
651
|
name: "xiangxia",
|
|
629
652
|
size: 12
|
|
@@ -631,7 +654,7 @@ const Al = ["tabindex"], Dl = {
|
|
|
631
654
|
], 2))
|
|
632
655
|
])
|
|
633
656
|
], 2)
|
|
634
|
-
], 42,
|
|
657
|
+
], 42, Rl))
|
|
635
658
|
];
|
|
636
659
|
}),
|
|
637
660
|
content: E(() => [
|
|
@@ -641,34 +664,34 @@ const Al = ["tabindex"], Dl = {
|
|
|
641
664
|
"x-tree-select__dropdown--has-footer": !!e.$slots.footer
|
|
642
665
|
}])
|
|
643
666
|
}, [
|
|
644
|
-
e.$slots.header && (!ie.value ||
|
|
667
|
+
e.$slots.header && (!ie.value || S.showHeaderOnEmpty) ? (i(), c("div", lt, [
|
|
645
668
|
b(e.$slots, "header", {}, void 0, !0)
|
|
646
669
|
])) : $("", !0),
|
|
647
|
-
|
|
648
|
-
F("div",
|
|
649
|
-
te(
|
|
670
|
+
S.loading ? b(e.$slots, "loader", { key: 1 }, () => [
|
|
671
|
+
F("div", tt, [
|
|
672
|
+
te(B(G), {
|
|
650
673
|
name: "jiazai",
|
|
651
674
|
size: 14,
|
|
652
675
|
spin: ""
|
|
653
676
|
})
|
|
654
677
|
])
|
|
655
678
|
], !0) : ie.value ? b(e.$slots, "empty", { key: 2 }, () => [
|
|
656
|
-
F("div",
|
|
657
|
-
], !0) : (i(), le(
|
|
679
|
+
F("div", at, R(B(ye)("tree.emptyText", void 0, "暂无数据")), 1)
|
|
680
|
+
], !0) : (i(), le(El(il.value ? Pl : "div"), ve({
|
|
658
681
|
key: 3,
|
|
659
682
|
class: "x-tree-select__tree-wrapper"
|
|
660
|
-
},
|
|
683
|
+
}, cl.value), {
|
|
661
684
|
default: E(() => [
|
|
662
|
-
te(
|
|
663
|
-
onSelect:
|
|
664
|
-
onCheck:
|
|
665
|
-
}),
|
|
685
|
+
te(zl, ve(yl.value, {
|
|
686
|
+
onSelect: Cl,
|
|
687
|
+
onCheck: Sl
|
|
688
|
+
}), Fl({ _: 2 }, [
|
|
666
689
|
e.$slots["tree-slot-title"] ? {
|
|
667
690
|
name: "title",
|
|
668
691
|
fn: E(({ node: a }) => [
|
|
669
692
|
b(e.$slots, "tree-slot-title", {
|
|
670
693
|
node: a,
|
|
671
|
-
title:
|
|
694
|
+
title: wl(a)
|
|
672
695
|
}, void 0, !0)
|
|
673
696
|
]),
|
|
674
697
|
key: "0"
|
|
@@ -689,10 +712,10 @@ const Al = ["tabindex"], Dl = {
|
|
|
689
712
|
} : void 0,
|
|
690
713
|
e.$slots["tree-slot-switcher-icon"] ? {
|
|
691
714
|
name: "switcherIcon",
|
|
692
|
-
fn: E(({ node: a, expanded:
|
|
715
|
+
fn: E(({ node: a, expanded: n }) => [
|
|
693
716
|
b(e.$slots, "tree-slot-switcher-icon", {
|
|
694
717
|
node: a,
|
|
695
|
-
expanded:
|
|
718
|
+
expanded: n
|
|
696
719
|
}, void 0, !0)
|
|
697
720
|
]),
|
|
698
721
|
key: "3"
|
|
@@ -701,7 +724,7 @@ const Al = ["tabindex"], Dl = {
|
|
|
701
724
|
]),
|
|
702
725
|
_: 3
|
|
703
726
|
}, 16)),
|
|
704
|
-
e.$slots.footer && (!ie.value ||
|
|
727
|
+
e.$slots.footer && (!ie.value || S.showFooterOnEmpty) ? (i(), c("div", ot, [
|
|
705
728
|
b(e.$slots, "footer", {}, void 0, !0)
|
|
706
729
|
])) : $("", !0)
|
|
707
730
|
], 2)
|
|
@@ -711,5 +734,5 @@ const Al = ["tabindex"], Dl = {
|
|
|
711
734
|
}
|
|
712
735
|
});
|
|
713
736
|
export {
|
|
714
|
-
|
|
737
|
+
pt as default
|
|
715
738
|
};
|