@web-utils/component 3.0.4 → 3.0.6

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 (109) hide show
  1. package/address-input/index.mjs +22 -24
  2. package/awesome-button/index.mjs +29 -30
  3. package/card/index.mjs +40 -42
  4. package/carousel/index.mjs +25 -27
  5. package/chat/index.mjs +57 -67
  6. package/chunks/FormTemp.7f91629d.mjs +165 -0
  7. package/chunks/confirmable-mixin.817b542f.mjs +116 -0
  8. package/chunks/{dataformat.e655611c.mjs → dataformat.f995e2f9.mjs} +3 -3
  9. package/chunks/{event.10295951.mjs → event.b5d855dd.mjs} +1 -1
  10. package/chunks/{form-input-mixin.78a567bc.mjs → form-input-mixin.4632ad36.mjs} +1 -1
  11. package/chunks/{form-item-mixin.57cb2019.mjs → form-item-mixin.ad148e7b.mjs} +13 -13
  12. package/color-picker/index.mjs +128 -0
  13. package/confirm-button/index.mjs +1 -1
  14. package/confirmable/index.mjs +1 -1
  15. package/data-box/index.mjs +32 -34
  16. package/data-card/index.mjs +33 -35
  17. package/data-cardtext/index.mjs +27 -29
  18. package/data-display/index.mjs +33 -35
  19. package/data-icons/index.mjs +28 -30
  20. package/data-imgtext/index.mjs +27 -30
  21. package/data-operatext/index.mjs +39 -41
  22. package/data-panel/index.mjs +36 -38
  23. package/data-pay/index.mjs +20 -23
  24. package/data-price/index.mjs +32 -34
  25. package/data-progress/index.mjs +27 -30
  26. package/data-rotate/index.mjs +17 -19
  27. package/data-table-picker/index.mjs +22 -23
  28. package/data-tabs/index.mjs +31 -33
  29. package/dialog-form/index.mjs +22 -27
  30. package/dynamic-table/index.mjs +36 -40
  31. package/editable-progress/index.mjs +14 -16
  32. package/editable-tree/index.mjs +139 -143
  33. package/egd-collapse-item/index.mjs +2 -1
  34. package/element-dialog/index.mjs +24 -25
  35. package/flow-designer/index.mjs +1095 -1111
  36. package/form-block/index.mjs +22 -24
  37. package/form-cascader/index.mjs +20 -20
  38. package/form-checkbox-group/index.mjs +24 -25
  39. package/form-date-picker/index.mjs +18 -19
  40. package/form-holder/index.mjs +14 -15
  41. package/form-input/index.mjs +23 -23
  42. package/form-input-email/index.mjs +17 -17
  43. package/form-input-id-card/index.mjs +24 -24
  44. package/form-input-number/index.mjs +1 -1
  45. package/form-input-phone-number/index.mjs +26 -26
  46. package/form-input-tag/index.mjs +1 -1
  47. package/form-input-time/index.mjs +17 -17
  48. package/form-item/index.mjs +54 -56
  49. package/form-item-group/index.mjs +31 -33
  50. package/form-radio-group/index.mjs +51 -52
  51. package/form-select/index.mjs +31 -32
  52. package/form-switch/index.mjs +22 -22
  53. package/form-textarea/index.mjs +20 -20
  54. package/fy-array/index.mjs +61 -65
  55. package/fy-cascader/index.mjs +19 -20
  56. package/fy-checkbox/index.mjs +32 -37
  57. package/fy-code/index.mjs +13 -10
  58. package/fy-curd/index.mjs +638 -660
  59. package/fy-date/index.mjs +20 -21
  60. package/fy-draggable/index.mjs +19 -20
  61. package/fy-dynamic/index.mjs +26 -27
  62. package/fy-form/index.mjs +111 -122
  63. package/fy-form-design/index.mjs +1238 -1270
  64. package/fy-input/index.mjs +15 -17
  65. package/fy-input-color/index.mjs +25 -27
  66. package/fy-input-icon/index.mjs +20 -21
  67. package/fy-input-map/index.mjs +22 -24
  68. package/fy-input-number/index.mjs +22 -23
  69. package/fy-input-table/index.mjs +15 -17
  70. package/fy-input-tree/index.mjs +28 -32
  71. package/fy-progress/index.mjs +23 -24
  72. package/fy-radio/index.mjs +18 -23
  73. package/fy-rate/index.mjs +12 -13
  74. package/fy-select/index.mjs +40 -44
  75. package/fy-slider/index.mjs +17 -18
  76. package/fy-switch/index.mjs +20 -21
  77. package/fy-tabs/index.mjs +19 -21
  78. package/fy-time/index.mjs +14 -20
  79. package/fy-title/index.mjs +1 -1
  80. package/fy-tree/index.mjs +17 -21
  81. package/fy-upload/index.mjs +74 -76
  82. package/guide-steps/index.mjs +22 -24
  83. package/image-cropper/index.mjs +50 -51
  84. package/image-preview/index.mjs +24 -26
  85. package/index.mjs +480 -477
  86. package/input-number/index.mjs +13 -14
  87. package/input-number-range/index.mjs +23 -24
  88. package/login/index.mjs +35 -40
  89. package/nav-bar/index.mjs +13 -14
  90. package/notice/index.mjs +18 -19
  91. package/package.json +8 -9
  92. package/page-index/index.mjs +33 -34
  93. package/page-index-top/index.mjs +22 -24
  94. package/pageable-table/index.mjs +92 -96
  95. package/pageable-view/index.mjs +33 -34
  96. package/search/index.mjs +21 -23
  97. package/static-pageable-table/index.mjs +18 -20
  98. package/swiper/index.mjs +22 -23
  99. package/table-view/index.mjs +49 -53
  100. package/tag-render/index.mjs +19 -21
  101. package/text-ellipsis/index.mjs +11 -12
  102. package/tinymce-editor/index.mjs +50 -51
  103. package/toolbar-button/index.mjs +18 -19
  104. package/vue-cron/index.mjs +104 -112
  105. package/web-types.json +85 -1
  106. package/x-input-tag/index.mjs +47 -50
  107. package/chunks/FormTemp.d079292b.mjs +0 -139
  108. package/chunks/confirmable-mixin.26e1d0e0.mjs +0 -197
  109. package/chunks/detail.d6f8e347.mjs +0 -29
