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.
@@ -1,10 +1,142 @@
1
- import { defineComponent as he, computed as d, ref as i, watch as we, nextTick as D, onMounted as ye, onBeforeUnmount as ke, createElementBlock as F, openBlock as v, normalizeClass as C, createElementVNode as B, createBlock as Z, createCommentVNode as G, normalizeStyle as T, createVNode as W, unref as R, withKeys as Ee, Teleport as Ve, withDirectives as Fe, withModifiers as Be, withCtx as J, renderSlot as x, createTextVNode as P, toDisplayString as Q, vShow as xe, Fragment as Ie, renderList as Me } from "vue";
2
- import { ElInput as Se, ElTree as _e, ElTag as Le, ElMessage as X } from "element-plus";
3
- import { _ as Ce } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
4
- const Te = {
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
- }, Re = /* @__PURE__ */ he({
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(I, { expose: Y, emit: ee }) {
36
- const l = I, n = ee, te = d(() => ({
37
- label: l.props.label || "label",
38
- children: l.props.children || "children",
39
- disabled: l.props.disabled
40
- })), ae = d(() => l.props.value || l.nodeKey || "id"), le = d(() => l.props.label || "label"), oe = d(() => l.props.children || "children"), M = d(() => l.props.isLeaf), ne = d(() => l.echoProps?.value || "value"), re = d(() => l.echoProps?.label || "label"), m = (e) => e ? e[ae.value] : void 0, c = (e) => e ? e[le.value] : "", z = (e) => e ? e[oe.value] : void 0, ue = (e) => e?.[ne.value] ?? e?.value, de = (e) => e?.[re.value] ?? e?.label, p = (e) => {
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 l.selectable == "function") return l.selectable(e);
43
- if (M.value && e[M.value] !== void 0) return !!e[M.value];
44
- const t = z(e);
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
- }, S = d(() => {
47
- const e = /* @__PURE__ */ new Map(), t = (a = []) => {
48
- a.forEach((o) => {
49
- p(o) && e.set(m(o), o);
50
- const s = z(o);
51
- s?.length && t(s);
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(l.data || []), e;
55
- }), r = d(() => (l.modelValue || []).map((t) => {
56
- const a = l.valueFormat === "object" ? ue(t) : t, o = S.value.get(a), s = l.valueFormat === "object" ? de(t) : void 0;
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: a,
59
- label: o ? c(o) : s ?? String(a ?? ""),
60
- raw: o ?? (l.valueFormat === "object" ? t : void 0)
190
+ value: o,
191
+ label: r ? l(r) : w ?? String(o ?? ""),
192
+ raw: r ?? (a.valueFormat === "object" ? t : void 0)
61
193
  };
62
- })), w = (e) => r.value.some((t) => t.value === e), y = i(""), u = i(!1), $ = i(null), H = i(null), N = i(null), g = i(null), O = i({}), K = i("bottom"), se = d(
63
- () => typeof l.width == "number" ? `${l.width}px` : l.width
64
- ), _ = () => {
65
- l.disabled || (u.value = !0);
66
- }, k = () => {
67
- if (!u.value) return;
68
- const e = N.value, t = g.value;
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 a = e.getBoundingClientRect(), o = t.offsetHeight || l.popperMaxHeight, V = window.innerHeight - a.bottom - l.popperOffset, ge = a.top, q = V >= o || V >= ge ? "bottom" : "top";
71
- K.value = q;
72
- const be = q === "bottom" ? a.bottom + l.popperOffset : a.top - o;
73
- O.value = {
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: `${be}px`,
76
- left: `${a.left}px`,
77
- width: `${a.width}px`,
78
- zIndex: String(l.popperZIndex)
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 f = null;
82
- const b = () => {
83
- u.value && (f && cancelAnimationFrame(f), f = requestAnimationFrame(() => {
84
- f = null, k();
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 h = null;
88
- const ie = () => {
89
- typeof ResizeObserver > "u" || !g.value || (h?.disconnect(), h = new ResizeObserver(() => b()), h.observe(g.value));
90
- }, j = () => {
91
- h?.disconnect(), h = null;
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
- we(u, async (e) => {
242
+ He(b, async (e) => {
94
243
  if (!e) {
95
- j();
244
+ ae();
96
245
  return;
97
246
  }
98
- await D(), k(), requestAnimationFrame(k), ie();
247
+ await le(), H(), requestAnimationFrame(H), Ae();
99
248
  });
100
- const U = (e) => {
101
- if (!u.value) return;
249
+ const oe = (e) => {
250
+ if (!b.value) return;
102
251
  const t = e.target;
103
- H.value?.contains(t) || g.value?.contains(t) || (u.value = !1);
252
+ Y.value?.contains(t) || I.value?.contains(t) || (b.value = !1);
104
253
  };
105
- ye(() => {
106
- document.addEventListener("mousedown", U, !0), window.addEventListener("scroll", b, !0), window.addEventListener("resize", b);
107
- }), ke(() => {
108
- document.removeEventListener("mousedown", U, !0), window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b), f && cancelAnimationFrame(f), j();
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 ce = (e) => {
111
- u.value = !0, $.value?.filter(e), D(k);
112
- }, pe = (e, t) => e ? typeof l.filterMethod == "function" ? l.filterMethod(e, t) : String(c(t) ?? "").toLowerCase().includes(String(e).toLowerCase()) : !0, fe = (e, t) => {
113
- if (n("node-click", e), !p(e)) {
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
- L(e), u.value = !1;
118
- }, ve = (e) => l.valueFormat === "object" ? { value: e.value, label: e.label, raw: e.raw } : e.value, L = (e) => {
119
- const t = m(e);
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 (w(t)) {
122
- const s = { value: t, label: c(e), raw: e };
123
- n("duplicate", s), l.duplicateMessage && X.warning(l.duplicateMessage);
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 a = { value: t, label: c(e), raw: e }, o = [...l.modelValue || [], ve(a)];
127
- n("update:modelValue", o), n("add", a), n("change", o, [...r.value, a]), l.clearInputAfterSelect && (y.value = "");
128
- }, me = () => {
129
- if (!l.enterToAdd) return;
130
- const e = (y.value || "").trim();
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 a of S.value.values())
134
- if (c(a) === e) {
135
- t = a;
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
- n("not-found", e), l.notFoundMessage && X.warning(l.notFoundMessage);
288
+ u("not-found", e), a.notFoundMessage && se.warning(a.notFoundMessage);
140
289
  return;
141
290
  }
142
- L(t);
143
- }, E = (e) => {
144
- if (e < 0 || e >= r.value.length) return;
145
- const t = r.value[e], a = [...l.modelValue || []];
146
- a.splice(e, 1), n("update:modelValue", a), t && n("remove", t, e);
147
- const o = r.value.filter((s, V) => V !== e);
148
- n("change", a, o);
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 Y({
299
+ return c({
151
300
  /** 主动打开下拉面板 */
152
- open: _,
301
+ open: j,
153
302
  /** 主动关闭下拉面板 */
154
- close: () => u.value = !1,
303
+ close: () => b.value = !1,
155
304
  /** 清空已选 */
156
305
  clear: () => {
157
- n("update:modelValue", []), n("change", [], []);
306
+ u("update:modelValue", []), u("change", [], []);
158
307
  },
159
308
  /** 根据 value 直接添加 */
160
309
  addByValue: (e) => {
161
- const t = S.value.get(e);
162
- t && L(t);
310
+ const t = W.value.get(e);
311
+ t && q(t);
163
312
  },
164
313
  /** 根据索引移除,触发与关闭 tag 一致的事件 */
165
314
  removeByIndex: (e) => {
166
- E(e);
315
+ O(e);
167
316
  },
168
317
  /** 根据 value 移除,触发与关闭 tag 一致的事件 */
169
318
  removeByValue: (e) => {
170
- const t = r.value.findIndex((a) => a.value === e);
171
- t > -1 && E(t);
319
+ const t = h.value.findIndex((o) => o.value === e);
320
+ t > -1 && O(t);
172
321
  },
173
322
  /** 获取当前归一化后的已选项 */
174
- getSelectedItems: () => r.value
175
- }), (e, t) => (v(), F("div", {
176
- class: C(["g-input-tree-tag", { "is-disabled": e.disabled }])
323
+ getSelectedItems: () => h.value
324
+ }), (e, t) => (_(), U("div", {
325
+ class: G(["g-input-tree-tag", { "is-disabled": e.disabled }])
177
326
  }, [
178
- B("div", {
327
+ D("div", {
179
328
  class: "g-input-tree-tag__wrap",
180
329
  ref_key: "wrapRef",
181
- ref: H
330
+ ref: Y
182
331
  }, [
183
- B("div", {
332
+ D("div", {
184
333
  class: "g-input-tree-tag__input-box",
185
334
  ref_key: "inputBoxRef",
186
- ref: N,
187
- style: T({ width: se.value })
335
+ ref: ee,
336
+ style: Z({ width: Ce.value })
188
337
  }, [
189
- W(R(Se), {
190
- modelValue: y.value,
191
- "onUpdate:modelValue": t[0] || (t[0] = (a) => y.value = a),
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: ce,
199
- onKeyup: Ee(me, ["enter"])
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
- (v(), Z(Ve, { to: "body" }, [
203
- Fe(B("div", {
204
- ref_key: "popperRef",
205
- ref: g,
206
- class: C(["g-input-tree-tag__popover", `is-${K.value}`]),
207
- style: T(O.value),
208
- onMousedown: t[1] || (t[1] = Be(() => {
209
- }, ["prevent"]))
210
- }, [
211
- B("div", {
212
- class: "g-input-tree-tag__tree-wrap",
213
- style: T({ maxHeight: e.popperMaxHeight + "px" })
214
- }, [
215
- W(R(_e), {
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: J((a) => [
227
- x(e.$slots, "tree-node", {
228
- data: a?.data,
229
- node: a?.node,
230
- selectable: p(a?.data),
231
- selected: w(m(a?.data))
232
- }, () => [
233
- a?.data ? (v(), F("span", {
234
- key: 0,
235
- class: C([
236
- "g-input-tree-tag__node",
237
- {
238
- "is-selectable": p(a.data),
239
- "is-selected": p(a.data) && w(m(a.data))
240
- }
241
- ])
242
- }, [
243
- x(e.$slots, "leaf-icon", {
244
- data: a.data,
245
- selectable: p(a.data),
246
- selected: w(m(a.data))
247
- }, void 0, !0),
248
- P(" " + Q(c(a.data)), 1)
249
- ], 2)) : G("", !0)
250
- ], !0)
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, ["data", "props", "node-key", "default-expand-all"])
254
- ], 4)
255
- ], 38), [
256
- [xe, u.value]
257
- ])
413
+ }, 8, ["class", "style", "initial", "exit"])) : X("", !0)
414
+ ]),
415
+ _: 3
416
+ })
258
417
  ])),
259
- r.value.length ? (v(), F("div", Te, [
260
- x(e.$slots, "tags", {
261
- items: r.value,
262
- remove: E
418
+ h.value.length ? (_(), U("div", nt, [
419
+ P(e.$slots, "tags", {
420
+ items: h.value,
421
+ remove: O
263
422
  }, () => [
264
- (v(!0), F(Ie, null, Me(r.value, (a, o) => (v(), Z(R(Le), {
265
- key: a.value,
266
- class: "g-input-tree-tag__tag",
267
- type: e.tagType,
268
- effect: e.tagEffect,
269
- closable: e.closable && !e.disabled,
270
- onClose: (s) => E(o)
271
- }, {
272
- default: J(() => [
273
- x(e.$slots, "tag", {
274
- item: a,
275
- index: o
276
- }, () => [
277
- P(Q(a.label), 1)
278
- ], !0)
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
- _: 2
281
- }, 1032, ["type", "effect", "closable", "onClose"]))), 128))
456
+ _: 3
457
+ })
282
458
  ], !0)
283
- ])) : G("", !0)
459
+ ])) : X("", !0)
284
460
  ], 512)
285
461
  ], 2));
286
462
  }
287
- }), A = /* @__PURE__ */ Ce(Re, [["__scopeId", "data-v-1fe6c294"]]);
288
- A.install = (I) => {
289
- I.component(A.name, A);
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
- A as GInputTreeTag,
293
- A as default
468
+ J as GInputTreeTag,
469
+ J as default
294
470
  };