@web-utils/component 3.8.3 → 4.0.1

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 (211) hide show
  1. package/awesome-button/index.mjs +25 -55
  2. package/base.css +1 -1
  3. package/card/index.mjs +13 -13
  4. package/card/style.css +1 -1
  5. package/carousel/style.css +1 -1
  6. package/chat/index.mjs +2 -2
  7. package/chat/style.css +1 -1
  8. package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
  9. package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
  10. package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
  11. package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
  12. package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
  13. package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
  14. package/chunks/{FormTemp.BSpnNput.mjs → FormTemp.Bu2VCxUh.mjs} +2 -2
  15. package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
  16. package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
  17. package/chunks/configComponents.BDhlZU8F.mjs +23 -0
  18. package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
  19. package/chunks/core.DJEgjQW6.mjs +54 -0
  20. package/chunks/{dataformat.B9UvztrQ.mjs → dataformat.CpqOeGBl.mjs} +2 -2
  21. package/chunks/{dic.CET0XdKP.mjs → dic.Dkl-leRW.mjs} +43 -43
  22. package/chunks/dictionary.DqiP9x2m.mjs +25 -0
  23. package/chunks/{event.BT1F_1vF.mjs → event.9aDS6jcw.mjs} +2 -2
  24. package/chunks/form-input.B8z37eqj.mjs +31 -0
  25. package/chunks/form-item.D-H-wCPE.mjs +233 -0
  26. package/chunks/form-validate.CVarNHKX.mjs +12 -0
  27. package/chunks/helper.BiMLcEEk.mjs +41 -0
  28. package/chunks/index.9OxHjTIE.mjs +16 -0
  29. package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
  30. package/chunks/{init.ofpxEyAI.mjs → init.DAsXSoLW.mjs} +2 -2
  31. package/chunks/{packages.CWPkeLu9.mjs → packages.ByyangTp.mjs} +3 -3
  32. package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
  33. package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
  34. package/chunks/{util.CoahLDYn.mjs → util.DqFv_pWg.mjs} +54 -55
  35. package/chunks/utilSelf.Csq1766E.mjs +48 -0
  36. package/color-picker/index.mjs +19 -37
  37. package/comment/style.css +1 -1
  38. package/confirm-button/index.mjs +1 -1
  39. package/confirmable/index.mjs +1 -1
  40. package/context-menu/style.css +1 -1
  41. package/count-up/index.mjs +13 -24
  42. package/custom-scrollbar/index.mjs +1 -2
  43. package/data-operatext/style.css +1 -1
  44. package/data-panel/style.css +1 -1
  45. package/data-pay/style.css +1 -1
  46. package/data-price/style.css +1 -1
  47. package/data-rotate/style.css +1 -1
  48. package/data-table-picker/index.mjs +1 -1
  49. package/data-tabs/style.css +1 -1
  50. package/dialog-form/index.mjs +16 -28
  51. package/dynamic-table/style.css +1 -1
  52. package/easy-popup/index.mjs +22 -40
  53. package/easy-popup/style.css +1 -1
  54. package/editable-tree/index.mjs +203 -250
  55. package/editable-tree/style.css +1 -1
  56. package/element-dialog/index.mjs +30 -52
  57. package/element-dialog/style.css +1 -1
  58. package/flex-column/index.mjs +13 -25
  59. package/flex-item/index.mjs +15 -27
  60. package/flex-row/index.mjs +13 -25
  61. package/flow/index.mjs +30 -32
  62. package/flow-designer/index.mjs +344 -375
  63. package/flow-designer/style.css +1 -1
  64. package/flow-node/index.mjs +1 -1
  65. package/flow-viewer/index.mjs +64 -91
  66. package/form-block/index.mjs +33 -26
  67. package/form-card/index.mjs +25 -0
  68. package/form-cascader/index.mjs +70 -67
  69. package/form-checkbox/index.mjs +71 -0
  70. package/form-checkbox-group/index.mjs +33 -53
  71. package/form-date-picker/index.mjs +44 -73
  72. package/form-holder/index.mjs +60 -64
  73. package/form-holder/style.css +1 -0
  74. package/form-input/index.mjs +62 -40
  75. package/form-input-cron-expression/index.mjs +77 -0
  76. package/form-input-cron-expression/style.css +1 -0
  77. package/form-input-email/index.mjs +21 -33
  78. package/form-input-id-card/index.mjs +25 -38
  79. package/form-input-number/index.mjs +39 -42
  80. package/form-input-number/style.css +1 -1
  81. package/form-input-phone-number/index.mjs +26 -37
  82. package/form-input-tag/index.mjs +32 -34
  83. package/form-input-time/index.mjs +22 -37
  84. package/form-item/index.mjs +109 -101
  85. package/form-item/style.css +1 -1
  86. package/form-item-config-provider/index.mjs +18 -10
  87. package/form-item-group/index.mjs +73 -69
  88. package/form-item-group/style.css +1 -1
  89. package/form-radio-group/index.mjs +41 -36
  90. package/form-radio-group/style.css +1 -1
  91. package/form-select/index.mjs +142 -75
  92. package/form-select/style.css +1 -0
  93. package/form-switch/index.mjs +29 -34
  94. package/form-table/index.mjs +85 -0
  95. package/form-table-plus/index.mjs +109 -0
  96. package/form-textarea/index.mjs +23 -35
  97. package/form-tree-select/index.mjs +72 -0
  98. package/form-tree-select/style.css +1 -0
  99. package/form-tree-select-multiple/index.mjs +78 -0
  100. package/form-view/index.mjs +43 -77
  101. package/form-view/style.css +1 -1
  102. package/fy-array/index.mjs +2 -2
  103. package/fy-cascader/index.mjs +1 -1
  104. package/fy-checkbox/index.mjs +1 -1
  105. package/fy-code/index.mjs +1 -1
  106. package/fy-curd/index.mjs +12 -17
  107. package/fy-curd/style.css +1 -1
  108. package/fy-date/index.mjs +1 -1
  109. package/fy-draggable/index.mjs +5 -7
  110. package/fy-draggable/style.css +1 -1
  111. package/fy-dynamic/index.mjs +14 -16
  112. package/fy-empty/index.mjs +1 -1
  113. package/fy-empty/style.css +1 -1
  114. package/fy-form/index.mjs +117 -136
  115. package/fy-form/style.css +1 -1
  116. package/fy-form-design/index.mjs +319 -345
  117. package/fy-form-design/style.css +1 -1
  118. package/fy-input/index.mjs +2 -2
  119. package/fy-input-color/index.mjs +1 -1
  120. package/fy-input-icon/index.mjs +1 -1
  121. package/fy-input-map/index.mjs +21 -26
  122. package/fy-input-map/style.css +1 -1
  123. package/fy-input-number/index.mjs +1 -1
  124. package/fy-input-table/index.mjs +10 -12
  125. package/fy-input-tree/index.mjs +1 -1
  126. package/fy-radio/index.mjs +1 -1
  127. package/fy-rate/index.mjs +1 -1
  128. package/fy-select/index.mjs +4 -4
  129. package/fy-slider/index.mjs +2 -2
  130. package/fy-switch/index.mjs +1 -1
  131. package/fy-tabs/index.mjs +0 -1
  132. package/fy-time/index.mjs +1 -1
  133. package/fy-title/index.mjs +1 -1
  134. package/fy-tree/index.mjs +1 -1
  135. package/fy-u-editor/index.mjs +77 -103
  136. package/fy-upload/index.mjs +3 -3
  137. package/fy-upload/style.css +1 -1
  138. package/highlight-j-s/index.mjs +1 -1
  139. package/highlight-j-s/style.css +1 -1
  140. package/image-cropper/index.mjs +14 -65
  141. package/image-preview/index.mjs +17 -45
  142. package/image-preview/style.css +1 -1
  143. package/image-viewer/style.css +1 -1
  144. package/index.mjs +666 -496
  145. package/input-number/index.mjs +64 -9
  146. package/keyboard/style.css +1 -1
  147. package/license/index.mjs +1 -1
  148. package/login/index.mjs +1 -1
  149. package/monaco-editor/index.mjs +44 -74
  150. package/name-avatar/style.css +1 -1
  151. package/package.json +18 -17
  152. package/page-index/index.mjs +30 -54
  153. package/page-index-top/index.mjs +25 -47
  154. package/pageable-table/index.mjs +354 -226
  155. package/pageable-table/style.css +1 -1
  156. package/pageable-view/index.mjs +63 -106
  157. package/photo-swipe/index.mjs +51 -74
  158. package/picker-table-view/index.mjs +117 -0
  159. package/present-view/index.mjs +43 -77
  160. package/present-view/style.css +1 -1
  161. package/record-video/index.mjs +1 -1
  162. package/resize-observer/index.mjs +1 -1
  163. package/resize-observer/style.css +1 -1
  164. package/search/index.mjs +2 -2
  165. package/search/style.css +1 -1
  166. package/search-popover/index.mjs +28 -48
  167. package/search-popover/style.css +1 -1
  168. package/sign/index.mjs +2 -2
  169. package/sign-panel/style.css +1 -1
  170. package/skeleton-panel/index.mjs +38 -0
  171. package/skeleton-panel/style.css +1 -0
  172. package/split-pane/index.mjs +31 -49
  173. package/split-pane/style.css +1 -1
  174. package/sub-table/index.mjs +206 -0
  175. package/sub-table/style.css +1 -0
  176. package/sub-table-plus/index.mjs +231 -0
  177. package/sub-table-plus/style.css +1 -0
  178. package/swiper/index.mjs +18 -38
  179. package/swiper/style.css +1 -1
  180. package/tab/index.mjs +1 -1
  181. package/tab/style.css +1 -1
  182. package/tab-item/index.mjs +2 -2
  183. package/table-column/index.mjs +112 -37
  184. package/table-column/style.css +1 -0
  185. package/table-view/index.mjs +178 -135
  186. package/table-view/style.css +1 -1
  187. package/tabs-view/index.mjs +104 -0
  188. package/tabs-view/style.css +1 -0
  189. package/tag-render/index.mjs +13 -24
  190. package/text-ellipsis/index.mjs +1 -1
  191. package/toolbar/index.mjs +115 -58
  192. package/toolbar/style.css +1 -1
  193. package/toolbar-button/index.mjs +92 -48
  194. package/verify/index.mjs +1 -1
  195. package/vue-cron/index.mjs +48 -66
  196. package/vue-qr-code/index.mjs +14 -32
  197. package/vue-quill-editor/index.mjs +3 -3
  198. package/vue-tags-input/index.mjs +1 -1
  199. package/vue-tree-select/index.mjs +352 -393
  200. package/vue-tree-select/style.css +1 -1
  201. package/vue-video-player/index.mjs +36 -67
  202. package/watermark/index.mjs +21 -31
  203. package/web-types.json +9240 -3843
  204. package/x-input-tag/index.mjs +29 -61
  205. package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
  206. package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
  207. package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
  208. package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
  209. package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
  210. package/toolbar-button/style.css +0 -1
  211. /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