@@ -1,45 +1,41 @@
1
- var b = Object.defineProperty, k = Object.defineProperties;
2
- var B = Object.getOwnPropertyDescriptors;
3
- var w = Object.getOwnPropertySymbols;
4
- var T = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
5
- var N = (e, i, t) => i in e ? b(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, h = (e, i) => {
1
+ var b = Object.defineProperty, _ = Object.defineProperties;
2
+ var k = Object.getOwnPropertyDescriptors;
3
+ var x = Object.getOwnPropertySymbols;
4
+ var B = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
5
+ var w = (e, i, t) => i in e ? b(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, c = (e, i) => {
6
6
  for (var t in i || (i = {}))
7
- T.call(i, t) && N(e, t, i[t]);
8
- if (w)
9
- for (var t of w(i))
10
- M.call(i, t) && N(e, t, i[t]);
7
+ B.call(i, t) && w(e, t, i[t]);
8
+ if (x)
9
+ for (var t of x(i))
10
+ T.call(i, t) && w(e, t, i[t]);
11
11
  return e;
12
- }, u = (e, i) => k(e, B(i));
13
- var r = (e, i, t) => new Promise((s, a) => {
14
- var o = (c) => {
12
+ }, h = (e, i) => _(e, k(i));
13
+ var r = (e, i, t) => new Promise((s, o) => {
14
+ var n = (d) => {
15
15
  try {
16
- l(t.next(c));
17
- } catch (m) {
18
- a(m);
16
+ l(t.next(d));
17
+ } catch (f) {
18
+ o(f);
19
19
  }
20
- }, n = (c) => {
20
+ }, a = (d) => {
21
21
  try {
22
- l(t.throw(c));
23
- } catch (m) {
24
- a(m);
22
+ l(t.throw(d));
23
+ } catch (f) {
24
+ o(f);
25
25
  }
26
- }, l = (c) => c.done ? s(c.value) : Promise.resolve(c.value).then(o, n);
26
+ }, l = (d) => d.done ? s(d.value) : Promise.resolve(d.value).then(n, a);
27
27
  l((t = t.apply(e, i)).next());
28
28
  });
29
- import { hasOwn as y, isVerticalScrollbarVisible as K, scrollbarWidth as P, computePosition as D, isPlainObject as p, isFunction as C, isUndefined as f, isNotEmpty as L, fastClone as R, delay as E, findTreeChildren as z } from "@web-utils/core";
30
- import { addResizeListener as g, removeResizeListener as v } from "@web-utils/integrations/resize";
31
- import { cloneDeep as $ } from "@web-utils/integrations/lodash";
32
- import { a as S, b as V, c as x } from "../chunks/index.57f871af.mjs";
33
- import d from "element-ui/lib/button";
34
- import A from "element-ui/lib/input";
35
- import I from "element-ui/lib/popconfirm";
36
- import O from "element-ui/lib/tree";
37
- import { n as F } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
38
- var j = function() {
29
+ import { hasOwn as m, isVerticalScrollbarVisible as M, scrollbarWidth as K, computePosition as P, isPlainObject as u, isFunction as N, isUndefined as p, isNotEmpty as E, fastClone as D, delay as L, findTreeChildren as R } from "@web-utils/core";
30
+ import { addResizeListener as C, removeResizeListener as v } from "@web-utils/integrations/resize";
31
+ import { cloneDeep as g } from "@web-utils/integrations/lodash";
32
+ import { a as z, b as S, c as y } from "../chunks/index.57f871af.mjs";
33
+ import { n as V } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
34
+ var A = function() {
39
35
  var e = this, i = e.$createElement, t = e._self._c || i;
40
36
  return t("div", {
41
37
  staticClass: "editable-tree"
42
- }, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? t(d, {
38
+ }, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? t("ElButton", {
43
39
  staticStyle: {
44
40
  position: "absolute",
45
41
  top: "4px",
@@ -67,7 +63,7 @@ var j = function() {
67
63
  staticStyle: {
68
64
  "padding-left": "24px"
69
65
  }
70
- }, [t(d, {
66
+ }, [t("ElButton", {
71
67
  attrs: {
72
68
  disabled: e.loading,
73
69
  size: "mini",
@@ -78,7 +74,7 @@ var j = function() {
78
74
  }
79
75
  }, [t("i", {
80
76
  staticClass: "el-icon-lx-add"
81
- }), e._v(" " + e._s(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`) + " ")])], 1) : e._e(), t(O, e._g(e._b({
77
+ }), e._v(" " + e._s(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`) + " ")])], 1) : e._e(), t("ElTree", e._g(e._b({
82
78
  key: e.treeKey,
83
79
  ref: "tree",
84
80
  staticClass: "flex-item",
@@ -101,17 +97,17 @@ var j = function() {
101
97
  scopedSlots: e._u([{
102
98
  key: "default",
103
99
  fn: function(s) {
104
- var a = s.node, o = s.data;
100
+ var o = s.node, n = s.data;
105
101
  return [e._t("default", function() {
106
- return [o.edit ? [t("span", {
102
+ return [n.edit ? [t("span", {
107
103
  staticClass: "custom-tree-node flex-row flex-item oh",
108
104
  attrs: {
109
- "data-id": o.id
105
+ "data-id": n.id
110
106
  }
111
107
  }, [e.icon ? t("i", {
112
108
  staticClass: "node-icon shrink-0",
113
- class: o.loading ? "el-icon-loading" : "el-icon-edit-outline"
114
- }) : e._e(), t(A, {
109
+ class: n.loading ? "el-icon-loading" : "el-icon-edit-outline"
110
+ }) : e._e(), t("ElInput", {
115
111
  ref: "labelTxt",
116
112
  staticClass: "node-input flex-item",
117
113
  attrs: {
@@ -119,32 +115,32 @@ var j = function() {
119
115
  placeholder: e.defaultOptions.inputPlaceholder
120
116
  },
121
117
  on: {
122
- blur: function(n) {
123
- return e.inputBlur(n, a, o);
118
+ blur: function(a) {
119
+ return e.inputBlur(a, o, n);
124
120
  }
125
121
  },
126
122
  nativeOn: {
127
- keyup: function(n) {
123
+ keyup: function(a) {
128
124
  return function(l) {
129
- return e.inputKeyup(l, a, o);
125
+ return e.inputKeyup(l, o, n);
130
126
  }.apply(null, arguments);
131
127
  },
132
- click: function(n) {
133
- n.stopPropagation();
128
+ click: function(a) {
129
+ a.stopPropagation();
134
130
  }
135
131
  },
136
132
  model: {
137
133
  value: e.text,
138
- callback: function(n) {
139
- e.text = n;
134
+ callback: function(a) {
135
+ e.text = a;
140
136
  },
141
137
  expression: "text"
142
138
  }
143
- }), e.confirmButton ? [t(d, {
139
+ }), e.confirmButton ? [t("ElButton", {
144
140
  directives: [{
145
141
  name: "show",
146
142
  rawName: "v-show",
147
- value: !o.loading,
143
+ value: !n.loading,
148
144
  expression: "!data.loading"
149
145
  }],
150
146
  staticClass: "shrink-0",
@@ -153,15 +149,15 @@ var j = function() {
153
149
  type: "text"
154
150
  },
155
151
  on: {
156
- click: function(n) {
157
- return n.stopPropagation(), e.onConfirm(a, o);
152
+ click: function(a) {
153
+ return a.stopPropagation(), e.onConfirm(o, n);
158
154
  }
159
155
  }
160
- }, [e._v("确定")]), t(d, {
156
+ }, [e._v("确定")]), t("ElButton", {
161
157
  directives: [{
162
158
  name: "show",
163
159
  rawName: "v-show",
164
- value: !o.loading,
160
+ value: !n.loading,
165
161
  expression: "!data.loading"
166
162
  }],
167
163
  staticClass: "shrink-0",
@@ -170,20 +166,20 @@ var j = function() {
170
166
  type: "text"
171
167
  },
172
168
  on: {
173
- click: function(n) {
174
- return n.stopPropagation(), e.onCancel(a, o);
169
+ click: function(a) {
170
+ return a.stopPropagation(), e.onCancel(o, n);
175
171
  }
176
172
  }
177
173
  }, [e._v("取消")])] : e._e()], 2)] : [t("span", {
178
174
  staticClass: "custom-tree-node",
179
175
  attrs: {
180
- "data-id": o.id
176
+ "data-id": n.id
181
177
  }
182
178
  }, [t("span", {
183
179
  staticClass: "node-label flex-row flex-item oh ellipsis-1"
184
180
  }, [e.icon ? t("i", {
185
181
  staticClass: "node-icon",
186
- class: o.loading ? "el-icon-loading" : e.icon(o, a)
182
+ class: n.loading ? "el-icon-loading" : e.icon(n, o)
187
183
  }) : e._e(), t("span", {
188
184
  staticClass: "flex-item-relative",
189
185
  staticStyle: {
@@ -192,63 +188,63 @@ var j = function() {
192
188
  }, [t("span", {
193
189
  staticClass: "ellipsis-1 absolute-box et-tree-label",
194
190
  attrs: {
195
- title: a.label
191
+ title: o.label
196
192
  }
197
193
  }, [e._t("label", function() {
198
- return [e._v(e._s(a.label))];
194
+ return [e._v(e._s(o.label))];
199
195
  }, {
200
- data: o,
201
- node: a
196
+ data: n,
197
+ node: o
202
198
  })], 2)]), e._t("label-suffix", null, {
203
- node: a,
204
- data: o
199
+ node: o,
200
+ data: n
205
201
  })], 2), !e.contextMenu && !e.readonly ? t("span", {
206
202
  directives: [{
207
203
  name: "show",
208
204
  rawName: "v-show",
209
- value: !o.loading && !e.loading,
205
+ value: !n.loading && !e.loading,
210
206
  expression: "!data.loading && !loading"
211
207
  }],
212
208
  staticClass: "handle-actions"
213
- }, [t(d, {
209
+ }, [t("ElButton", {
214
210
  attrs: {
215
211
  size: "mini",
216
212
  type: "text"
217
213
  },
218
214
  on: {
219
- click: function(n) {
220
- return n.stopPropagation(), e.appendChildNode(a, o);
215
+ click: function(a) {
216
+ return a.stopPropagation(), e.appendChildNode(o, n);
221
217
  }
222
218
  }
223
- }, [e._v("添加")]), t(d, {
219
+ }, [e._v("添加")]), t("ElButton", {
224
220
  attrs: {
225
221
  size: "mini",
226
222
  type: "text"
227
223
  },
228
224
  on: {
229
- click: function(n) {
230
- return n.stopPropagation(), e.editNode(a, o);
225
+ click: function(a) {
226
+ return a.stopPropagation(), e.editNode(o, n);
231
227
  }
232
228
  }
233
- }, [e._v("修改")]), t(I, {
229
+ }, [e._v("修改")]), t("ElPopconfirm", {
234
230
  staticClass: "pop-confirm",
235
231
  attrs: {
236
232
  "icon-color": "red",
237
233
  title: "你确定要删除吗?"
238
234
  },
239
235
  on: {
240
- confirm: function(n) {
241
- return e.removeNode(a, o);
236
+ confirm: function(a) {
237
+ return e.removeNode(o, n);
242
238
  }
243
239
  },
244
240
  scopedSlots: e._u([{
245
241
  key: "reference",
246
242
  fn: function() {
247
- return [t(d, {
243
+ return [t("ElButton", {
248
244
  directives: [{
249
245
  name: "show",
250
246
  rawName: "v-show",
251
- value: a.isLeaf,
247
+ value: o.isLeaf,
252
248
  expression: "node.isLeaf"
253
249
  }],
254
250
  staticStyle: {
@@ -259,8 +255,8 @@ var j = function() {
259
255
  type: "text"
260
256
  },
261
257
  on: {
262
- click: function(n) {
263
- n.stopPropagation();
258
+ click: function(a) {
259
+ a.stopPropagation();
264
260
  }
265
261
  }
266
262
  }, [e._v("删除")])];
@@ -271,14 +267,14 @@ var j = function() {
271
267
  directives: [{
272
268
  name: "show",
273
269
  rawName: "v-show",
274
- value: !o.loading && !e.loading,
270
+ value: !n.loading && !e.loading,
275
271
  expression: "!data.loading && !loading"
276
272
  }],
277
273
  staticClass: "handle-actions",
278
274
  staticStyle: {
279
275
  display: "inline-block"
280
276
  }
281
- }, [t(d, {
277
+ }, [t("ElButton", {
282
278
  staticStyle: {
283
279
  padding: "6px 10px 0"
284
280
  },
@@ -287,14 +283,14 @@ var j = function() {
287
283
  type: "text"
288
284
  },
289
285
  on: {
290
- click: function(n) {
291
- return n.stopPropagation(), e.showContextMenu(n, o, a);
286
+ click: function(a) {
287
+ return a.stopPropagation(), e.showContextMenu(a, n, o);
292
288
  }
293
289
  }
294
290
  }, [e._v(". . .")])], 1) : e._e()])]];
295
291
  }, {
296
- node: a,
297
- data: o
292
+ node: o,
293
+ data: n
298
294
  })];
299
295
  }
300
296
  }], null, !0)
@@ -382,8 +378,8 @@ var j = function() {
382
378
  curNode: e.curNode,
383
379
  curData: e.curData
384
380
  })], 2)]) : e._e()], 1)], 1);
385
- }, W = [];
386
- const q = {
381
+ }, I = [];
382
+ const O = {
387
383
  name: "EditableTree",
388
384
  props: {
389
385
  label: {
@@ -442,7 +438,7 @@ const q = {
442
438
  default: () => ({
443
439
  children: "children",
444
440
  label: "name",
445
- isLeaf: (e) => y(e, "hasChildren") ? !e.hasChildren : y(e, "hasChild") ? !e.hasChild : y(e, "children") && e.children ? e.children.length === 0 : !0
441
+ isLeaf: (e) => m(e, "hasChildren") ? !e.hasChildren : m(e, "hasChild") ? !e.hasChild : m(e, "children") && e.children ? e.children.length === 0 : !0
446
442
  })
447
443
  },
448
444
  menuLabel: {
@@ -516,14 +512,14 @@ const q = {
516
512
  this.tryFetch();
517
513
  },
518
514
  mounted() {
519
- g(this.$refs.tree.$el, this.resize), g(this.$refs.treeWrapper, this.resize);
515
+ C(this.$refs.tree.$el, this.resize), C(this.$refs.treeWrapper, this.resize);
520
516
  },
521
517
  beforeDestroy() {
522
518
  v(this.$refs.tree.$el, this.resize), v(this.$refs.treeWrapper, this.resize);
523
519
  },
524
520
  methods: {
525
- filterTreeProperties: S,
526
- filterTreeEvents: V,
521
+ filterTreeProperties: z,
522
+ filterTreeEvents: S,
527
523
  addExpandKey(e) {
528
524
  this.reserveExpandKey && this.expandedKeys.push(e[this.nodeKey]);
529
525
  },
@@ -531,11 +527,11 @@ const q = {
531
527
  this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((i) => i !== e[this.nodeKey]));
532
528
  },
533
529
  resize() {
534
- K(this.$refs.treeWrapper) ? this.right = 4 + P : this.right = 4;
530
+ M(this.$refs.treeWrapper) ? this.right = 4 + K : this.right = 4;
535
531
  },
536
532
  showContextMenu(e, i, t) {
537
533
  return r(this, null, function* () {
538
- i.contextmenu === !1 || i.id === -1 || i.id === 0 || i.edit === !0 || this.contextMenu && (this.curNode = t, this.curData = i, this.showMenu = !0, this.$refs.tree.setCurrentKey(i.id), yield this.$nextTick(), this.position = D(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
534
+ i.contextmenu === !1 || i.id === -1 || i.id === 0 || i.edit === !0 || this.contextMenu && (this.curNode = t, this.curData = i, this.showMenu = !0, this.$refs.tree.setCurrentKey(i.id), yield this.$nextTick(), this.position = P(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
539
535
  });
540
536
  },
541
537
  hideContextMenu() {
@@ -546,12 +542,12 @@ const q = {
546
542
  var e, i;
547
543
  if (this.lazy === !1 && this.fetchApi) {
548
544
  const t = yield this.fetchApi((i = (e = this.rootNode) == null ? void 0 : e.id) != null ? i : -1, {});
549
- if (p(t.data) && (t.data = [t.data]), t.data = t.data || [], this.empty = t.data.length === 0, p(this.customRootNode)) {
550
- const s = $(this.customRootNode);
545
+ if (u(t.data) && (t.data = [t.data]), t.data = t.data || [], this.empty = t.data.length === 0, u(this.customRootNode)) {
546
+ const s = g(this.customRootNode);
551
547
  s[this.treeProps.children || "children"] = t.data, this.treeData = [s];
552
- } else if (C(this.customRootNode)) {
548
+ } else if (N(this.customRootNode)) {
553
549
  const s = this.customRootNode(t.data);
554
- s[this.treeProps.children || "children"] = t.data, this.treeData = p(s) ? [s] : s;
550
+ s[this.treeProps.children || "children"] = t.data, this.treeData = u(s) ? [s] : s;
555
551
  } else
556
552
  this.treeData = t.data;
557
553
  }
@@ -559,23 +555,23 @@ const q = {
559
555
  },
560
556
  loadNode(e, i) {
561
557
  return r(this, null, function* () {
562
- var t, s, a, o;
558
+ var t, s, o, n;
563
559
  if (e.level === 0) {
564
- const n = yield this.fetchApi((s = (t = this.rootNode) == null ? void 0 : t.id) != null ? s : -1, e);
565
- if (this.empty = n.data.length === 0, p(this.customRootNode)) {
566
- const l = $(this.customRootNode);
567
- l[this.treeProps.children || "children"] = n.data, i([l]);
568
- } else if (C(this.customRootNode)) {
569
- const l = this.customRootNode(n.data);
570
- l[this.treeProps.children || "children"] = n.data, this.treeData = p(l) ? [l] : l;
560
+ const a = yield this.fetchApi((s = (t = this.rootNode) == null ? void 0 : t.id) != null ? s : -1, e);
561
+ if (this.empty = a.data.length === 0, u(this.customRootNode)) {
562
+ const l = g(this.customRootNode);
563
+ l[this.treeProps.children || "children"] = a.data, i([l]);
564
+ } else if (N(this.customRootNode)) {
565
+ const l = this.customRootNode(a.data);
566
+ l[this.treeProps.children || "children"] = a.data, this.treeData = u(l) ? [l] : l;
571
567
  } else
572
- i(n.data);
573
- yield this.$nextTick(), this.$emit("root-node-loaded", n.data), this.defaultExpandedKeys ? this.expandedKeys = [(a = n == null ? void 0 : n.data[0]) == null ? void 0 : a.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(o = n == null ? void 0 : n.data[0]) == null ? void 0 : o.id]);
568
+ i(a.data);
569
+ yield this.$nextTick(), this.$emit("root-node-loaded", a.data), this.defaultExpandedKeys ? this.expandedKeys = [(o = a == null ? void 0 : a.data[0]) == null ? void 0 : o.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(n = a == null ? void 0 : a.data[0]) == null ? void 0 : n.id]);
574
570
  } else {
575
571
  if (e.leaf || e.data.isTempNode)
576
572
  return i([]);
577
- const n = yield this.fetchApi(e.data.id, e);
578
- i(n.data), yield this.$nextTick(), this.$emit("node-loaded", n.data);
573
+ const a = yield this.fetchApi(e.data.id, e);
574
+ i(a.data), yield this.$nextTick(), this.$emit("node-loaded", a.data);
579
575
  }
580
576
  });
581
577
  },
@@ -589,35 +585,35 @@ const q = {
589
585
  this.newChild && this.newChild.id === -1 && (console.log(this.newChild), this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
590
586
  },
591
587
  cancelEdit() {
592
- this.editData && (f(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
588
+ this.editData && (p(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
593
589
  },
594
590
  editNode(e, i) {
595
591
  return r(this, null, function* () {
596
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = i, this.text = i[this.treeProps.label], f(i.edit) ? this.$set(i, "edit", !0) : i.edit = !0, yield this.$nextTick(), this.$refs.labelTxt.focus()) : yield this.$prompt(`请输入新的${this.label}名:`, u(h({}, this.defaultOptions), {
592
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = i, this.text = i[this.treeProps.label], p(i.edit) ? this.$set(i, "edit", !0) : i.edit = !0, yield this.$nextTick(), this.$refs.labelTxt.focus()) : yield this.$prompt(`请输入新的${this.label}名:`, h(c({}, this.defaultOptions), {
597
593
  inputValue: i[this.treeProps.label],
598
- beforeClose: (t, s, a) => r(this, null, function* () {
594
+ beforeClose: (t, s, o) => r(this, null, function* () {
599
595
  if (t === "confirm") {
600
596
  try {
601
- s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...", this.text = s.inputValue, yield this.onConfirm(this.curNode, this.curData), a();
602
- } catch (o) {
597
+ s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...", this.text = s.inputValue, yield this.onConfirm(this.curNode, this.curData), o();
598
+ } catch (n) {
603
599
  s.confirmButtonText = "确定";
604
600
  }
605
601
  s.confirmButtonLoading = !1;
606
602
  } else
607
- a();
603
+ o();
608
604
  })
609
605
  })).catch((t) => t);
610
606
  });
611
607
  },
612
608
  appendRootNode() {
613
609
  return r(this, null, function* () {
614
- this.text = "", !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(void 0), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), yield this.scrollIntoView(!0)) : yield this.$prompt(`请输入${this.label}名:`, u(h({}, this.defaultOptions), {
610
+ this.text = "", !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(void 0), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), yield this.scrollIntoView(!0)) : yield this.$prompt(`请输入${this.label}名:`, h(c({}, this.defaultOptions), {
615
611
  beforeClose: (e, i, t) => r(this, null, function* () {
616
612
  if (e === "confirm") {
617
613
  try {
618
614
  this.createNewChild(-1), i.confirmButtonLoading = !0, i.confirmButtonText = "处理中...";
619
615
  const s = yield this.saveApi(this.newNodeBuilder(i.inputValue, { id: -1 }));
620
- this.newChild[this.treeProps.label] = i.inputValue, this.newChild.edit = !1, x(this.newChild, s.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), yield this.locateView(), t();
616
+ this.newChild[this.treeProps.label] = i.inputValue, this.newChild.edit = !1, y(this.newChild, s.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), yield this.locateView(), t();
621
617
  } catch (s) {
622
618
  i.confirmButtonText = "确定";
623
619
  }
@@ -632,19 +628,19 @@ const q = {
632
628
  this.text = "";
633
629
  const i = e.expanded;
634
630
  e.expand(() => r(this, null, function* () {
635
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(e.data.id), this.$refs.tree.append(this.newChild, e), yield this.scrollIntoView(i)) : yield this.$prompt(`请输入${this.label}名:`, u(h({}, this.defaultOptions), {
636
- beforeClose: (t, s, a) => r(this, null, function* () {
631
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(e.data.id), this.$refs.tree.append(this.newChild, e), yield this.scrollIntoView(i)) : yield this.$prompt(`请输入${this.label}名:`, h(c({}, this.defaultOptions), {
632
+ beforeClose: (t, s, o) => r(this, null, function* () {
637
633
  if (t === "confirm") {
638
634
  try {
639
635
  this.createNewChild(e.data.id), s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...";
640
- const o = yield this.saveApi(this.newNodeBuilder(s.inputValue, e.data));
641
- this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1, x(this.newChild, o.data), this.$refs.tree.append(this.newChild, e), yield this.locateView(), a();
642
- } catch (o) {
636
+ const n = yield this.saveApi(this.newNodeBuilder(s.inputValue, e.data));
637
+ this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1, y(this.newChild, n.data), this.$refs.tree.append(this.newChild, e), yield this.locateView(), o();
638
+ } catch (n) {
643
639
  s.confirmButtonText = "确定";
644
640
  }
645
641
  s.confirmButtonLoading = !1;
646
642
  } else
647
- a();
643
+ o();
648
644
  })
649
645
  })).catch((t) => t);
650
646
  }));
@@ -719,9 +715,9 @@ const q = {
719
715
  if (i === "confirm") {
720
716
  try {
721
717
  t.confirmButtonLoading = !0, t.confirmButtonText = "删除...";
722
- const a = e.parent, o = yield this.deleteApi(e.data.id);
723
- o.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", a, e.data), s()) : this.$message.error(o.message);
724
- } catch (a) {
718
+ const o = e.parent, n = yield this.deleteApi(e.data.id);
719
+ n.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", o, e.data), s()) : this.$message.error(n.message);
720
+ } catch (o) {
725
721
  }
726
722
  t.confirmButtonText = "确定", t.confirmButtonLoading = !1;
727
723
  } else
@@ -746,17 +742,17 @@ const q = {
746
742
  },
747
743
  onConfirm(e, i) {
748
744
  return r(this, null, function* () {
749
- if (i[this.treeProps.label] === this.text || !L(this.text)) {
745
+ if (i[this.treeProps.label] === this.text || !E(this.text)) {
750
746
  this.clear();
751
747
  return;
752
748
  }
753
- f(i.loading) ? this.$set(i, "loading", !0) : i.loading = !0;
749
+ p(i.loading) ? this.$set(i, "loading", !0) : i.loading = !0;
754
750
  try {
755
751
  if (this.loading = !0, i.id === -1) {
756
- const t = yield this.saveApi(this.newNodeBuilder(this.text, e.parent.data || { id: -1 })), s = R(i);
757
- x(i, u(h({}, t.data), { isTempNode: !1 })), this.$emit("node-added", i, s, e), this.registerNode(e);
752
+ const t = yield this.saveApi(this.newNodeBuilder(this.text, e.parent.data || { id: -1 })), s = D(i);
753
+ y(i, h(c({}, t.data), { isTempNode: !1 })), this.$emit("node-added", i, s, e), this.registerNode(e);
758
754
  } else
759
- yield this.updateApi(u(h({}, i), { [this.treeProps.label]: this.text }));
755
+ yield this.updateApi(h(c({}, i), { [this.treeProps.label]: this.text }));
760
756
  i[this.treeProps.label] = this.text, i.edit = !1, this.$emit("node-updated", i, e), this.text = "";
761
757
  } catch (t) {
762
758
  }
@@ -767,7 +763,7 @@ const q = {
767
763
  i.id === -1 ? this.$refs.tree.remove(e) : i.edit = !1, this.text = "";
768
764
  },
769
765
  nodeClick(e, i, t) {
770
- this.hideContextMenu(), (f(e.loading) || !e.loading) && (this.curNode = i, this.curData = e, this.$emit("on-node-click", e, i, t));
766
+ this.hideContextMenu(), (p(e.loading) || !e.loading) && (this.curNode = i, this.curData = e, this.$emit("on-node-click", e, i, t));
771
767
  },
772
768
  getCurrentNode() {
773
769
  return this.$refs.tree.getCurrentNode();
@@ -782,7 +778,7 @@ const q = {
782
778
  scrollIntoView(e) {
783
779
  return r(this, null, function* () {
784
780
  var i, t;
785
- yield this.$nextTick(), e || (yield E(300)), (t = (i = this.$refs) == null ? void 0 : i.labelTxt) == null || t.focus();
781
+ yield this.$nextTick(), e || (yield L(300)), (t = (i = this.$refs) == null ? void 0 : i.labelTxt) == null || t.focus();
786
782
  });
787
783
  },
788
784
  inputKeyup(e, i, t) {
@@ -810,7 +806,7 @@ const q = {
810
806
  return this.$refs.tree.root;
811
807
  },
812
808
  findTreeNode(e) {
813
- return z(
809
+ return R(
814
810
  this.$refs.tree.root.childNodes,
815
811
  (i) => i.data === e || i.data.id === e,
816
812
  "childNodes"
@@ -825,24 +821,24 @@ const q = {
825
821
  });
826
822
  }
827
823
  }
828
- }, _ = {};
829
- var U = /* @__PURE__ */ F(
830
- q,
831
- j,
832
- W,
824
+ }, $ = {};
825
+ var F = /* @__PURE__ */ V(
826
+ O,
827
+ A,
828
+ I,
833
829
  !1,
834
- H,
830
+ j,
835
831
  null,
836
832
  null,
837
833
  null
838
834
  );
839
- function H(e) {
840
- for (let i in _)
841
- this[i] = _[i];
835
+ function j(e) {
836
+ for (let i in $)
837
+ this[i] = $[i];
842
838
  }
843
- const ne = /* @__PURE__ */ function() {
844
- return U.exports;
839
+ const Q = /* @__PURE__ */ function() {
840
+ return F.exports;
845
841
  }();
846
842
  export {
847
- ne as default
843
+ Q as default
848
844
  };
@@ -50,7 +50,7 @@ var r = function() {
50
50
  return [e._v(" " + e._s(e.title) + " ")];
51
51
  }, {
52
52
  title: e.title
53
- })], 2)]), t(c, [t("div", {
53
+ })], 2)]), t("ElCollapseTransition", [t("div", {
54
54
  directives: [{
55
55
  name: "show",
56
56
  rawName: "v-show",
@@ -70,6 +70,7 @@ var r = function() {
70
70
  }, d = [];
71
71
  const p = {
72
72
  name: "EgdCollapseItem",
73
+ components: { ElCollapseTransition: c },
73
74
  componentName: "EgdCollapseItem",
74
75
  mixins: [a],
75
76
  inject: ["collapse"],