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