@@ -1,37 +1,15 @@
1
- var $ = Object.defineProperty, b = Object.defineProperties;
2
- var k = Object.getOwnPropertyDescriptors;
3
- var x = Object.getOwnPropertySymbols;
4
- var B = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
5
- var w = (t, e, i) => e in t ? $(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, c = (t, e) => {
6
- for (var i in e || (e = {}))
7
- B.call(e, i) && w(t, i, e[i]);
8
- if (x)
9
- for (var i of x(e))
10
- _.call(e, i) && w(t, i, e[i]);
1
+ import { findTreeChildren as m, delay as y, isUndefined as l, isNotEmpty as x, fastClone as w, isPlainObject as r, isFunction as h, computePosition as N, isVerticalScrollbarVisible as C, scrollbarWidth as g, hasOwn as d } from "@web-utils/core";
2
+ import { removeResizeListener as u, addResizeListener as p } from "@web-utils/integrations/resize";
3
+ import { cloneDeep as f } from "@web-utils/integrations/lodash";
4
+ import { a as v, b as $ } from "../chunks/index.d3MV3Wq2.mjs";
5
+ import b from "vue";
6
+ import { n as k } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
7
+ function c(t, e) {
8
+ for (const i in e)
9
+ b.set(t, i, e[i]);
11
10
  return t;
12
- }, h = (t, e) => b(t, k(e));
13
- var a = (t, e, i) => new Promise((s, o) => {
14
- var n = (d) => {
15
- try {
16
- l(i.next(d));
17
- } catch (f) {
18
- o(f);
19
- }
20
- }, r = (d) => {
21
- try {
22
- l(i.throw(d));
23
- } catch (f) {
24
- o(f);
25
- }
26
- }, l = (d) => d.done ? s(d.value) : Promise.resolve(d.value).then(n, r);
27
- l((i = i.apply(t, e)).next());
28
- });
29
- import { findTreeChildren as T, delay as M, isUndefined as p, isNotEmpty as K, fastClone as P, isPlainObject as u, isFunction as N, computePosition as E, isVerticalScrollbarVisible as D, scrollbarWidth as L, hasOwn as m } from "@web-utils/core";
30
- import { removeResizeListener as C, addResizeListener as g } from "@web-utils/integrations/resize";
31
- import { cloneDeep as v } from "@web-utils/integrations/lodash";
32
- import { a as R, b as z, c as y } from "../chunks/index.MAFc4eFi.mjs";
33
- import { n as S } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
34
- const V = {
11
+ }
12
+ const B = {
35
13
  name: "EditableTree",
36
14
  props: {
37
15
  label: {
@@ -90,7 +68,7 @@ const V = {
90
68
  default: () => ({
91
69
  children: "children",
92
70
  label: "name",
93
- isLeaf: (t) => m(t, "hasChildren") ? !t.hasChildren : m(t, "hasChild") ? !t.hasChild : m(t, "children") && t.children ? t.children.length === 0 : !0
71
+ isLeaf: (t) => d(t, "hasChildren") ? !t.hasChildren : d(t, "hasChild") ? !t.hasChild : d(t, "children") && t.children ? t.children.length === 0 : !0
94
72
  })
95
73
  },
96
74
  menuLabel: {
@@ -164,14 +142,14 @@ const V = {
164
142
  this.tryFetch();
165
143
  },
166
144
  mounted() {
167
- g(this.$refs.tree.$el, this.resize), g(this.$refs.treeWrapper, this.resize);
145
+ p(this.$refs.tree.$el, this.resize), p(this.$refs.treeWrapper, this.resize);
168
146
  },
169
147
  beforeDestroy() {
170
- C(this.$refs.tree.$el, this.resize), C(this.$refs.treeWrapper, this.resize);
148
+ u(this.$refs.tree.$el, this.resize), u(this.$refs.treeWrapper, this.resize);
171
149
  },
172
150
  methods: {
173
- filterTreeProperties: z,
174
- filterTreeEvents: R,
151
+ filterTreeProperties: $,
152
+ filterTreeEvents: v,
175
153
  addExpandKey(t) {
176
154
  this.reserveExpandKey && this.expandedKeys.push(t[this.nodeKey]);
177
155
  },
@@ -179,53 +157,47 @@ const V = {
179
157
  this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((e) => e !== t[this.nodeKey]));
180
158
  },
181
159
  resize() {
182
- D(this.$refs.treeWrapper) ? this.right = 4 + L : this.right = 4;
160
+ C(this.$refs.treeWrapper) ? this.right = 4 + g : this.right = 4;
183
161
  },
184
- showContextMenu(t, e, i) {
185
- return a(this, null, function* () {
186
- e.contextmenu === !1 || e.id === -1 || e.id === 0 || e.edit === !0 || this.contextMenu && (this.curNode = i, this.curData = e, this.showMenu = !0, this.$refs.tree.setCurrentKey(e.id), yield this.$nextTick(), this.position = E(t, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
187
- });
162
+ async showContextMenu(t, e, i) {
163
+ e.contextmenu === !1 || e.id === -1 || e.id === 0 || e.edit === !0 || this.contextMenu && (this.curNode = i, this.curData = e, this.showMenu = !0, this.$refs.tree.setCurrentKey(e.id), await this.$nextTick(), this.position = N(t, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
188
164
  },
189
165
  hideContextMenu() {
190
166
  this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
191
167
  },
192
- tryFetch() {
193
- return a(this, null, function* () {
194
- var t, e;
195
- if (this.lazy === !1 && this.fetchApi) {
196
- const i = yield this.fetchApi((e = (t = this.rootNode) == null ? void 0 : t.id) != null ? e : -1, {});
197
- if (u(i.data) && (i.data = [i.data]), i.data = i.data || [], this.empty = i.data.length === 0, u(this.customRootNode)) {
198
- const s = v(this.customRootNode);
199
- s[this.treeProps.children || "children"] = i.data, this.treeData = [s];
200
- } else if (N(this.customRootNode)) {
201
- const s = this.customRootNode(i.data);
202
- s[this.treeProps.children || "children"] = i.data, this.treeData = u(s) ? [s] : s;
203
- } else
204
- this.treeData = i.data;
205
- }
206
- });
168
+ async tryFetch() {
169
+ var t;
170
+ if (this.lazy === !1 && this.fetchApi) {
171
+ const e = await this.fetchApi(((t = this.rootNode) == null ? void 0 : t.id) ?? -1, {});
172
+ if (r(e.data) && (e.data = [e.data]), e.data = e.data || [], this.empty = e.data.length === 0, r(this.customRootNode)) {
173
+ const i = f(this.customRootNode);
174
+ i[this.treeProps.children || "children"] = e.data, this.treeData = [i];
175
+ } else if (h(this.customRootNode)) {
176
+ const i = this.customRootNode(e.data);
177
+ i[this.treeProps.children || "children"] = e.data, this.treeData = r(i) ? [i] : i;
178
+ } else
179
+ this.treeData = e.data;
180
+ }
207
181
  },
208
- loadNode(t, e) {
209
- return a(this, null, function* () {
210
- var i, s, o, n;
211
- if (t.level === 0) {
212
- const r = yield this.fetchApi((s = (i = this.rootNode) == null ? void 0 : i.id) != null ? s : -1, t);
213
- if (this.empty = r.data.length === 0, u(this.customRootNode)) {
214
- const l = v(this.customRootNode);
215
- l[this.treeProps.children || "children"] = r.data, e([l]);
216
- } else if (N(this.customRootNode)) {
217
- const l = this.customRootNode(r.data);
218
- l[this.treeProps.children || "children"] = r.data, this.treeData = u(l) ? [l] : l;
219
- } else
220
- e(r.data);
221
- yield this.$nextTick(), this.$emit("root-node-loaded", r.data), this.defaultExpandedKeys ? this.expandedKeys = [(o = r == null ? void 0 : r.data[0]) == null ? void 0 : o.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(n = r == null ? void 0 : r.data[0]) == null ? void 0 : n.id]);
222
- } else {
223
- if (t.leaf || t.data.isTempNode)
224
- return e([]);
225
- const r = yield this.fetchApi(t.data.id, t);
226
- e(r.data), yield this.$nextTick(), this.$emit("node-loaded", r.data);
227
- }
228
- });
182
+ async loadNode(t, e) {
183
+ var i, s, n;
184
+ if (t.level === 0) {
185
+ const o = await this.fetchApi(((i = this.rootNode) == null ? void 0 : i.id) ?? -1, t);
186
+ if (this.empty = o.data.length === 0, r(this.customRootNode)) {
187
+ const a = f(this.customRootNode);
188
+ a[this.treeProps.children || "children"] = o.data, e([a]);
189
+ } else if (h(this.customRootNode)) {
190
+ const a = this.customRootNode(o.data);
191
+ a[this.treeProps.children || "children"] = o.data, this.treeData = r(a) ? [a] : a;
192
+ } else
193
+ e(o.data);
194
+ await this.$nextTick(), this.$emit("root-node-loaded", o.data), this.defaultExpandedKeys ? this.expandedKeys = [(s = o == null ? void 0 : o.data[0]) == null ? void 0 : s.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(n = o == null ? void 0 : o.data[0]) == null ? void 0 : n.id]);
195
+ } else {
196
+ if (t.leaf || t.data.isTempNode)
197
+ return e([]);
198
+ const o = await this.fetchApi(t.data.id, t);
199
+ e(o.data), await this.$nextTick(), this.$emit("node-loaded", o.data);
200
+ }
229
201
  },
230
202
  clear() {
231
203
  this.cancelEdit(), this.removeNewNode();
@@ -237,70 +209,69 @@ const V = {
237
209
  this.newChild && this.newChild.id === -1 && (console.log(this.newChild), this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
238
210
  },
239
211
  cancelEdit() {
240
- this.editData && (p(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
241
- },
242
- editNode(t, e) {
243
- return a(this, null, function* () {
244
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = e, this.text = e[this.treeProps.label], p(e.edit) ? this.$set(e, "edit", !0) : e.edit = !0, yield this.$nextTick(), this.$refs.labelTxt.focus()) : yield this.$prompt(`请输入新的${this.label}名:`, h(c({}, this.defaultOptions), {
245
- inputValue: e[this.treeProps.label],
246
- beforeClose: (i, s, o) => a(this, null, function* () {
247
- if (i === "confirm") {
248
- try {
249
- s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...", this.text = s.inputValue, yield this.onConfirm(this.curNode, this.curData), o();
250
- } catch (n) {
251
- s.confirmButtonText = "确定";
252
- }
253
- s.confirmButtonLoading = !1;
254
- } else
255
- o();
256
- })
257
- })).catch((i) => i);
258
- });
259
- },
260
- appendRootNode() {
261
- return a(this, null, function* () {
262
- 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), {
263
- beforeClose: (t, e, i) => a(this, null, function* () {
264
- if (t === "confirm") {
265
- try {
266
- this.createNewChild(-1), e.confirmButtonLoading = !0, e.confirmButtonText = "处理中...";
267
- const s = yield this.saveApi(this.newNodeBuilder(e.inputValue, { id: -1 }));
268
- this.newChild[this.treeProps.label] = e.inputValue, this.newChild.edit = !1, y(this.newChild, s.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), yield this.locateView(), i();
269
- } catch (s) {
270
- e.confirmButtonText = "确定";
271
- }
272
- e.confirmButtonLoading = !1;
273
- } else
274
- i();
275
- })
276
- })).catch((t) => t);
277
- });
212
+ this.editData && (l(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
213
+ },
214
+ async editNode(t, e) {
215
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = e, this.text = e[this.treeProps.label], l(e.edit) ? this.$set(e, "edit", !0) : e.edit = !0, await this.$nextTick(), this.$refs.labelTxt.focus()) : await this.$prompt(`请输入新的${this.label}名:`, {
216
+ ...this.defaultOptions,
217
+ inputValue: e[this.treeProps.label],
218
+ beforeClose: async (i, s, n) => {
219
+ if (i === "confirm") {
220
+ try {
221
+ s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...", this.text = s.inputValue, await this.onConfirm(this.curNode, this.curData), n();
222
+ } catch {
223
+ s.confirmButtonText = "确定";
224
+ }
225
+ s.confirmButtonLoading = !1;
226
+ } else
227
+ n();
228
+ }
229
+ }).catch((i) => i);
230
+ },
231
+ async appendRootNode() {
232
+ 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), await this.scrollIntoView(!0)) : await this.$prompt(`请输入${this.label}名:`, {
233
+ ...this.defaultOptions,
234
+ beforeClose: async (t, e, i) => {
235
+ if (t === "confirm") {
236
+ try {
237
+ this.createNewChild(-1), e.confirmButtonLoading = !0, e.confirmButtonText = "处理中...";
238
+ const s = await this.saveApi(this.newNodeBuilder(e.inputValue, { id: -1 }));
239
+ this.newChild[this.treeProps.label] = e.inputValue, this.newChild.edit = !1, c(this.newChild, s.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.locateView(), i();
240
+ } catch {
241
+ e.confirmButtonText = "确定";
242
+ }
243
+ e.confirmButtonLoading = !1;
244
+ } else
245
+ i();
246
+ }
247
+ }).catch((t) => t);
278
248
  },
279
249
  appendChildNode(t) {
280
250
  this.text = "";
281
251
  const e = t.expanded;
282
- t.expand(() => a(this, null, function* () {
283
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(t.data.id), this.$refs.tree.append(this.newChild, t), yield this.scrollIntoView(e)) : yield this.$prompt(`请输入${this.label}名:`, h(c({}, this.defaultOptions), {
284
- beforeClose: (i, s, o) => a(this, null, function* () {
252
+ t.expand(async () => {
253
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(t.data.id), this.$refs.tree.append(this.newChild, t), await this.scrollIntoView(e)) : await this.$prompt(`请输入${this.label}名:`, {
254
+ ...this.defaultOptions,
255
+ beforeClose: async (i, s, n) => {
285
256
  if (i === "confirm") {
286
257
  try {
287
258
  this.createNewChild(t.data.id), s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...";
288
- const n = yield this.saveApi(this.newNodeBuilder(s.inputValue, t.data));
289
- this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1, y(this.newChild, n.data), this.$refs.tree.append(this.newChild, t), yield this.locateView(), o();
290
- } catch (n) {
259
+ const o = await this.saveApi(this.newNodeBuilder(s.inputValue, t.data));
260
+ this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1, c(this.newChild, o.data), this.$refs.tree.append(this.newChild, t), await this.locateView(), n();
261
+ } catch {
291
262
  s.confirmButtonText = "确定";
292
263
  }
293
264
  s.confirmButtonLoading = !1;
294
265
  } else
295
- o();
296
- })
297
- })).catch((i) => i);
298
- }));
266
+ n();
267
+ }
268
+ }).catch((i) => i);
269
+ });
299
270
  },
300
271
  appendChildNodeWithData(t, e, i) {
301
272
  this.text = "";
302
273
  const s = t.expanded;
303
- t.expand(() => a(this, null, function* () {
274
+ t.expand(async () => {
304
275
  this.clear(), this.newChild = {
305
276
  id: -1,
306
277
  parentId: e,
@@ -308,30 +279,24 @@ const V = {
308
279
  edit: !1,
309
280
  isTempNode: !0,
310
281
  hasChildren: !1
311
- }, this.$refs.tree.append(this.newChild, t), yield this.scrollIntoView(s);
312
- }));
282
+ }, this.$refs.tree.append(this.newChild, t), await this.scrollIntoView(s);
283
+ });
313
284
  },
314
285
  appendPeerNode(t) {
315
286
  t.parent && t.parent.level !== 0 ? this.appendChildNode(t.parent) : this.appendRootNode();
316
287
  },
317
- addRootNode(t) {
318
- return a(this, null, function* () {
319
- this.$refs.tree.remove(t), yield this.$nextTick(), this.$refs.tree.root.insertChild({ data: t }, void 0, !0);
320
- });
288
+ async addRootNode(t) {
289
+ this.$refs.tree.remove(t), await this.$nextTick(), this.$refs.tree.root.insertChild({ data: t }, void 0, !0);
321
290
  },
322
- addChildNode(t) {
323
- return a(this, null, function* () {
324
- this.curNode && this.curNode.level !== 0 ? this.curNode.expand(() => a(this, null, function* () {
325
- this.$refs.tree.remove(t), yield this.$nextTick(), this.$refs.tree.append(t, this.curNode);
326
- })) : yield this.addRootNode(t);
327
- });
291
+ async addChildNode(t) {
292
+ this.curNode && this.curNode.level !== 0 ? this.curNode.expand(async () => {
293
+ this.$refs.tree.remove(t), await this.$nextTick(), this.$refs.tree.append(t, this.curNode);
294
+ }) : await this.addRootNode(t);
328
295
  },
329
- addPeerNode(t) {
330
- return a(this, null, function* () {
331
- this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(() => a(this, null, function* () {
332
- this.$refs.tree.remove(t), yield this.$nextTick(), this.$refs.tree.append(t, this.curNode.parent);
333
- })) : yield this.addRootNode(t);
334
- });
296
+ async addPeerNode(t) {
297
+ this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(async () => {
298
+ this.$refs.tree.remove(t), await this.$nextTick(), this.$refs.tree.append(t, this.curNode.parent);
299
+ }) : await this.addRootNode(t);
335
300
  },
336
301
  updateNode(t) {
337
302
  const e = this.$refs.tree.getNode(t);
@@ -351,88 +316,78 @@ const V = {
351
316
  hasChildren: !1
352
317
  }, this.$emit("create-new-node", this.newChild);
353
318
  },
354
- removeNodeModal(t) {
355
- return a(this, null, function* () {
356
- yield this.$confirm(
357
- `你确定要删除${this.label}[<span class="break-word" style="color: orange">${t.data[this.treeProps.label]}</span>]吗?`,
358
- "系统提示",
359
- {
360
- type: "warning",
361
- modal: !0,
362
- dangerouslyUseHTMLString: !0,
363
- iconClass: "el-icon-question",
364
- closeOnClickModal: !1,
365
- confirmButtonClass: "el-button--danger",
366
- cancelButtonClass: "el-button--primary is-plain",
367
- beforeClose: (e, i, s) => a(this, null, function* () {
368
- if (e === "confirm") {
369
- try {
370
- i.confirmButtonLoading = !0, i.confirmButtonText = "删除...";
371
- const o = t.parent, n = yield this.deleteApi(t.data.id);
372
- n.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(t), this.$emit("node-deleted", o, t.data), s()) : this.$message.error(n.message);
373
- } catch (o) {
374
- }
375
- i.confirmButtonText = "确定", i.confirmButtonLoading = !1;
376
- } else
377
- s();
378
- })
319
+ async removeNodeModal(t) {
320
+ await this.$confirm(
321
+ `你确定要删除${this.label}[<span class="break-word" style="color: orange">${t.data[this.treeProps.label]}</span>]吗?`,
322
+ "系统提示",
323
+ {
324
+ type: "warning",
325
+ modal: !0,
326
+ dangerouslyUseHTMLString: !0,
327
+ iconClass: "el-icon-question",
328
+ closeOnClickModal: !1,
329
+ confirmButtonClass: "el-button--danger",
330
+ cancelButtonClass: "el-button--primary is-plain",
331
+ beforeClose: async (e, i, s) => {
332
+ if (e === "confirm") {
333
+ try {
334
+ i.confirmButtonLoading = !0, i.confirmButtonText = "删除...";
335
+ const n = t.parent, o = await this.deleteApi(t.data.id);
336
+ o.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(t), this.$emit("node-deleted", n, t.data), s()) : this.$message.error(o.message);
337
+ } catch {
338
+ }
339
+ i.confirmButtonText = "确定", i.confirmButtonLoading = !1;
340
+ } else
341
+ s();
379
342
  }
380
- ).catch((e) => e);
381
- });
382
- },
383
- removeNode(t) {
384
- return a(this, null, function* () {
385
- try {
386
- const e = t.parent;
387
- if (this.deleteApi) {
388
- const i = yield this.deleteApi(t.data.id);
389
- i.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(t), this.$emit("node-deleted", e, t.data)) : this.$message.error(i.message);
390
- } else
391
- this.$refs.tree.remove(t);
392
- } catch (e) {
393
343
  }
394
- });
344
+ ).catch((e) => e);
345
+ },
346
+ async removeNode(t) {
347
+ try {
348
+ const e = t.parent;
349
+ if (this.deleteApi) {
350
+ const i = await this.deleteApi(t.data.id);
351
+ i.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(t), this.$emit("node-deleted", e, t.data)) : this.$message.error(i.message);
352
+ } else
353
+ this.$refs.tree.remove(t);
354
+ } catch {
355
+ }
395
356
  },
396
- onConfirm(t, e) {
397
- return a(this, null, function* () {
398
- if (e[this.treeProps.label] === this.text || !K(this.text)) {
399
- this.clear();
400
- return;
401
- }
402
- p(e.loading) ? this.$set(e, "loading", !0) : e.loading = !0;
403
- try {
404
- if (this.loading = !0, e.id === -1) {
405
- const i = yield this.saveApi(this.newNodeBuilder(this.text, t.parent.data || { id: -1 })), s = P(e);
406
- y(e, h(c({}, i.data), { isTempNode: !1 })), this.$emit("node-added", e, s, t), this.registerNode(t);
407
- } else
408
- yield this.updateApi(h(c({}, e), { [this.treeProps.label]: this.text }));
409
- e[this.treeProps.label] = this.text, e.edit = !1, this.$emit("node-updated", e, t), this.text = "";
410
- } catch (i) {
411
- }
412
- e.loading = !1, this.loading = !1;
413
- });
357
+ async onConfirm(t, e) {
358
+ if (e[this.treeProps.label] === this.text || !x(this.text)) {
359
+ this.clear();
360
+ return;
361
+ }
362
+ l(e.loading) ? this.$set(e, "loading", !0) : e.loading = !0;
363
+ try {
364
+ if (this.loading = !0, e.id === -1) {
365
+ const i = await this.saveApi(this.newNodeBuilder(this.text, t.parent.data || { id: -1 })), s = w(e);
366
+ c(e, { ...i.data, isTempNode: !1 }), this.$emit("node-added", e, s, t), this.registerNode(t);
367
+ } else
368
+ await this.updateApi({ ...e, [this.treeProps.label]: this.text });
369
+ e[this.treeProps.label] = this.text, e.edit = !1, this.$emit("node-updated", e, t), this.text = "";
370
+ } catch {
371
+ }
372
+ e.loading = !1, this.loading = !1;
414
373
  },
415
374
  onCancel(t, e) {
416
375
  e.id === -1 ? this.$refs.tree.remove(t) : e.edit = !1, this.text = "";
417
376
  },
418
377
  nodeClick(t, e, i) {
419
- this.hideContextMenu(), (p(t.loading) || !t.loading) && (this.curNode = e, this.curData = t, this.$emit("on-node-click", t, e, i));
378
+ this.hideContextMenu(), (l(t.loading) || !t.loading) && (this.curNode = e, this.curData = t, this.$emit("on-node-click", t, e, i));
420
379
  },
421
380
  getCurrentNode() {
422
381
  return this.$refs.tree.getCurrentNode();
423
382
  },
424
- locateView() {
425
- return a(this, null, function* () {
426
- yield this.$nextTick();
427
- const t = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
428
- t && t.scrollIntoView();
429
- });
383
+ async locateView() {
384
+ await this.$nextTick();
385
+ const t = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
386
+ t && t.scrollIntoView();
430
387
  },
431
- scrollIntoView(t) {
432
- return a(this, null, function* () {
433
- var e, i;
434
- yield this.$nextTick(), t || (yield M(300)), (i = (e = this.$refs) == null ? void 0 : e.labelTxt) == null || i.focus();
435
- });
388
+ async scrollIntoView(t) {
389
+ var e, i;
390
+ await this.$nextTick(), t || await y(300), (i = (e = this.$refs) == null ? void 0 : e.labelTxt) == null || i.focus();
436
391
  },
437
392
  inputKeyup(t, e, i) {
438
393
  t.keyCode === 13 && this.onConfirm(e, i), t.keyCode === 27 && this.clear();
@@ -459,50 +414,48 @@ const V = {
459
414
  return this.$refs.tree.root;
460
415
  },
461
416
  findTreeNode(t) {
462
- return T(this.$refs.tree.root.childNodes, (e) => e.data === t || e.data.id === t, "childNodes");
417
+ return m(this.$refs.tree.root.childNodes, (e) => e.data === t || e.data.id === t, "childNodes");
463
418
  },
464
419
  registerNode(t) {
465
420
  t.store.registerNode(t), delete t.store.nodesMap[-1];
466
421
  },
467
- reloadTree() {
468
- return a(this, null, function* () {
469
- this.lazy ? this.treeKey = Date.now() : yield this.tryFetch();
470
- });
422
+ async reloadTree() {
423
+ this.lazy ? this.treeKey = Date.now() : await this.tryFetch();
471
424
  }
472
425
  }
473
426
  };
474
- var A = function() {
427
+ var _ = function() {
475
428
  var e = this, i = e._self._c;
476
429
  return i("div", { staticClass: "editable-tree" }, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? i("ElButton", { staticStyle: { position: "absolute", top: "4px", "z-index": "1" }, style: { right: `${e.right}px` }, attrs: { type: "primary", size: "mini", icon: "el-icon-plus", circle: "", plain: "" }, on: { click: function(s) {
477
430
  return s.stopPropagation(), e.$emit("add-root-node");
478
- } } }) : e._e(), i("div", { ref: "treeWrapper", staticClass: "et-tree-wrapper" }, [!e.readonly && e.addRootNodeButtonStyle === "top" ? i("div", { staticStyle: { "padding-left": "24px" } }, [i("ElButton", { attrs: { disabled: e.loading, size: "mini", type: "text" }, on: { click: e.appendRootNode } }, [i("i", { staticClass: "el-icon-lx-add" }), e._v(" " + e._s(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`) + " ")])], 1) : e._e(), i("ElTree", e._g(e._b({ key: e.treeKey, ref: "tree", staticClass: "flex-item", attrs: { "default-expanded-keys": e.expandedKeys, "expand-on-click-node": !1, "highlight-current": "", load: e.loadNode, data: e.innerTreeData, props: e.treeProps, lazy: e.lazy, "node-key": e.nodeKey }, on: { "node-click": e.nodeClick, "node-contextmenu": e.showContextMenu, "node-expand": e.addExpandKey, "node-collapse": e.removeExpandKey }, scopedSlots: e._u([{ key: "default", fn: function({ node: s, data: o }) {
431
+ } } }) : e._e(), i("div", { ref: "treeWrapper", staticClass: "et-tree-wrapper" }, [!e.readonly && e.addRootNodeButtonStyle === "top" ? i("div", { staticStyle: { "padding-left": "24px" } }, [i("ElButton", { attrs: { disabled: e.loading, size: "mini", type: "text" }, on: { click: e.appendRootNode } }, [i("i", { staticClass: "el-icon-lx-add" }), e._v(" " + e._s(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`) + " ")])], 1) : e._e(), i("ElTree", e._g(e._b({ key: e.treeKey, ref: "tree", staticClass: "flex-item", attrs: { "default-expanded-keys": e.expandedKeys, "expand-on-click-node": !1, "highlight-current": "", load: e.loadNode, data: e.innerTreeData, props: e.treeProps, lazy: e.lazy, "node-key": e.nodeKey }, on: { "node-click": e.nodeClick, "node-contextmenu": e.showContextMenu, "node-expand": e.addExpandKey, "node-collapse": e.removeExpandKey }, scopedSlots: e._u([{ key: "default", fn: function({ node: s, data: n }) {
479
432
  return [e._t("default", function() {
480
- return [o.edit ? [i("span", { staticClass: "custom-tree-node flex-row flex-item oh", attrs: { "data-id": o.id } }, [e.icon ? i("i", { staticClass: "node-icon shrink-0", class: o.loading ? "el-icon-loading" : "el-icon-edit-outline" }) : e._e(), i("ElInput", { ref: "labelTxt", staticClass: "node-input flex-item", attrs: { size: "mini", placeholder: e.defaultOptions.inputPlaceholder }, on: { blur: (n) => e.inputBlur(n, s, o) }, nativeOn: { keyup: function(n) {
481
- return ((r) => e.inputKeyup(r, s, o)).apply(null, arguments);
482
- }, click: function(n) {
483
- n.stopPropagation();
484
- } }, model: { value: e.text, callback: function(n) {
485
- e.text = n;
486
- }, expression: "text" } }), e.confirmButton ? [i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: !o.loading, expression: "!data.loading" }], staticClass: "shrink-0", attrs: { size: "mini", type: "text" }, on: { click: function(n) {
487
- return n.stopPropagation(), e.onConfirm(s, o);
488
- } } }, [e._v("确定")]), i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: !o.loading, expression: "!data.loading" }], staticClass: "shrink-0", attrs: { size: "mini", type: "text" }, on: { click: function(n) {
489
- return n.stopPropagation(), e.onCancel(s, o);
490
- } } }, [e._v("取消")])] : e._e()], 2)] : [i("span", { staticClass: "custom-tree-node", attrs: { "data-id": o.id } }, [i("span", { staticClass: "node-label flex-row flex-item oh ellipsis-1" }, [e.icon ? i("i", { staticClass: "node-icon", class: o.loading ? "el-icon-loading" : e.icon(o, s) }) : e._e(), i("span", { staticClass: "flex-item-relative", staticStyle: { height: "21px" } }, [i("span", { staticClass: "ellipsis-1 absolute-box et-tree-label", attrs: { title: s.label } }, [e._t("label", function() {
433
+ return [n.edit ? [i("span", { staticClass: "custom-tree-node flex-row flex-item oh", attrs: { "data-id": n.id } }, [e.icon ? i("i", { staticClass: "node-icon shrink-0", class: n.loading ? "el-icon-loading" : "el-icon-edit-outline" }) : e._e(), i("ElInput", { ref: "labelTxt", staticClass: "node-input flex-item", attrs: { size: "mini", placeholder: e.defaultOptions.inputPlaceholder }, on: { blur: (o) => e.inputBlur(o, s, n) }, nativeOn: { keyup: function(o) {
434
+ return ((a) => e.inputKeyup(a, s, n)).apply(null, arguments);
435
+ }, click: function(o) {
436
+ o.stopPropagation();
437
+ } }, model: { value: e.text, callback: function(o) {
438
+ e.text = o;
439
+ }, expression: "text" } }), e.confirmButton ? [i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: !n.loading, expression: "!data.loading" }], staticClass: "shrink-0", attrs: { size: "mini", type: "text" }, on: { click: function(o) {
440
+ return o.stopPropagation(), e.onConfirm(s, n);
441
+ } } }, [e._v("确定")]), i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: !n.loading, expression: "!data.loading" }], staticClass: "shrink-0", attrs: { size: "mini", type: "text" }, on: { click: function(o) {
442
+ return o.stopPropagation(), e.onCancel(s, n);
443
+ } } }, [e._v("取消")])] : e._e()], 2)] : [i("span", { staticClass: "custom-tree-node", attrs: { "data-id": n.id } }, [i("span", { staticClass: "node-label flex-row flex-item oh ellipsis-1" }, [e.icon ? i("i", { staticClass: "node-icon", class: n.loading ? "el-icon-loading" : e.icon(n, s) }) : e._e(), i("span", { staticClass: "flex-item-relative", staticStyle: { height: "21px" } }, [i("span", { staticClass: "ellipsis-1 absolute-box et-tree-label", attrs: { title: s.label } }, [e._t("label", function() {
491
444
  return [e._v(e._s(s.label))];
492
- }, { data: o, node: s })], 2)]), e._t("label-suffix", null, { node: s, data: o })], 2), !e.contextMenu && !e.readonly ? i("span", { directives: [{ name: "show", rawName: "v-show", value: !o.loading && !e.loading, expression: "!data.loading && !loading" }], staticClass: "handle-actions" }, [i("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(n) {
493
- return n.stopPropagation(), e.appendChildNode(s, o);
494
- } } }, [e._v("添加")]), i("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(n) {
495
- return n.stopPropagation(), e.editNode(s, o);
496
- } } }, [e._v("修改")]), i("ElPopconfirm", { staticClass: "pop-confirm", attrs: { "icon-color": "red", title: "你确定要删除吗?" }, on: { confirm: function(n) {
497
- return e.removeNode(s, o);
445
+ }, { data: n, node: s })], 2)]), e._t("label-suffix", null, { node: s, data: n })], 2), !e.contextMenu && !e.readonly ? i("span", { directives: [{ name: "show", rawName: "v-show", value: !n.loading && !e.loading, expression: "!data.loading && !loading" }], staticClass: "handle-actions" }, [i("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
446
+ return o.stopPropagation(), e.appendChildNode(s, n);
447
+ } } }, [e._v("添加")]), i("ElButton", { attrs: { size: "mini", type: "text" }, on: { click: function(o) {
448
+ return o.stopPropagation(), e.editNode(s, n);
449
+ } } }, [e._v("修改")]), i("ElPopconfirm", { staticClass: "pop-confirm", attrs: { "icon-color": "red", title: "你确定要删除吗?" }, on: { confirm: function(o) {
450
+ return e.removeNode(s, n);
498
451
  } }, scopedSlots: e._u([{ key: "reference", fn: function() {
499
- return [i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: s.isLeaf, expression: "node.isLeaf" }], staticStyle: { "margin-left": "4px" }, attrs: { size: "mini", type: "text" }, on: { click: function(n) {
500
- n.stopPropagation();
452
+ return [i("ElButton", { directives: [{ name: "show", rawName: "v-show", value: s.isLeaf, expression: "node.isLeaf" }], staticStyle: { "margin-left": "4px" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
453
+ o.stopPropagation();
501
454
  } } }, [e._v("删除")])];
502
- }, proxy: !0 }], null, !0) })], 1) : e._e(), e.contextMenuIcon && e.contextMenu && !e.readonly ? i("span", { directives: [{ name: "show", rawName: "v-show", value: !o.loading && !e.loading, expression: "!data.loading && !loading" }], staticClass: "handle-actions", staticStyle: { display: "inline-block" } }, [i("ElButton", { staticStyle: { padding: "6px 10px 0" }, attrs: { size: "mini", type: "text" }, on: { click: function(n) {
503
- return n.stopPropagation(), e.showContextMenu(n, o, s);
455
+ }, proxy: !0 }], null, !0) })], 1) : e._e(), e.contextMenuIcon && e.contextMenu && !e.readonly ? i("span", { directives: [{ name: "show", rawName: "v-show", value: !n.loading && !e.loading, expression: "!data.loading && !loading" }], staticClass: "handle-actions", staticStyle: { display: "inline-block" } }, [i("ElButton", { staticStyle: { padding: "6px 10px 0" }, attrs: { size: "mini", type: "text" }, on: { click: function(o) {
456
+ return o.stopPropagation(), e.showContextMenu(o, n, s);
504
457
  } } }, [e._v(". . .")])], 1) : e._e()])]];
505
- }, { node: s, data: o })];
458
+ }, { node: s, data: n })];
506
459
  } }], null, !0) }, "ElTree", e.filterTreeProperties(e.$attrs), !1), e.filterTreeEvents(e.$listeners))), e.contextMenu && !e.readonly ? i("div", { directives: [{ name: "show", rawName: "v-show", value: e.showMenu, expression: "showMenu" }], ref: "contextMenu", staticClass: "menu", style: e.position }, [i("ul", { staticClass: "menu-list" }, [e._t("context-menu", function() {
507
460
  return [i("li", { directives: [{ name: "show", rawName: "v-show", value: e.curData.id > -1, expression: "curData.id > -1" }], staticClass: "menu-item", on: { click: function(s) {
508
461
  return e.appendPeerNode(e.curNode, e.curData);
@@ -514,15 +467,15 @@ var A = function() {
514
467
  return e.removeNodeModal(e.curNode, e.curData);
515
468
  } } }, [i("i", { staticClass: "menu-item-icon el-icon-delete", staticStyle: { color: "#f00" } }), e._v(e._s(e.menuLabel.removeNode) + " ")])];
516
469
  }, { curNode: e.curNode, curData: e.curData })], 2)]) : e._e()], 1)], 1);
