@rhino-design/vue 0.2.6 → 0.2.8

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.
Files changed (36) hide show
  1. package/README.md +95 -18
  2. package/README.zh-CN.md +115 -0
  3. package/dist/arco.less +95 -76
  4. package/dist/components/XButton.vue.js +2 -2
  5. package/dist/components/XConfigProvider.vue.js +1 -1
  6. package/dist/components/XMenuOverflowWrap.vue.js +66 -59
  7. package/dist/components/XScrollbar.vue.js +1 -1
  8. package/dist/components/XSubMenuPop.vue.js +1 -1
  9. package/dist/components/XTable.vue.d.ts +1 -0
  10. package/dist/components/XTable.vue.js +3 -3
  11. package/dist/components/XTable.vue2.js +774 -614
  12. package/dist/components/XToast.vue.d.ts +25 -0
  13. package/dist/components/XToast.vue.js +7 -0
  14. package/dist/components/XToast.vue2.js +27 -0
  15. package/dist/components/XTour.vue.d.ts +2 -0
  16. package/dist/components/XTour.vue.js +69 -61
  17. package/dist/components/XTree.vue.d.ts +2 -0
  18. package/dist/components/XTree.vue.js +1 -1
  19. package/dist/components/XTree.vue2.js +124 -121
  20. package/dist/components/XTreeNode.vue.d.ts +1 -0
  21. package/dist/components/XTreeNode.vue.js +2 -2
  22. package/dist/components/XTreeNode.vue2.js +21 -20
  23. package/dist/components/XTreeSelect.vue.js +4 -4
  24. package/dist/components/XTreeSelect.vue2.js +314 -291
  25. package/dist/components/XWatermark.vue.js +4 -4
  26. package/dist/components/index.d.ts +1 -0
  27. package/dist/components/index.js +55 -53
  28. package/dist/index.cjs +9 -9
  29. package/dist/index.css +95 -76
  30. package/dist/index.js +62 -60
  31. package/dist/index.less +95 -76
  32. package/dist/index.scss +14853 -0
  33. package/dist/style.css +95 -76
  34. package/dist/style.less +95 -76
  35. package/dist/style.scss +14853 -0
  36. package/package.json +14 -6
@@ -1,5 +1,5 @@
1
- import { defineComponent as Re, ref as L, computed as s, watch as F, nextTick as Se, openBlock as y, createElementBlock as k, normalizeClass as we, createElementVNode as Q, normalizeStyle as U, Fragment as W, createCommentVNode as Y, renderList as Ke, createVNode as be, createSlots as $e, withCtx as f, renderSlot as d, toDisplayString as Ce, unref as Ie } from "vue";
2
- import Ne from "./XTreeNode.vue.js";
1
+ import { defineComponent as Re, ref as L, computed as s, watch as F, nextTick as Se, openBlock as y, createElementBlock as k, normalizeClass as we, createElementVNode as Q, normalizeStyle as U, Fragment as W, createCommentVNode as Y, renderList as Ke, createVNode as be, createSlots as $e, withCtx as f, renderSlot as u, toDisplayString as Ce, unref as Ne } from "vue";
2
+ import Ie from "./XTreeNode.vue.js";
3
3
  import { useXI18n as Xe } from "../composables/i18n.js";
