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.
@@ -1,142 +1,12 @@
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 = {
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
- }, lt = /* @__PURE__ */ me({
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(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) => {
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 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
+ 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
- }, 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);
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(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
+ 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: o,
191
- label: r ? l(r) : w ?? String(o ?? ""),
192
- raw: r ?? (a.valueFormat === "object" ? t : void 0)
60
+ value: a,
61
+ label: o ? f(o) : u ?? String(a ?? ""),
62
+ raw: o ?? (l.valueFormat === "object" ? t : void 0)
193
63
  };
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) => {
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
- I.value = null;
66
+ m.value = null;
197
67
  return;
198
68
  }
199
- I.value = e.$el ?? (e instanceof HTMLElement ? e : null);
200
- }, te = x({}), $ = x("bottom"), ge = p(() => ({
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: $.value === "bottom" ? -8 : 8
204
- })), he = { opacity: 1, scale: 1, y: 0 }, be = p(() => ({
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: $.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;
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 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 = {
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: `${Fe}px`,
225
- left: `${o.left}px`,
226
- width: `${o.width}px`,
227
- zIndex: String(a.popperZIndex)
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 L = null;
231
- const F = () => {
232
- b.value && (L && cancelAnimationFrame(L), L = requestAnimationFrame(() => {
233
- L = null, H();
100
+ let g = null;
101
+ const w = () => {
102
+ i.value && (g && cancelAnimationFrame(g), g = requestAnimationFrame(() => {
103
+ g = null, _();
234
104
  }));
235
105
  };
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;
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
- He(b, async (e) => {
112
+ Se(i, async (e) => {
243
113
  if (!e) {
244
- ae();
114
+ Z();
245
115
  return;
246
116
  }
247
- await le(), H(), requestAnimationFrame(H), Ae();
117
+ await W(), _(), requestAnimationFrame(_), ke();
248
118
  });
249
- const oe = (e) => {
250
- if (!b.value) return;
119
+ const D = (e) => {
120
+ if (!i.value) return;
251
121
  const t = e.target;
252
- Y.value?.contains(t) || I.value?.contains(t) || (b.value = !1);
122
+ U.value?.contains(t) || m.value?.contains(t) || (i.value = !1);
253
123
  };
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();
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 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)) {
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
- 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);
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 (z(t)) {
271
- const w = { value: t, label: l(e), raw: e };
272
- u("duplicate", w), a.duplicateMessage && se.warning(a.duplicateMessage);
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 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();
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 o of W.value.values())
283
- if (l(o) === e) {
284
- t = o;
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
- u("not-found", e), a.notFoundMessage && se.warning(a.notFoundMessage);
158
+ r("not-found", e), l.notFoundMessage && X.warning(l.notFoundMessage);
289
159
  return;
290
160
  }
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);
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 c({
169
+ return te({
300
170
  /** 主动打开下拉面板 */
301
- open: j,
171
+ open: A,
302
172
  /** 主动关闭下拉面板 */
303
- close: () => b.value = !1,
173
+ close: () => i.value = !1,
304
174
  /** 清空已选 */
305
175
  clear: () => {
306
- u("update:modelValue", []), u("change", [], []);
176
+ r("update:modelValue", []), r("change", [], []);
307
177
  },
308
178
  /** 根据 value 直接添加 */
309
179
  addByValue: (e) => {
310
- const t = W.value.get(e);
311
- t && q(t);
180
+ const t = T.value.get(e);
181
+ t && C(t);
312
182
  },
313
183
  /** 根据索引移除,触发与关闭 tag 一致的事件 */
314
184
  removeByIndex: (e) => {
315
- O(e);
185
+ F(e);
316
186
  },
317
187
  /** 根据 value 移除,触发与关闭 tag 一致的事件 */
318
188
  removeByValue: (e) => {
319
- const t = h.value.findIndex((o) => o.value === e);
320
- t > -1 && O(t);
189
+ const t = s.value.findIndex((a) => a.value === e);
190
+ t > -1 && F(t);
321
191
  },
322
192
  /** 获取当前归一化后的已选项 */
323
- getSelectedItems: () => h.value
324
- }), (e, t) => (_(), U("div", {
325
- class: G(["g-input-tree-tag", { "is-disabled": e.disabled }])
193
+ getSelectedItems: () => s.value
194
+ }), (e, t) => (c(), M("div", {
195
+ class: O(["g-input-tree-tag", { "is-disabled": e.disabled }])
326
196
  }, [
327
- D("div", {
197
+ R("div", {
328
198
  class: "g-input-tree-tag__wrap",
329
199
  ref_key: "wrapRef",
330
- ref: Y
200
+ ref: U
331
201
  }, [
332
- D("div", {
202
+ R("div", {
333
203
  class: "g-input-tree-tag__input-box",
334
204
  ref_key: "inputBoxRef",
335
- ref: ee,
336
- style: Z({ width: Ce.value })
205
+ ref: q,
206
+ style: H({ width: Ee.value })
337
207
  }, [
338
- B(E(qe), {
339
- modelValue: R.value,
340
- "onUpdate:modelValue": t[0] || (t[0] = (o) => R.value = o),
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: j,
346
- onClick: j,
347
- onInput: ke,
348
- onKeyup: Ne(Ve, ["enter"])
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
- (_(), K(Ue, { to: "body" }, [
352
- B(E(pe), null, {
353
- default: A(() => [
354
- b.value ? (_(), K(E(ce).div, {
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: 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(() => {
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: A(() => [
367
- D("div", {
236
+ default: b(() => [
237
+ R("div", {
368
238
  class: "g-input-tree-tag__tree-wrap",
369
- style: Z({ maxHeight: e.popperMaxHeight + "px" })
239
+ style: H({ maxHeight: e.popperMaxHeight + "px" })
370
240
  }, [
371
- B(E(Ge), {
241
+ k(p(Ne), {
372
242
  ref_key: "treeRef",
373
- ref: Q,
243
+ ref: j,
374
244
  data: e.data,
375
- props: s.value,
245
+ props: le.value,
376
246
  "node-key": e.nodeKey,
377
- "filter-node-method": Me,
247
+ "filter-node-method": Ve,
378
248
  "expand-on-click-node": !1,
379
249
  "default-expand-all": e.defaultExpandAll,
380
- onNodeClick: Ie
250
+ onNodeClick: _e
381
251
  }, {
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))
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
- o?.data ? (_(), U("span", {
259
+ a?.data ? (c(), M("span", {
390
260
  key: 0,
391
- class: G([
261
+ class: O([
392
262
  "g-input-tree-tag__node",
393
263
  {
394
- "is-selectable": M(o.data),
395
- "is-selected": M(o.data) && z(i(o.data))
264
+ "is-selectable": v(a.data),
265
+ "is-selected": v(a.data) && x(h(a.data))
396
266
  }
397
267
  ])
398
268
  }, [
399
- P(e.$slots, "leaf-icon", {
400
- data: o.data,
401
- selectable: M(o.data),
402
- selected: z(i(o.data))
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
- ie(" " + re(l(o.data)), 1)
405
- ], 2)) : X("", !0)
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"])) : X("", !0)
283
+ }, 8, ["class", "style", "initial", "exit"])) : z("", !0)
414
284
  ]),
415
285
  _: 3
416
286
  })
417
287
  ])),
418
- h.value.length ? (_(), U("div", nt, [
419
- P(e.$slots, "tags", {
420
- items: h.value,
421
- remove: O
288
+ s.value.length ? (c(), M("div", Ue, [
289
+ B(e.$slots, "tags", {
290
+ items: s.value,
291
+ remove: F
422
292
  }, () => [
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,
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: Ee,
430
- animate: xe,
431
- exit: _e,
432
- transition: Se
299
+ initial: be,
300
+ animate: he,
301
+ exit: ye,
302
+ transition: we
433
303
  }, {
434
- default: A(() => [
435
- B(E(De), {
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: (w) => O(r)
310
+ onClose: (u) => F(o)
441
311
  }, {
442
- default: A(() => [
443
- P(e.$slots, "tag", {
444
- item: o,
445
- index: r
312
+ default: b(() => [
313
+ B(e.$slots, "tag", {
314
+ item: a,
315
+ index: o
446
316
  }, () => [
447
- ie(re(o.label), 1)
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
- ])) : X("", !0)
329
+ ])) : z("", !0)
460
330
  ], 512)
461
331
  ], 2));
462
332
  }
463
- }), J = /* @__PURE__ */ Qe(lt, [["__scopeId", "data-v-b74dd5d2"]]);
464
- J.install = (d) => {
465
- d.component(J.name, J);
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
- J as GInputTreeTag,
469
- J as default
338
+ N as GInputTreeTag,
339
+ N as default
470
340
  };