517
- }, I = [], O = /* @__PURE__ */ S(
518
- V,
519
- A,
520
- I,
470
+ }, T = [], K = /* @__PURE__ */ k(
471
+ B,
472
+ _,
473
+ T,
521
474
  !1,
522
475
  null,
523
476
  null
524
477
  );
525
- const G = O.exports;
478
+ const z = K.exports;
526
479
  export {
527
- G as default
480
+ z as default
528
481
  };
@@ -1 +1 @@
1
- .editable-tree{position:relative}.editable-tree.et-tree-label-overflow-visible .et-tree-label{position:static}.et-tree-wrapper{text-align:left;flex-direction:column;width:100%;display:flex;overflow:auto}.et-tree-wrapper .el-tree{width:100%;display:table;overflow:visible}.et-tree-wrapper .el-button+.el-button{margin-left:8px!important}.et-tree-wrapper .el-input__inner{padding:0 4px}.et-tree-wrapper .custom-tree-node{align-items:center;width:100%;padding-right:8px;font-size:14px;display:flex}.et-tree-wrapper .custom-tree-node:hover .handle-actions{display:block}.et-tree-wrapper .custom-tree-node .handle-actions{align-self:flex-end;display:none}.et-tree-wrapper .custom-tree-node .node-icon{margin-top:2px;margin-right:4px}.et-tree-wrapper .node-label{align-items:center}.et-tree-wrapper .node-input{min-width:140px;margin-right:10px}.et-tree-wrapper .menu{z-index:3;background:#fff;border-radius:4px;padding:0;position:fixed;box-shadow:0 5px 10px #bebebe}.et-tree-wrapper .menu-item{color:#242f42;white-space:nowrap;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:8px 20px 8px 8px;font:11px/100% tahoma,arial,sans-serif;display:block}.et-tree-wrapper .menu .menu-item:hover{color:#66b1ff;background-color:#ecf5ff}.et-tree-wrapper .menu-item-icon{margin-right:4px;font-size:1.3em;font-weight:700}
1
+ .editable-tree{position:relative}.editable-tree.et-tree-label-overflow-visible .et-tree-label{position:static}.et-tree-wrapper{text-align:left;flex-direction:column;width:100%;display:flex;overflow:auto}.et-tree-wrapper .el-tree{width:100%;display:table;overflow:visible}.et-tree-wrapper .el-button+.el-button{margin-left:8px!important}.et-tree-wrapper .el-input__inner{padding:0 4px}.et-tree-wrapper .custom-tree-node{align-items:center;width:100%;padding-right:8px;font-size:14px;display:flex}.et-tree-wrapper .custom-tree-node:hover .handle-actions{display:block}.et-tree-wrapper .custom-tree-node .handle-actions{align-self:flex-end;display:none}.et-tree-wrapper .custom-tree-node .node-icon{margin-top:2px;margin-right:4px}.et-tree-wrapper .node-label{align-items:center}.et-tree-wrapper .node-input{min-width:140px;margin-right:10px}.et-tree-wrapper .menu{z-index:3;background:#fff;border-radius:4px;padding:0;position:fixed;box-shadow:0 5px 10px #bebebe}.et-tree-wrapper .menu-item{color:#242f42;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;padding:8px 20px 8px 8px;font:11px/100% tahoma,arial,sans-serif;display:block}.et-tree-wrapper .menu .menu-item:hover{color:#66b1ff;background-color:#ecf5ff}.et-tree-wrapper .menu-item-icon{margin-right:4px;font-size:1.3em;font-weight:700}