geekin-devtoys 0.3.3 → 0.3.4
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/AnimatePresence-CXPNzIHs.js +9 -0
- package/lib/AnimatePresence-DkTyYbzH.mjs +136 -0
- package/lib/GCard/index.js +1 -1
- package/lib/GCard/index.mjs +105 -101
- package/lib/GCard/style.css +1 -1
- package/lib/GDialog/index.js +1 -1
- package/lib/GDialog/index.mjs +220 -206
- package/lib/GDialog/style.css +1 -1
- package/lib/GInputTreeTag/index.js +1 -9
- package/lib/GInputTreeTag/index.mjs +185 -315
- package/lib/GScroller/index.mjs +12 -12
- package/lib/components/GBubble/index.d.ts +1 -1
- package/lib/components/GCard/index.d.ts +6 -0
- package/lib/components/GFuzzyText/index.d.ts +1 -1
- package/lib/components/GInputTreeTag/index.d.ts +7 -6
- package/lib/components/GPie3D/index.d.ts +1 -1
- package/lib/components/GProgress/index.d.ts +1 -1
- package/lib/components/GRing/index.d.ts +1 -1
- package/lib/components/GScreen/index.d.ts +1 -1
- package/lib/{index-Bi7JS7ve.mjs → index-CVPHcKaV.mjs} +3 -3
- package/package.json +1 -1
|
@@ -1,142 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ElInput as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const c = /* @__PURE__ */ new WeakMap(), f = Xe();
|
|
8
|
-
function a(s) {
|
|
9
|
-
if (d.mode !== "popLayout") return;
|
|
10
|
-
const v = s.offsetParent, S = v instanceof HTMLElement && v.offsetWidth || 0, m = {
|
|
11
|
-
height: s.offsetHeight || 0,
|
|
12
|
-
width: s.offsetWidth || 0,
|
|
13
|
-
top: s.offsetTop,
|
|
14
|
-
left: s.offsetLeft,
|
|
15
|
-
right: 0
|
|
16
|
-
};
|
|
17
|
-
m.right = S - m.width - m.left;
|
|
18
|
-
const C = d.anchorX === "left" ? `left: ${m.left}px` : `right: ${m.right}px`, k = `pop-${Ye++}`;
|
|
19
|
-
s.dataset.motionPopId = k;
|
|
20
|
-
const n = document.createElement("style");
|
|
21
|
-
f.value.nonce && (n.nonce = f.value.nonce), c.set(s, n), document.head.appendChild(n), n.sheet && n.sheet.insertRule(`
|
|
22
|
-
[data-motion-pop-id="${k}"] {
|
|
23
|
-
position: absolute !important;
|
|
24
|
-
width: ${m.width}px !important;
|
|
25
|
-
height: ${m.height}px !important;
|
|
26
|
-
top: ${m.top}px !important;
|
|
27
|
-
${C} !important;
|
|
28
|
-
}
|
|
29
|
-
`);
|
|
30
|
-
}
|
|
31
|
-
function u(s) {
|
|
32
|
-
const v = c.get(s);
|
|
33
|
-
v && (c.delete(s), Ze.render(() => {
|
|
34
|
-
document.head.removeChild(v);
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
addPopStyle: a,
|
|
39
|
-
removePopStyle: u
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
var tt = 0;
|
|
43
|
-
function at(d) {
|
|
44
|
-
const c = String(tt++), f = /* @__PURE__ */ new Map(), { addPopStyle: a, removePopStyle: u } = et(d);
|
|
45
|
-
function s(n) {
|
|
46
|
-
const i = [], l = ue.get(n);
|
|
47
|
-
l && n.getAttribute(de.motionAttribute) === c && i.push(l);
|
|
48
|
-
const g = Array.from(n.querySelectorAll(`[${de.motionAttribute}="${c}"]`));
|
|
49
|
-
for (const V of g) {
|
|
50
|
-
const y = ue.get(V);
|
|
51
|
-
y && i.push(y);
|
|
52
|
-
}
|
|
53
|
-
return i;
|
|
54
|
-
}
|
|
55
|
-
function v(n, i) {
|
|
56
|
-
const l = f.get(n);
|
|
57
|
-
l && (l.remaining.delete(i), l.remaining.size === 0 && m(l));
|
|
58
|
-
}
|
|
59
|
-
const S = {
|
|
60
|
-
initial: d.initial,
|
|
61
|
-
custom: d.custom,
|
|
62
|
-
presenceId: c,
|
|
63
|
-
onMotionExitComplete: v
|
|
64
|
-
};
|
|
65
|
-
Je(S), fe(() => {
|
|
66
|
-
S.initial = void 0;
|
|
67
|
-
});
|
|
68
|
-
function m(n) {
|
|
69
|
-
u(n.el), n.states.forEach((i) => {
|
|
70
|
-
i.getSnapshot(i.options, !1);
|
|
71
|
-
}), n.done(), f.delete(n.el), n.el?.isConnected ? n.states[0]?.didUpdate() : n.states.forEach((i) => {
|
|
72
|
-
i.unmount();
|
|
73
|
-
}), d.onExitComplete?.();
|
|
74
|
-
}
|
|
75
|
-
function C(n, i) {
|
|
76
|
-
s(n).forEach((l) => {
|
|
77
|
-
l.setActive("exit", !1), l.getSnapshot(l.options, !0);
|
|
78
|
-
}), i();
|
|
79
|
-
}
|
|
80
|
-
function k(n, i) {
|
|
81
|
-
S.custom = d.custom;
|
|
82
|
-
const l = n, g = s(l);
|
|
83
|
-
if (g.length === 0) {
|
|
84
|
-
i(), d.onExitComplete?.();
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
const V = {
|
|
88
|
-
remaining: new Set(g),
|
|
89
|
-
states: g,
|
|
90
|
-
done: i,
|
|
91
|
-
el: l
|
|
92
|
-
};
|
|
93
|
-
f.set(l, V), a(l), g.forEach((y) => {
|
|
94
|
-
y.presenceContainer = l, y.setActive("exit", !0), y.getSnapshot(y.options, !1);
|
|
95
|
-
}), g[0]?.didUpdate();
|
|
96
|
-
}
|
|
97
|
-
return Te(() => {
|
|
98
|
-
f.forEach((n) => {
|
|
99
|
-
n.states.forEach((i) => {
|
|
100
|
-
i.unmount();
|
|
101
|
-
});
|
|
102
|
-
}), f.clear();
|
|
103
|
-
}), {
|
|
104
|
-
enter: C,
|
|
105
|
-
exit: k
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
var ot = /* @__PURE__ */ me({
|
|
109
|
-
name: "AnimatePresence",
|
|
110
|
-
inheritAttrs: !0,
|
|
111
|
-
__name: "AnimatePresence",
|
|
112
|
-
props: {
|
|
113
|
-
mode: { default: "sync" },
|
|
114
|
-
initial: {
|
|
115
|
-
type: Boolean,
|
|
116
|
-
default: !0
|
|
117
|
-
},
|
|
118
|
-
as: {},
|
|
119
|
-
custom: {},
|
|
120
|
-
onExitComplete: {},
|
|
121
|
-
anchorX: { default: "left" }
|
|
122
|
-
},
|
|
123
|
-
setup(d) {
|
|
124
|
-
const c = d, { enter: f, exit: a } = at(c), u = p(() => c.mode !== "wait" ? { tag: c.as } : { mode: c.mode === "wait" ? "out-in" : void 0 });
|
|
125
|
-
return (s, v) => (_(), K(Be(s.mode === "wait" ? Pe : ze), Re(u.value, {
|
|
126
|
-
appear: "",
|
|
127
|
-
css: !1,
|
|
128
|
-
onLeave: E(a),
|
|
129
|
-
onEnter: E(f)
|
|
130
|
-
}), {
|
|
131
|
-
default: A(() => [P(s.$slots, "default")]),
|
|
132
|
-
_: 3
|
|
133
|
-
}, 16, ["onLeave", "onEnter"]));
|
|
134
|
-
}
|
|
135
|
-
}), pe = ot;
|
|
136
|
-
const nt = {
|
|
1
|
+
import { defineComponent as Le, computed as n, ref as d, watch as Se, nextTick as W, onMounted as Te, onBeforeUnmount as Ae, createElementBlock as M, openBlock as c, normalizeClass as O, createElementVNode as R, createBlock as $, createCommentVNode as z, normalizeStyle as H, createVNode as k, unref as p, withKeys as Ce, Teleport as Oe, withCtx as b, withModifiers as Re, renderSlot as B, createTextVNode as J, toDisplayString as Q, Fragment as $e, renderList as ze } from "vue";
|
|
2
|
+
import { ElInput as He, ElTree as Ne, ElTag as Ke, ElMessage as X } from "element-plus";
|
|
3
|
+
import { m as Y } from "../index-CVPHcKaV.mjs";
|
|
4
|
+
import { A as ee } from "../AnimatePresence-DkTyYbzH.mjs";
|
|
5
|
+
import { _ as je } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
+
const Ue = {
|
|
137
7
|
key: 0,
|
|
138
8
|
class: "g-input-tree-tag__tags"
|
|
139
|
-
},
|
|
9
|
+
}, qe = /* @__PURE__ */ Le({
|
|
140
10
|
__name: "index",
|
|
141
11
|
props: {
|
|
142
12
|
modelValue: { default: () => [] },
|
|
@@ -164,245 +34,245 @@ const nt = {
|
|
|
164
34
|
notFoundMessage: { default: "未找到匹配项" }
|
|
165
35
|
},
|
|
166
36
|
emits: ["update:modelValue", "change", "add", "remove", "node-click", "duplicate", "not-found"],
|
|
167
|
-
setup(
|
|
168
|
-
const
|
|
169
|
-
label:
|
|
170
|
-
children:
|
|
171
|
-
disabled:
|
|
172
|
-
})),
|
|
37
|
+
setup(L, { expose: te, emit: ae }) {
|
|
38
|
+
const l = L, r = ae, le = n(() => ({
|
|
39
|
+
label: l.props.label || "label",
|
|
40
|
+
children: l.props.children || "children",
|
|
41
|
+
disabled: l.props.disabled
|
|
42
|
+
})), oe = n(() => l.props.value || l.nodeKey || "id"), ne = n(() => l.props.label || "label"), re = n(() => l.props.children || "children"), S = n(() => l.props.isLeaf), se = n(() => l.echoProps?.value || "value"), ie = n(() => l.echoProps?.label || "label"), h = (e) => e ? e[oe.value] : void 0, f = (e) => e ? e[ne.value] : "", K = (e) => e ? e[re.value] : void 0, ue = (e) => e?.[se.value] ?? e?.value, de = (e) => e?.[ie.value] ?? e?.label, v = (e) => {
|
|
173
43
|
if (!e) return !1;
|
|
174
|
-
if (typeof
|
|
175
|
-
if (
|
|
176
|
-
const t =
|
|
44
|
+
if (typeof l.selectable == "function") return l.selectable(e);
|
|
45
|
+
if (S.value && e[S.value] !== void 0) return !!e[S.value];
|
|
46
|
+
const t = K(e);
|
|
177
47
|
return !t || !t.length;
|
|
178
|
-
},
|
|
179
|
-
const e = /* @__PURE__ */ new Map(), t = (
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
|
|
48
|
+
}, T = n(() => {
|
|
49
|
+
const e = /* @__PURE__ */ new Map(), t = (a = []) => {
|
|
50
|
+
a.forEach((o) => {
|
|
51
|
+
v(o) && e.set(h(o), o);
|
|
52
|
+
const u = K(o);
|
|
53
|
+
u?.length && t(u);
|
|
184
54
|
});
|
|
185
55
|
};
|
|
186
|
-
return t(
|
|
187
|
-
}),
|
|
188
|
-
const
|
|
56
|
+
return t(l.data || []), e;
|
|
57
|
+
}), s = n(() => (l.modelValue || []).map((t) => {
|
|
58
|
+
const a = l.valueFormat === "object" ? ue(t) : t, o = T.value.get(a), u = l.valueFormat === "object" ? de(t) : void 0;
|
|
189
59
|
return {
|
|
190
|
-
value:
|
|
191
|
-
label:
|
|
192
|
-
raw:
|
|
60
|
+
value: a,
|
|
61
|
+
label: o ? f(o) : u ?? String(a ?? ""),
|
|
62
|
+
raw: o ?? (l.valueFormat === "object" ? t : void 0)
|
|
193
63
|
};
|
|
194
|
-
})),
|
|
64
|
+
})), x = (e) => s.value.some((t) => t.value === e), V = d(""), i = d(!1), j = d(null), U = d(null), q = d(null), m = d(null), ce = (e) => {
|
|
195
65
|
if (!e) {
|
|
196
|
-
|
|
66
|
+
m.value = null;
|
|
197
67
|
return;
|
|
198
68
|
}
|
|
199
|
-
|
|
200
|
-
},
|
|
69
|
+
m.value = e.$el ?? (e instanceof HTMLElement ? e : null);
|
|
70
|
+
}, P = d({}), y = d("bottom"), pe = n(() => ({
|
|
201
71
|
opacity: 0,
|
|
202
72
|
scale: 0.95,
|
|
203
|
-
y:
|
|
204
|
-
})),
|
|
73
|
+
y: y.value === "bottom" ? -8 : 8
|
|
74
|
+
})), fe = { opacity: 1, scale: 1, y: 0 }, ve = n(() => ({
|
|
205
75
|
opacity: 0,
|
|
206
76
|
scale: 0.95,
|
|
207
|
-
y:
|
|
208
|
-
})),
|
|
209
|
-
...
|
|
210
|
-
transformOrigin:
|
|
211
|
-
})),
|
|
212
|
-
() => typeof
|
|
213
|
-
),
|
|
214
|
-
|
|
215
|
-
},
|
|
216
|
-
if (!
|
|
217
|
-
const e =
|
|
77
|
+
y: y.value === "bottom" ? -8 : 8
|
|
78
|
+
})), me = { duration: 0.2, ease: "easeOut" }, ge = n(() => ({
|
|
79
|
+
...P.value,
|
|
80
|
+
transformOrigin: y.value === "bottom" ? "top center" : "bottom center"
|
|
81
|
+
})), be = { opacity: 0, scale: 0.8 }, he = { opacity: 1, scale: 1 }, ye = { opacity: 0, scale: 0.8 }, we = { duration: 0.2, ease: "easeOut" }, Ee = n(
|
|
82
|
+
() => typeof l.width == "number" ? `${l.width}px` : l.width
|
|
83
|
+
), A = () => {
|
|
84
|
+
l.disabled || (i.value = !0);
|
|
85
|
+
}, _ = () => {
|
|
86
|
+
if (!i.value) return;
|
|
87
|
+
const e = q.value, t = m.value;
|
|
218
88
|
if (!e || !t) return;
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
|
|
89
|
+
const a = e.getBoundingClientRect(), o = t.offsetHeight || l.popperMaxHeight, I = window.innerHeight - a.bottom - l.popperOffset, Me = a.top - l.popperOffset, G = I >= o || I >= Me ? "bottom" : "top";
|
|
90
|
+
y.value = G;
|
|
91
|
+
const Be = G === "bottom" ? a.bottom + l.popperOffset : a.top - o - l.popperOffset;
|
|
92
|
+
P.value = {
|
|
223
93
|
position: "fixed",
|
|
224
|
-
top: `${
|
|
225
|
-
left: `${
|
|
226
|
-
width: `${
|
|
227
|
-
zIndex: String(
|
|
94
|
+
top: `${Be}px`,
|
|
95
|
+
left: `${a.left}px`,
|
|
96
|
+
width: `${a.width}px`,
|
|
97
|
+
zIndex: String(l.popperZIndex)
|
|
228
98
|
};
|
|
229
99
|
};
|
|
230
|
-
let
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
100
|
+
let g = null;
|
|
101
|
+
const w = () => {
|
|
102
|
+
i.value && (g && cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
103
|
+
g = null, _();
|
|
234
104
|
}));
|
|
235
105
|
};
|
|
236
|
-
let
|
|
237
|
-
const
|
|
238
|
-
typeof ResizeObserver > "u" || !
|
|
239
|
-
},
|
|
240
|
-
|
|
106
|
+
let E = null;
|
|
107
|
+
const ke = () => {
|
|
108
|
+
typeof ResizeObserver > "u" || !m.value || (E?.disconnect(), E = new ResizeObserver(() => w()), E.observe(m.value));
|
|
109
|
+
}, Z = () => {
|
|
110
|
+
E?.disconnect(), E = null;
|
|
241
111
|
};
|
|
242
|
-
|
|
112
|
+
Se(i, async (e) => {
|
|
243
113
|
if (!e) {
|
|
244
|
-
|
|
114
|
+
Z();
|
|
245
115
|
return;
|
|
246
116
|
}
|
|
247
|
-
await
|
|
117
|
+
await W(), _(), requestAnimationFrame(_), ke();
|
|
248
118
|
});
|
|
249
|
-
const
|
|
250
|
-
if (!
|
|
119
|
+
const D = (e) => {
|
|
120
|
+
if (!i.value) return;
|
|
251
121
|
const t = e.target;
|
|
252
|
-
|
|
122
|
+
U.value?.contains(t) || m.value?.contains(t) || (i.value = !1);
|
|
253
123
|
};
|
|
254
|
-
|
|
255
|
-
document.addEventListener("mousedown",
|
|
256
|
-
}),
|
|
257
|
-
document.removeEventListener("mousedown",
|
|
124
|
+
Te(() => {
|
|
125
|
+
document.addEventListener("mousedown", D, !0), window.addEventListener("scroll", w, !0), window.addEventListener("resize", w);
|
|
126
|
+
}), Ae(() => {
|
|
127
|
+
document.removeEventListener("mousedown", D, !0), window.removeEventListener("scroll", w, !0), window.removeEventListener("resize", w), g && cancelAnimationFrame(g), Z();
|
|
258
128
|
});
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
},
|
|
262
|
-
if (
|
|
129
|
+
const xe = (e) => {
|
|
130
|
+
i.value = !0, j.value?.filter(e), W(_);
|
|
131
|
+
}, Ve = (e, t) => e ? typeof l.filterMethod == "function" ? l.filterMethod(e, t) : String(f(t) ?? "").toLowerCase().includes(String(e).toLowerCase()) : !0, _e = (e, t) => {
|
|
132
|
+
if (r("node-click", e), !v(e)) {
|
|
263
133
|
t && (t.expanded = !t.expanded);
|
|
264
134
|
return;
|
|
265
135
|
}
|
|
266
|
-
|
|
267
|
-
},
|
|
268
|
-
const t =
|
|
136
|
+
C(e), i.value = !1;
|
|
137
|
+
}, Fe = (e) => l.valueFormat === "object" ? { value: e.value, label: e.label, raw: e.raw } : e.value, C = (e) => {
|
|
138
|
+
const t = h(e);
|
|
269
139
|
if (t == null || t === "") return;
|
|
270
|
-
if (
|
|
271
|
-
const
|
|
272
|
-
|
|
140
|
+
if (x(t)) {
|
|
141
|
+
const u = { value: t, label: f(e), raw: e };
|
|
142
|
+
r("duplicate", u), l.duplicateMessage && X.warning(l.duplicateMessage);
|
|
273
143
|
return;
|
|
274
144
|
}
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
if (!
|
|
279
|
-
const e = (
|
|
145
|
+
const a = { value: t, label: f(e), raw: e }, o = [...l.modelValue || [], Fe(a)];
|
|
146
|
+
r("update:modelValue", o), r("add", a), r("change", o, [...s.value, a]), l.clearInputAfterSelect && (V.value = "");
|
|
147
|
+
}, Ie = () => {
|
|
148
|
+
if (!l.enterToAdd) return;
|
|
149
|
+
const e = (V.value || "").trim();
|
|
280
150
|
if (!e) return;
|
|
281
151
|
let t = null;
|
|
282
|
-
for (const
|
|
283
|
-
if (
|
|
284
|
-
t =
|
|
152
|
+
for (const a of T.value.values())
|
|
153
|
+
if (f(a) === e) {
|
|
154
|
+
t = a;
|
|
285
155
|
break;
|
|
286
156
|
}
|
|
287
157
|
if (!t) {
|
|
288
|
-
|
|
158
|
+
r("not-found", e), l.notFoundMessage && X.warning(l.notFoundMessage);
|
|
289
159
|
return;
|
|
290
160
|
}
|
|
291
|
-
|
|
292
|
-
},
|
|
293
|
-
if (e < 0 || e >=
|
|
294
|
-
const t =
|
|
295
|
-
|
|
296
|
-
const
|
|
297
|
-
|
|
161
|
+
C(t);
|
|
162
|
+
}, F = (e) => {
|
|
163
|
+
if (e < 0 || e >= s.value.length) return;
|
|
164
|
+
const t = s.value[e], a = [...l.modelValue || []];
|
|
165
|
+
a.splice(e, 1), r("update:modelValue", a), t && r("remove", t, e);
|
|
166
|
+
const o = s.value.filter((u, I) => I !== e);
|
|
167
|
+
r("change", a, o);
|
|
298
168
|
};
|
|
299
|
-
return
|
|
169
|
+
return te({
|
|
300
170
|
/** 主动打开下拉面板 */
|
|
301
|
-
open:
|
|
171
|
+
open: A,
|
|
302
172
|
/** 主动关闭下拉面板 */
|
|
303
|
-
close: () =>
|
|
173
|
+
close: () => i.value = !1,
|
|
304
174
|
/** 清空已选 */
|
|
305
175
|
clear: () => {
|
|
306
|
-
|
|
176
|
+
r("update:modelValue", []), r("change", [], []);
|
|
307
177
|
},
|
|
308
178
|
/** 根据 value 直接添加 */
|
|
309
179
|
addByValue: (e) => {
|
|
310
|
-
const t =
|
|
311
|
-
t &&
|
|
180
|
+
const t = T.value.get(e);
|
|
181
|
+
t && C(t);
|
|
312
182
|
},
|
|
313
183
|
/** 根据索引移除,触发与关闭 tag 一致的事件 */
|
|
314
184
|
removeByIndex: (e) => {
|
|
315
|
-
|
|
185
|
+
F(e);
|
|
316
186
|
},
|
|
317
187
|
/** 根据 value 移除,触发与关闭 tag 一致的事件 */
|
|
318
188
|
removeByValue: (e) => {
|
|
319
|
-
const t =
|
|
320
|
-
t > -1 &&
|
|
189
|
+
const t = s.value.findIndex((a) => a.value === e);
|
|
190
|
+
t > -1 && F(t);
|
|
321
191
|
},
|
|
322
192
|
/** 获取当前归一化后的已选项 */
|
|
323
|
-
getSelectedItems: () =>
|
|
324
|
-
}), (e, t) => (
|
|
325
|
-
class:
|
|
193
|
+
getSelectedItems: () => s.value
|
|
194
|
+
}), (e, t) => (c(), M("div", {
|
|
195
|
+
class: O(["g-input-tree-tag", { "is-disabled": e.disabled }])
|
|
326
196
|
}, [
|
|
327
|
-
|
|
197
|
+
R("div", {
|
|
328
198
|
class: "g-input-tree-tag__wrap",
|
|
329
199
|
ref_key: "wrapRef",
|
|
330
|
-
ref:
|
|
200
|
+
ref: U
|
|
331
201
|
}, [
|
|
332
|
-
|
|
202
|
+
R("div", {
|
|
333
203
|
class: "g-input-tree-tag__input-box",
|
|
334
204
|
ref_key: "inputBoxRef",
|
|
335
|
-
ref:
|
|
336
|
-
style:
|
|
205
|
+
ref: q,
|
|
206
|
+
style: H({ width: Ee.value })
|
|
337
207
|
}, [
|
|
338
|
-
|
|
339
|
-
modelValue:
|
|
340
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
208
|
+
k(p(He), {
|
|
209
|
+
modelValue: V.value,
|
|
210
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => V.value = a),
|
|
341
211
|
placeholder: e.placeholder,
|
|
342
212
|
clearable: e.clearable,
|
|
343
213
|
disabled: e.disabled,
|
|
344
214
|
class: "g-input-tree-tag__input",
|
|
345
|
-
onFocus:
|
|
346
|
-
onClick:
|
|
347
|
-
onInput:
|
|
348
|
-
onKeyup:
|
|
215
|
+
onFocus: A,
|
|
216
|
+
onClick: A,
|
|
217
|
+
onInput: xe,
|
|
218
|
+
onKeyup: Ce(Ie, ["enter"])
|
|
349
219
|
}, null, 8, ["modelValue", "placeholder", "clearable", "disabled"])
|
|
350
220
|
], 4),
|
|
351
|
-
(
|
|
352
|
-
|
|
353
|
-
default:
|
|
354
|
-
|
|
221
|
+
(c(), $(Oe, { to: "body" }, [
|
|
222
|
+
k(p(ee), null, {
|
|
223
|
+
default: b(() => [
|
|
224
|
+
i.value ? (c(), $(p(Y).div, {
|
|
355
225
|
key: 0,
|
|
356
|
-
ref:
|
|
357
|
-
class:
|
|
358
|
-
style:
|
|
359
|
-
initial:
|
|
360
|
-
animate:
|
|
361
|
-
exit:
|
|
362
|
-
transition:
|
|
363
|
-
onMousedown: t[1] || (t[1] =
|
|
226
|
+
ref: ce,
|
|
227
|
+
class: O(["g-input-tree-tag__popover", `is-${y.value}`]),
|
|
228
|
+
style: H(ge.value),
|
|
229
|
+
initial: pe.value,
|
|
230
|
+
animate: fe,
|
|
231
|
+
exit: ve.value,
|
|
232
|
+
transition: me,
|
|
233
|
+
onMousedown: t[1] || (t[1] = Re(() => {
|
|
364
234
|
}, ["prevent"]))
|
|
365
235
|
}, {
|
|
366
|
-
default:
|
|
367
|
-
|
|
236
|
+
default: b(() => [
|
|
237
|
+
R("div", {
|
|
368
238
|
class: "g-input-tree-tag__tree-wrap",
|
|
369
|
-
style:
|
|
239
|
+
style: H({ maxHeight: e.popperMaxHeight + "px" })
|
|
370
240
|
}, [
|
|
371
|
-
|
|
241
|
+
k(p(Ne), {
|
|
372
242
|
ref_key: "treeRef",
|
|
373
|
-
ref:
|
|
243
|
+
ref: j,
|
|
374
244
|
data: e.data,
|
|
375
|
-
props:
|
|
245
|
+
props: le.value,
|
|
376
246
|
"node-key": e.nodeKey,
|
|
377
|
-
"filter-node-method":
|
|
247
|
+
"filter-node-method": Ve,
|
|
378
248
|
"expand-on-click-node": !1,
|
|
379
249
|
"default-expand-all": e.defaultExpandAll,
|
|
380
|
-
onNodeClick:
|
|
250
|
+
onNodeClick: _e
|
|
381
251
|
}, {
|
|
382
|
-
default:
|
|
383
|
-
|
|
384
|
-
data:
|
|
385
|
-
node:
|
|
386
|
-
selectable:
|
|
387
|
-
selected:
|
|
252
|
+
default: b((a) => [
|
|
253
|
+
B(e.$slots, "tree-node", {
|
|
254
|
+
data: a?.data,
|
|
255
|
+
node: a?.node,
|
|
256
|
+
selectable: v(a?.data),
|
|
257
|
+
selected: x(h(a?.data))
|
|
388
258
|
}, () => [
|
|
389
|
-
|
|
259
|
+
a?.data ? (c(), M("span", {
|
|
390
260
|
key: 0,
|
|
391
|
-
class:
|
|
261
|
+
class: O([
|
|
392
262
|
"g-input-tree-tag__node",
|
|
393
263
|
{
|
|
394
|
-
"is-selectable":
|
|
395
|
-
"is-selected":
|
|
264
|
+
"is-selectable": v(a.data),
|
|
265
|
+
"is-selected": v(a.data) && x(h(a.data))
|
|
396
266
|
}
|
|
397
267
|
])
|
|
398
268
|
}, [
|
|
399
|
-
|
|
400
|
-
data:
|
|
401
|
-
selectable:
|
|
402
|
-
selected:
|
|
269
|
+
B(e.$slots, "leaf-icon", {
|
|
270
|
+
data: a.data,
|
|
271
|
+
selectable: v(a.data),
|
|
272
|
+
selected: x(h(a.data))
|
|
403
273
|
}, void 0, !0),
|
|
404
|
-
|
|
405
|
-
], 2)) :
|
|
274
|
+
J(" " + Q(f(a.data)), 1)
|
|
275
|
+
], 2)) : z("", !0)
|
|
406
276
|
], !0)
|
|
407
277
|
]),
|
|
408
278
|
_: 3
|
|
@@ -410,41 +280,41 @@ const nt = {
|
|
|
410
280
|
], 4)
|
|
411
281
|
]),
|
|
412
282
|
_: 3
|
|
413
|
-
}, 8, ["class", "style", "initial", "exit"])) :
|
|
283
|
+
}, 8, ["class", "style", "initial", "exit"])) : z("", !0)
|
|
414
284
|
]),
|
|
415
285
|
_: 3
|
|
416
286
|
})
|
|
417
287
|
])),
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
items:
|
|
421
|
-
remove:
|
|
288
|
+
s.value.length ? (c(), M("div", Ue, [
|
|
289
|
+
B(e.$slots, "tags", {
|
|
290
|
+
items: s.value,
|
|
291
|
+
remove: F
|
|
422
292
|
}, () => [
|
|
423
|
-
|
|
424
|
-
default:
|
|
425
|
-
(
|
|
426
|
-
key:
|
|
293
|
+
k(p(ee), { mode: "popLayout" }, {
|
|
294
|
+
default: b(() => [
|
|
295
|
+
(c(!0), M($e, null, ze(s.value, (a, o) => (c(), $(p(Y).div, {
|
|
296
|
+
key: a.value,
|
|
427
297
|
layout: !0,
|
|
428
298
|
class: "g-input-tree-tag__tag-motion",
|
|
429
|
-
initial:
|
|
430
|
-
animate:
|
|
431
|
-
exit:
|
|
432
|
-
transition:
|
|
299
|
+
initial: be,
|
|
300
|
+
animate: he,
|
|
301
|
+
exit: ye,
|
|
302
|
+
transition: we
|
|
433
303
|
}, {
|
|
434
|
-
default:
|
|
435
|
-
|
|
304
|
+
default: b(() => [
|
|
305
|
+
k(p(Ke), {
|
|
436
306
|
class: "g-input-tree-tag__tag",
|
|
437
307
|
type: e.tagType,
|
|
438
308
|
effect: e.tagEffect,
|
|
439
309
|
closable: e.closable && !e.disabled,
|
|
440
|
-
onClose: (
|
|
310
|
+
onClose: (u) => F(o)
|
|
441
311
|
}, {
|
|
442
|
-
default:
|
|
443
|
-
|
|
444
|
-
item:
|
|
445
|
-
index:
|
|
312
|
+
default: b(() => [
|
|
313
|
+
B(e.$slots, "tag", {
|
|
314
|
+
item: a,
|
|
315
|
+
index: o
|
|
446
316
|
}, () => [
|
|
447
|
-
|
|
317
|
+
J(Q(a.label), 1)
|
|
448
318
|
], !0)
|
|
449
319
|
]),
|
|
450
320
|
_: 2
|
|
@@ -456,15 +326,15 @@ const nt = {
|
|
|
456
326
|
_: 3
|
|
457
327
|
})
|
|
458
328
|
], !0)
|
|
459
|
-
])) :
|
|
329
|
+
])) : z("", !0)
|
|
460
330
|
], 512)
|
|
461
331
|
], 2));
|
|
462
332
|
}
|
|
463
|
-
}),
|
|
464
|
-
|
|
465
|
-
|
|
333
|
+
}), N = /* @__PURE__ */ je(qe, [["__scopeId", "data-v-b74dd5d2"]]);
|
|
334
|
+
N.install = (L) => {
|
|
335
|
+
L.component(N.name, N);
|
|
466
336
|
};
|
|
467
337
|
export {
|
|
468
|
-
|
|
469
|
-
|
|
338
|
+
N as GInputTreeTag,
|
|
339
|
+
N as default
|
|
470
340
|
};
|