4
4
  const qe = {
5
5
  key: 0,
@@ -36,12 +36,13 @@ const qe = {
36
36
  allowDrop: {},
37
37
  filterTreeNode: {},
38
38
  searchValue: {},
39
+ actionOnNodeClick: { default: void 0 },
39
40
  fieldNames: { default: () => ({ key: "key", title: "title", children: "children" }) },
40
41
  virtualListProps: { default: void 0 }
41
42
  },
42
43
  emits: ["update:modelValue", "update:selectedKeys", "update:checkedKeys", "update:expandedKeys", "update:halfCheckedKeys", "select", "check", "expand", "dragStart", "dragEnd", "dragOver", "dragLeave", "drop"],
43
- setup(u, { expose: ze, emit: Ee }) {
44
- const o = u, c = Ee, { t: Z } = Xe(), $ = L([]), p = L([]), S = L([]), A = L([]), M = L(null), P = L(null), N = L(0), h = s(() => {
44
+ setup(d, { expose: ze, emit: Ee }) {
45
+ const o = d, c = Ee, { t: Z } = Xe(), $ = L([]), p = L([]), S = L([]), A = L([]), M = L(null), P = L(null), I = L(0), h = s(() => {
45
46
  var e;
46
47
  return ((e = o.fieldNames) == null ? void 0 : e.key) || "key";
47
48
  }), _ = s(() => {
@@ -76,12 +77,12 @@ const qe = {
76
77
  var e;
77
78
  return Le((e = o.virtualListProps) == null ? void 0 : e.height);
78
79
  }), z = s(() => {
79
- var t, l, r;
80
+ var t, l, i;
80
81
  const e = (t = o.virtualListProps) == null ? void 0 : t.fixedSize;
81
82
  if (typeof e == "number" && e > 0) return e;
82
83
  const n = (l = o.virtualListProps) == null ? void 0 : l.itemSize;
83
84
  if (typeof n == "number" && n > 0) return n;
84
- const a = (r = o.virtualListProps) == null ? void 0 : r.estimatedSize;
85
+ const a = (i = o.virtualListProps) == null ? void 0 : i.estimatedSize;
85
86
  return typeof a == "number" && a > 0 ? a : 30;
86
87
  }), ae = s(() => {
87
88
  var e;
@@ -93,8 +94,8 @@ const qe = {
93
94
  function X(e) {
94
95
  const n = [], a = (t) => {
95
96
  t.forEach((l) => {
96
- var r;
97
- n.push(l[h.value]), (r = l[v.value]) != null && r.length && a(l[v.value]);
97
+ var i;
98
+ n.push(l[h.value]), (i = l[v.value]) != null && i.length && a(l[v.value]);
98
99
  });
99
100
  };
100
101
  return a(e), n;
@@ -109,15 +110,15 @@ const qe = {
109
110
  }
110
111
  }
111
112
  }
112
- function H(e) {
113
+ function O(e) {
113
114
  return !!(e && !e.disabled && e.checkable !== !1);
114
115
  }
115
116
  function ne(e) {
116
117
  const n = [], a = (l) => {
117
- if (!H(l)) return;
118
+ if (!O(l)) return;
118
119
  n.push(l[h.value]);
119
- const r = l[v.value];
120
- r != null && r.length && r.forEach(a);
120
+ const i = l[v.value];
121
+ i != null && i.length && i.forEach(a);
121
122
  }, t = e[v.value];
122
123
  return t != null && t.length && t.forEach(a), n;
123
124
  }
@@ -126,25 +127,25 @@ const qe = {
126
127
  for (const l of n) {
127
128
  if (l[h.value] === e) return a;
128
129
  if ((t = l[v.value]) != null && t.length) {
129
- const r = V(e, l[v.value], l);
130
- if (r) return r;
130
+ const i = V(e, l[v.value], l);
131
+ if (i) return i;
131
132
  }
132
133
  }
133
134
  }
134
135
  function Te(e) {
135
136
  if (!o.checkable || o.checkStrictly) return [];
136
137
  const n = new Set(e), a = [], t = (l) => {
137
- l.forEach((r) => {
138
- if (!H(r)) return;
139
- const i = r[v.value];
140
- if (i != null && i.length) {
141
- const g = ne(r).filter((D) => D !== r[h.value]);
138
+ l.forEach((i) => {
139
+ if (!O(i)) return;
140
+ const r = i[v.value];
141
+ if (r != null && r.length) {
142
+ const g = ne(i).filter((D) => D !== i[h.value]);
142
143
  if (!g.length) {
143
- t(i);
144
+ t(r);
144
145
  return;
145
146
  }
146
- const O = g.filter((D) => n.has(D)).length;
147
- O > 0 && O < g.length && a.push(r[h.value]), t(i);
147
+ const H = g.filter((D) => n.has(D)).length;
148
+ H > 0 && H < g.length && a.push(i[h.value]), t(r);
148
149
  }
149
150
  });
150
151
  };
@@ -153,21 +154,21 @@ const qe = {
153
154
  function j(e, n) {
154
155
  const a = Array.from(new Set(e));
155
156
  if (o.checkStrictly) return a;
156
- const t = a.filter((r) => {
157
- const i = w(r);
158
- return ((i == null ? void 0 : i[v.value]) ?? []).filter((D) => H(D)).length === 0;
157
+ const t = a.filter((i) => {
158
+ const r = w(i);
159
+ return ((r == null ? void 0 : r[v.value]) ?? []).filter((D) => O(D)).length === 0;
159
160
  });
160
161
  if (o.checkedStrategy === "all")
161
162
  return a;
162
163
  if (o.checkedStrategy === "child")
163
164
  return t;
164
165
  const l = new Set(a);
165
- return a.filter((r) => {
166
- let i = V(r);
167
- for (; i; ) {
168
- const g = i[h.value];
166
+ return a.filter((i) => {
167
+ let r = V(i);
168
+ for (; r; ) {
169
+ const g = r[h.value];
169
170
  if (l.has(g)) return !1;
170
- i = V(g);
171
+ r = V(g);
171
172
  }
172
173
  return !0;
173
174
  });
@@ -180,8 +181,8 @@ const qe = {
180
181
  function oe(e, n, a) {
181
182
  if (!o.selectable || n.disabled || n.selectable === !1) return;
182
183
  let t;
183
- o.multiple ? K.value.indexOf(e) > -1 ? t = K.value.filter((i) => i !== e) : t = [...K.value, e] : t = K.value.includes(e) ? [] : [e], $.value = t, c("update:selectedKeys", t), c("update:modelValue", o.multiple ? t : t[0] ?? null);
184
- const l = t.map((r) => w(r)).filter(Boolean);
184
+ o.multiple ? K.value.indexOf(e) > -1 ? t = K.value.filter((r) => r !== e) : t = [...K.value, e] : t = K.value.includes(e) ? [] : [e], $.value = t, c("update:selectedKeys", t), c("update:modelValue", o.multiple ? t : t[0] ?? null);
185
+ const l = t.map((i) => w(i)).filter(Boolean);
185
186
  c("select", t, {
186
187
  selected: t.includes(e),
187
188
  selectedNodes: l,
@@ -189,46 +190,46 @@ const qe = {
189
190
  e: a
190
191
  });
191
192
  }
192
- function re(e, n, a, t) {
193
+ function ie(e, n, a, t) {
193
194
  if (!o.checkable || n.disabled || n.checkable === !1) return;
194
195
  const l = new Set(E.value.filter((C) => !A.value.includes(C)));
195
196
  if (o.checkStrictly)
196
197
  a ? l.add(e) : l.delete(e);
197
198
  else {
198
199
  const C = [e, ...ne(n)];
199
- a ? C.forEach((I) => l.add(I)) : C.forEach((I) => l.delete(I));
200
+ a ? C.forEach((N) => l.add(N)) : C.forEach((N) => l.delete(N));
200
201
  let T = V(e);
201
202
  for (; T; ) {
202
- const I = T[h.value];
203
- if (!H(T)) {
204
- T = V(I);
203
+ const N = T[h.value];
204
+ if (!O(T)) {
205
+ T = V(N);
205
206
  continue;
206
207
  }
207
- const pe = (T[v.value] ?? []).filter((J) => H(J));
208
- pe.length > 0 && pe.every((J) => l.has(J[h.value])) ? l.add(I) : l.delete(I), T = V(I);
208
+ const pe = (T[v.value] ?? []).filter((J) => O(J));
209
+ pe.length > 0 && pe.every((J) => l.has(J[h.value])) ? l.add(N) : l.delete(N), T = V(N);
209
210
  }
210
211
  }
211
- const r = Array.from(l);
212
- p.value = r;
213
- const i = q(r), g = j(r);
212
+ const i = Array.from(l);
213
+ p.value = i;
214
+ const r = q(i), g = j(i);
214
215
  c("update:checkedKeys", g);
215
- const O = g.map((C) => w(C)).filter(Boolean), D = i.map((C) => w(C)).filter(Boolean);
216
+ const H = g.map((C) => w(C)).filter(Boolean), D = r.map((C) => w(C)).filter(Boolean);
216
217
  c("check", g, {
217
218
  checked: a,
218
- checkedNodes: O,
219
+ checkedNodes: H,
219
220
  node: n,
220
- halfCheckedKeys: i,
221
+ halfCheckedKeys: r,
221
222
  halfCheckedNodes: D,
222
223
  e: t
223
224
  });
224
225
  }
225
- function ie(e, n, a, t) {
226
+ function re(e, n, a, t) {
226
227
  let l = [...x.value];
227
- a ? l.includes(e) || l.push(e) : l = l.filter((i) => i !== e), S.value = l, c("update:expandedKeys", l);
228
- const r = l.map((i) => w(i)).filter(Boolean);
228
+ a ? l.includes(e) || l.push(e) : l = l.filter((r) => r !== e), S.value = l, c("update:expandedKeys", l);
229
+ const i = l.map((r) => w(r)).filter(Boolean);
229
230
  c("expand", l, {
230
231
  expanded: a,
231
- expandedNodes: r,
232
+ expandedNodes: i,
232
233
  node: n,
233
234
  e: t
234
235
  });
@@ -252,10 +253,10 @@ const qe = {
252
253
  function fe(e) {
253
254
  const n = [];
254
255
  return e.forEach((a) => {
255
- var i;
256
- const t = a[v.value], l = t != null && t.length ? fe(t) : [], r = ((i = o.filterTreeNode) == null ? void 0 : i.call(o, a)) ?? !1;
257
- if (!(!r && l.length === 0)) {
258
- if (r) {
256
+ var r;
257
+ const t = a[v.value], l = t != null && t.length ? fe(t) : [], i = ((r = o.filterTreeNode) == null ? void 0 : r.call(o, a)) ?? !1;
258
+ if (!(!i && l.length === 0)) {
259
+ if (i) {
259
260
  n.push(a);
260
261
  return;
261
262
  }
@@ -269,34 +270,34 @@ const qe = {
269
270
  const B = s(() => !o.filterTreeNode || !Ae.value ? o.data : fe(o.data)), Me = s(() => new Set(x.value)), b = s(() => {
270
271
  const e = [], n = (a, t) => {
271
272
  a.forEach((l) => {
272
- const r = l[h.value];
273
- e.push({ key: r, node: l, level: t });
274
- const i = l[v.value];
275
- i != null && i.length && Me.value.has(r) && n(i, t + 1);
273
+ const i = l[h.value];
274
+ e.push({ key: i, node: l, level: t });
275
+ const r = l[v.value];
276
+ r != null && r.length && Me.value.has(i) && n(r, t + 1);
276
277
  });
277
278
  };
278
279
  return n(B.value, 0), e;
279
- }), Pe = s(() => m.value ? Math.ceil(R.value / z.value) + ae.value * 2 : b.value.length), G = s(() => m.value ? Math.max(0, Math.floor(N.value / z.value) - ae.value) : 0), he = s(() => m.value ? Math.min(b.value.length, G.value + Pe.value) : b.value.length), He = s(() => m.value ? b.value.slice(G.value, he.value) : b.value), ye = s(() => m.value ? G.value * z.value : 0), ke = s(() => m.value ? Math.max(0, (b.value.length - he.value) * z.value) : 0);
280
+ }), Pe = s(() => m.value ? Math.ceil(R.value / z.value) + ae.value * 2 : b.value.length), G = s(() => m.value ? Math.max(0, Math.floor(I.value / z.value) - ae.value) : 0), he = s(() => m.value ? Math.min(b.value.length, G.value + Pe.value) : b.value.length), Oe = s(() => m.value ? b.value.slice(G.value, he.value) : b.value), ye = s(() => m.value ? G.value * z.value : 0), ke = s(() => m.value ? Math.max(0, (b.value.length - he.value) * z.value) : 0);
280
281
  function me() {
281
- P.value && (N.value = P.value.scrollTop);
282
+ P.value && (I.value = P.value.scrollTop);
282
283
  }
283
284
  function ge() {
284
285
  if (!m.value || !P.value) {
285
- N.value = 0;
286
+ I.value = 0;
286
287
  return;
287
288
  }
288
289
  const e = Math.max(
289
290
  0,
290
291
  b.value.length * z.value - R.value
291
292
  );
292
- N.value > e && (N.value = e, P.value.scrollTop = e);
293
+ I.value > e && (I.value = e, P.value.scrollTop = e);
293
294
  }
294
- function Oe(e) {
295
- m.value && (N.value = e.target.scrollTop);
295
+ function He(e) {
296
+ m.value && (I.value = e.target.scrollTop);
296
297
  }
297
298
  return F(m, (e) => {
298
299
  if (!e) {
299
- N.value = 0;
300
+ I.value = 0;
300
301
  return;
301
302
  }
302
303
  Se(() => {
@@ -338,14 +339,14 @@ const qe = {
338
339
  n ? S.value = [.../* @__PURE__ */ new Set([...x.value, ...a])] : S.value = x.value.filter((t) => !a.includes(t)), c("update:expandedKeys", S.value);
339
340
  }
340
341
  }), (e, n) => (y(), k("div", {
341
- class: we(["x-tree", [{ "x-tree--block-node": u.blockNode, "x-tree--show-line": u.showLine }, xe.value]])
342
+ class: we(["x-tree", [{ "x-tree--block-node": d.blockNode, "x-tree--show-line": d.showLine }, xe.value]])
342
343
  }, [
343
344
  Q("div", {
344
345
  ref_key: "treeViewportRef",
345
346
  ref: P,
346
347
  class: "x-tree__viewport",
347
348
  style: U(Ve.value),
348
- onScroll: Oe
349
+ onScroll: He
349
350
  }, [
350
351
  m.value ? (y(), k(W, { key: 0 }, [
351
352
  b.value.length ? (y(), k("div", qe, [
@@ -354,11 +355,11 @@ const qe = {
354
355
  class: "x-tree__virtual-spacer",
355
356
  style: U({ height: `${ye.value}px` })
356
357
  }, null, 4)) : Y("", !0),
357
- (y(!0), k(W, null, Ke(He.value, (a) => (y(), k("div", {
358
+ (y(!0), k(W, null, Ke(Oe.value, (a) => (y(), k("div", {
358
359
  key: a.key,
359
360
  class: "x-tree__virtual-item"
360
361
  }, [
361
- be(Ne, {
362
+ be(Ie, {
362
363
  node: a.node,
363
364
  "field-key": h.value,
364
365
  "field-title": _.value,
@@ -367,21 +368,22 @@ const qe = {
367
368
  "checked-keys": E.value,
368
369
  "expanded-keys": x.value,
369
370
  "half-checked-keys": A.value,
370
- selectable: u.selectable,
371
- checkable: u.checkable,
372
- "show-line": u.showLine,
373
- "block-node": u.blockNode,
374
- "load-more": u.loadMore,
375
- draggable: u.draggable,
376
- "filter-tree-node": u.filterTreeNode,
377
- "search-value": u.searchValue,
371
+ selectable: d.selectable,
372
+ checkable: d.checkable,
373
+ "show-line": d.showLine,
374
+ "block-node": d.blockNode,
375
+ "load-more": d.loadMore,
376
+ draggable: d.draggable,
377
+ "filter-tree-node": d.filterTreeNode,
378
+ "search-value": d.searchValue,
379
+ "action-on-node-click": d.actionOnNodeClick,
378
380
  level: a.level,
379
381
  "indent-size": te.value,
380
382
  "half-indent-size": le.value,
381
383
  virtualized: "",
382
384
  onSelect: oe,
383
- onCheck: re,
384
- onExpand: ie,
385
+ onCheck: ie,
386
+ onExpand: re,
385
387
  onDragStart: se,
386
388
  onDragEnd: de,
387
389
  onDragOver: ue,
@@ -391,28 +393,28 @@ const qe = {
391
393
  e.$slots.title ? {
392
394
  name: "title",
393
395
  fn: f(({ node: t }) => [
394
- d(e.$slots, "title", { node: t }, void 0, !0)
396
+ u(e.$slots, "title", { node: t }, void 0, !0)
395
397
  ]),
396
398
  key: "0"
397
399
  } : void 0,
398
400
  e.$slots.icon ? {
399
401
  name: "icon",
400
402
  fn: f(({ node: t }) => [
401
- d(e.$slots, "icon", { node: t }, void 0, !0)
403
+ u(e.$slots, "icon", { node: t }, void 0, !0)
402
404
  ]),
403
405
  key: "1"
404
406
  } : void 0,
405
407
  e.$slots.extra ? {
406
408
  name: "extra",
407
409
  fn: f(({ node: t }) => [
408
- d(e.$slots, "extra", { node: t }, void 0, !0)
410
+ u(e.$slots, "extra", { node: t }, void 0, !0)
409
411
  ]),
410
412
  key: "2"
411
413
  } : void 0,
412
414
  e.$slots.switcherIcon ? {
413
415
  name: "switcher-icon",
414
416
  fn: f(({ node: t, expanded: l }) => [
415
- d(e.$slots, "switcherIcon", {
417
+ u(e.$slots, "switcherIcon", {
416
418
  node: t,
417
419
  expanded: l
418
420
  }, void 0, !0)
@@ -422,11 +424,11 @@ const qe = {
422
424
  e.$slots.switcherLineIcon || e.$slots["switcher-line-icon"] ? {
423
425
  name: "switcher-line-icon",
424
426
  fn: f(({ node: t, expanded: l }) => [
425
- e.$slots.switcherLineIcon ? d(e.$slots, "switcherLineIcon", {
427
+ e.$slots.switcherLineIcon ? u(e.$slots, "switcherLineIcon", {
426
428
  key: 0,
427
429
  node: t,
428
430
  expanded: l
429
- }, void 0, !0) : d(e.$slots, "switcher-line-icon", {
431
+ }, void 0, !0) : u(e.$slots, "switcher-line-icon", {
430
432
  key: 1,
431
433
  node: t,
432
434
  expanded: l
@@ -437,10 +439,10 @@ const qe = {
437
439
  e.$slots.loadingIcon || e.$slots["loading-icon"] ? {
438
440
  name: "loading-icon",
439
441
  fn: f(({ node: t }) => [
440
- e.$slots.loadingIcon ? d(e.$slots, "loadingIcon", {
442
+ e.$slots.loadingIcon ? u(e.$slots, "loadingIcon", {
441
443
  key: 0,
442
444
  node: t
443
- }, void 0, !0) : d(e.$slots, "loading-icon", {
445
+ }, void 0, !0) : u(e.$slots, "loading-icon", {
444
446
  key: 1,
445
447
  node: t
446
448
  }, void 0, !0)
@@ -450,17 +452,17 @@ const qe = {
450
452
  e.$slots.dragIcon || e.$slots["drag-icon"] ? {
451
453
  name: "drag-icon",
452
454
  fn: f(({ node: t }) => [
453
- e.$slots.dragIcon ? d(e.$slots, "dragIcon", {
455
+ e.$slots.dragIcon ? u(e.$slots, "dragIcon", {
454
456
  key: 0,
455
457
  node: t
456
- }, void 0, !0) : d(e.$slots, "drag-icon", {
458
+ }, void 0, !0) : u(e.$slots, "drag-icon", {
457
459
  key: 1,
458
460
  node: t
459
461
  }, void 0, !0)
460
462
  ]),
461
463
  key: "6"
462
464
  } : void 0
463
- ]), 1032, ["node", "field-key", "field-title", "field-children", "selected-keys", "checked-keys", "expanded-keys", "half-checked-keys", "selectable", "checkable", "show-line", "block-node", "load-more", "draggable", "filter-tree-node", "search-value", "level", "indent-size", "half-indent-size"])
465
+ ]), 1032, ["node", "field-key", "field-title", "field-children", "selected-keys", "checked-keys", "expanded-keys", "half-checked-keys", "selectable", "checkable", "show-line", "block-node", "load-more", "draggable", "filter-tree-node", "search-value", "action-on-node-click", "level", "indent-size", "half-indent-size"])
464
466
  ]))), 128)),
465
467
  ke.value > 0 ? (y(), k("div", {
466
468
  key: 1,
@@ -468,8 +470,8 @@ const qe = {
468
470
  style: U({ height: `${ke.value}px` })
469
471
  }, null, 4)) : Y("", !0)
470
472
  ])) : (y(), k("div", Fe, [
471
- d(e.$slots, "empty", {}, () => [
472
- Q("span", We, Ce(Ie(Z)("tree.emptyText", void 0, "暂无数据")), 1)
473
+ u(e.$slots, "empty", {}, () => [
474
+ Q("span", We, Ce(Ne(Z)("tree.emptyText", void 0, "暂无数据")), 1)
473
475
  ], !0)
474
476
  ]))
475
477
  ], 64)) : (y(), k(W, { key: 1 }, [
@@ -477,12 +479,12 @@ const qe = {
477
479
  (y(!0), k(W, null, Ke(B.value, (a, t) => (y(), k("div", {
478
480
  key: a[h.value],
479
481
  class: we(["x-tree__root-item", {
480
- "x-tree__root-item--with-line": u.showLine && B.value.length > 1,
482
+ "x-tree__root-item--with-line": d.showLine && B.value.length > 1,
481
483
  "x-tree__root-item--first": t === 0,
482
484
  "x-tree__root-item--last": t === B.value.length - 1
483
485
  }])
484
486
  }, [
485
- be(Ne, {
487
+ be(Ie, {
486
488
  node: a,
487
489
  "field-key": h.value,
488
490
  "field-title": _.value,
@@ -491,20 +493,21 @@ const qe = {
491
493
  "checked-keys": E.value,
492
494
  "expanded-keys": x.value,
493
495
  "half-checked-keys": A.value,
494
- selectable: u.selectable,
495
- checkable: u.checkable,
496
- "show-line": u.showLine,
497
- "block-node": u.blockNode,
498
- "load-more": u.loadMore,
499
- draggable: u.draggable,
500
- "filter-tree-node": u.filterTreeNode,
501
- "search-value": u.searchValue,
496
+ selectable: d.selectable,
497
+ checkable: d.checkable,
498
+ "show-line": d.showLine,
499
+ "block-node": d.blockNode,
500
+ "load-more": d.loadMore,
501
+ draggable: d.draggable,
502
+ "filter-tree-node": d.filterTreeNode,
503
+ "search-value": d.searchValue,
504
+ "action-on-node-click": d.actionOnNodeClick,
502
505
  level: 0,
503
506
  "indent-size": te.value,
504
507
  "half-indent-size": le.value,
505
508
  onSelect: oe,
506
- onCheck: re,
507
- onExpand: ie,
509
+ onCheck: ie,
510
+ onExpand: re,
508
511
  onDragStart: se,
509
512
  onDragEnd: de,
510
513
  onDragOver: ue,
@@ -514,45 +517,45 @@ const qe = {
514
517
  e.$slots.title ? {
515
518
  name: "title",
516
519
  fn: f(({ node: l }) => [
517
- d(e.$slots, "title", { node: l }, void 0, !0)
520
+ u(e.$slots, "title", { node: l }, void 0, !0)
518
521
  ]),
519
522
  key: "0"
520
523
  } : void 0,
521
524
  e.$slots.icon ? {
522
525
  name: "icon",
523
526
  fn: f(({ node: l }) => [
524
- d(e.$slots, "icon", { node: l }, void 0, !0)
527
+ u(e.$slots, "icon", { node: l }, void 0, !0)
525
528
  ]),
526
529
  key: "1"
527
530
  } : void 0,
528
531
  e.$slots.extra ? {
529
532
  name: "extra",
530
533
  fn: f(({ node: l }) => [
531
- d(e.$slots, "extra", { node: l }, void 0, !0)
534
+ u(e.$slots, "extra", { node: l }, void 0, !0)
532
535
  ]),
533
536
  key: "2"
534
537
  } : void 0,
535
538
  e.$slots.switcherIcon ? {
536
539
  name: "switcher-icon",
537
- fn: f(({ node: l, expanded: r }) => [
538
- d(e.$slots, "switcherIcon", {
540
+ fn: f(({ node: l, expanded: i }) => [
541
+ u(e.$slots, "switcherIcon", {
539
542
  node: l,
540
- expanded: r
543
+ expanded: i
541
544
  }, void 0, !0)
542
545
  ]),
543
546
  key: "3"
544
547
  } : void 0,
545
548
  e.$slots.switcherLineIcon || e.$slots["switcher-line-icon"] ? {
546
549
  name: "switcher-line-icon",
547
- fn: f(({ node: l, expanded: r }) => [
548
- e.$slots.switcherLineIcon ? d(e.$slots, "switcherLineIcon", {
550
+ fn: f(({ node: l, expanded: i }) => [
551
+ e.$slots.switcherLineIcon ? u(e.$slots, "switcherLineIcon", {
549
552
  key: 0,
550
553
  node: l,
551
- expanded: r
552
- }, void 0, !0) : d(e.$slots, "switcher-line-icon", {
554
+ expanded: i
555
+ }, void 0, !0) : u(e.$slots, "switcher-line-icon", {
553
556
  key: 1,
554
557
  node: l,
555
- expanded: r
558
+ expanded: i
556
559
  }, void 0, !0)
557
560
  ]),
558
561
  key: "4"
@@ -560,10 +563,10 @@ const qe = {
560
563
  e.$slots.loadingIcon || e.$slots["loading-icon"] ? {
561
564
  name: "loading-icon",
562
565
  fn: f(({ node: l }) => [
563
- e.$slots.loadingIcon ? d(e.$slots, "loadingIcon", {
566
+ e.$slots.loadingIcon ? u(e.$slots, "loadingIcon", {
564
567
  key: 0,
565
568
  node: l
566
- }, void 0, !0) : d(e.$slots, "loading-icon", {
569
+ }, void 0, !0) : u(e.$slots, "loading-icon", {
567
570
  key: 1,
568
571
  node: l
569
572
  }, void 0, !0)
@@ -573,22 +576,22 @@ const qe = {
573
576
  e.$slots.dragIcon || e.$slots["drag-icon"] ? {
574
577
  name: "drag-icon",
575
578
  fn: f(({ node: l }) => [
576
- e.$slots.dragIcon ? d(e.$slots, "dragIcon", {
579
+ e.$slots.dragIcon ? u(e.$slots, "dragIcon", {
577
580
  key: 0,
578
581
  node: l
579
- }, void 0, !0) : d(e.$slots, "drag-icon", {
582
+ }, void 0, !0) : u(e.$slots, "drag-icon", {
580
583
  key: 1,
581
584
  node: l
582
585
  }, void 0, !0)
583
586
  ]),
584
587
  key: "6"
585
588
  } : void 0
586
- ]), 1032, ["node", "field-key", "field-title", "field-children", "selected-keys", "checked-keys", "expanded-keys", "half-checked-keys", "selectable", "checkable", "show-line", "block-node", "load-more", "draggable", "filter-tree-node", "search-value", "indent-size", "half-indent-size"])
589
+ ]), 1032, ["node", "field-key", "field-title", "field-children", "selected-keys", "checked-keys", "expanded-keys", "half-checked-keys", "selectable", "checkable", "show-line", "block-node", "load-more", "draggable", "filter-tree-node", "search-value", "action-on-node-click", "indent-size", "half-indent-size"])
587
590
  ], 2))), 128))
588
591
  ])) : Y("", !0),
589
592
  B.value.length ? Y("", !0) : (y(), k("div", je, [
590
- d(e.$slots, "empty", {}, () => [
591
- Q("span", Ge, Ce(Ie(Z)("tree.emptyText", void 0, "暂无数据")), 1)
593
+ u(e.$slots, "empty", {}, () => [
594
+ Q("span", Ge, Ce(Ne(Z)("tree.emptyText", void 0, "暂无数据")), 1)
592
595
  ], !0)
593
596
  ]))
594
597
  ], 64))
@@ -16,6 +16,7 @@ type __VLS_Props = {
16
16
  draggable?: boolean;
17
17
  filterTreeNode?: (node: TreeNodeData) => boolean;
18
18
  searchValue?: string;
19
+ actionOnNodeClick?: 'expand';
19
20
  level?: number;
20
21
  indentSize?: number;
21
22
  halfIndentSize?: number;
@@ -1,7 +1,7 @@
1
1
  import o from "./XTreeNode.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-87304d92"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2728b6a0"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };