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