@web-utils/component 2.70.0 → 3.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 (189) hide show
  1. package/address-input/index.mjs +16 -14
  2. package/awesome-button/index.mjs +30 -29
  3. package/card/index.mjs +42 -40
  4. package/carousel/index.mjs +27 -25
  5. package/chat/index.mjs +70 -59
  6. package/chunk-file-uploader/index.mjs +594 -35
  7. package/chunk-file-uploader/style.css +1 -1
  8. package/chunks/CountUp.f1a19f35.mjs +124 -0
  9. package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +8 -0
  10. package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +32 -0
  11. package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +356 -0
  12. package/chunks/ElementDialog.d8f3105c.mjs +211 -0
  13. package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +95 -0
  14. package/chunks/EmptyView.e2430422.mjs +51 -0
  15. package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +23 -0
  16. package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +37 -0
  17. package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +65 -0
  18. package/chunks/FormItem.2920ac0c.mjs +45 -0
  19. package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +258 -0
  20. package/chunks/FormItemGroup.41daddb6.mjs +64 -0
  21. package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +155 -0
  22. package/chunks/FyCurd.8acd2983.mjs +548 -0
  23. package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +2945 -0
  24. package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +47 -0
  25. package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +151 -0
  26. package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +22 -0
  27. package/chunks/FyForm.0294e494.mjs +439 -0
  28. package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +737 -0
  29. package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +93 -0
  30. package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +56 -0
  31. package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +158 -0
  32. package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +39 -0
  33. package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +102 -0
  34. package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +41 -0
  35. package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +15 -0
  36. package/chunks/IconTemp.42c48e1f.mjs +32 -0
  37. package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +23 -0
  38. package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +172 -0
  39. package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +23 -0
  40. package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +21 -0
  41. package/chunks/Page.81f4b8d9.mjs +32 -0
  42. package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +13 -0
  43. package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +26 -0
  44. package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +88 -0
  45. package/chunks/PageableTable.333cbdc1.mjs +335 -0
  46. package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +148 -0
  47. package/chunks/ResizeObserver.60f728f0.mjs +54 -0
  48. package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +13 -0
  49. package/chunks/TableColumn.8503272e.mjs +106 -0
  50. package/chunks/Toolbar.5c539dbb.mjs +24 -0
  51. package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +275 -0
  52. package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +31 -0
  53. package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +74 -0
  54. package/chunks/confirmable-mixin.26e1d0e0.mjs +197 -0
  55. package/chunks/{dataformat.f995e2f9.mjs → dataformat.816df805.mjs} +5 -5
  56. package/chunks/{dic.eaac0823.mjs → dic.3b4ba802.mjs} +40 -40
  57. package/chunks/{event.b5d855dd.mjs → event.4377230d.mjs} +2 -2
  58. package/chunks/{index.57f871af.mjs → index.d91bd77a.mjs} +7 -7
  59. package/chunks/{init.47f219b4.mjs → init.f0a03127.mjs} +2 -2
  60. package/chunks/{util.ae730cde.mjs → util.7844e2c2.mjs} +21 -21
  61. package/color-picker/index.mjs +200 -32
  62. package/confirm-button/index.mjs +1 -1
  63. package/confirmable/index.mjs +1 -1
  64. package/count-up/index.mjs +14 -17
  65. package/data-box/index.mjs +36 -33
  66. package/data-card/index.mjs +35 -33
  67. package/data-cardtext/index.mjs +29 -27
  68. package/data-display/index.mjs +37 -34
  69. package/data-icons/index.mjs +32 -29
  70. package/data-imgtext/index.mjs +30 -27
  71. package/data-operatext/index.mjs +41 -39
  72. package/data-panel/index.mjs +39 -36
  73. package/data-pay/index.mjs +26 -22
  74. package/data-price/index.mjs +34 -32
  75. package/data-progress/index.mjs +32 -28
  76. package/data-rotate/index.mjs +38 -35
  77. package/data-table-picker/index.mjs +25 -22
  78. package/data-tabs/index.mjs +35 -32
  79. package/dialog-form/index.mjs +41 -32
  80. package/dynamic-table/index.mjs +47 -42
  81. package/easy-popup/index.mjs +29 -56
  82. package/editable-progress/index.mjs +16 -14
  83. package/editable-tree/index.mjs +129 -476
  84. package/egd-collapse-item/index.mjs +1 -2
  85. package/element-dialog/index.mjs +37 -126
  86. package/empty-view/index.mjs +13 -31
  87. package/flex-column/index.mjs +1 -1
  88. package/flex-item/index.mjs +1 -1
  89. package/flex-row/index.mjs +1 -1
  90. package/flow/index.mjs +105 -40
  91. package/flow-designer/index.mjs +1190 -1114
  92. package/flow-node/index.mjs +15 -47
  93. package/flow-viewer/index.mjs +167 -78
  94. package/form-block/index.mjs +24 -22
  95. package/form-cascader/index.mjs +29 -29
  96. package/form-checkbox-group/index.mjs +76 -31
  97. package/form-date-picker/index.mjs +21 -20
  98. package/form-holder/index.mjs +16 -15
  99. package/form-input/index.mjs +30 -88
  100. package/form-input-email/index.mjs +28 -28
  101. package/form-input-id-card/index.mjs +37 -37
  102. package/form-input-number/index.mjs +219 -59
  103. package/form-input-phone-number/index.mjs +25 -25
  104. package/form-input-tag/index.mjs +160 -38
  105. package/form-input-time/index.mjs +23 -23
  106. package/form-item/index.mjs +15 -144
  107. package/form-item-group/index.mjs +15 -163
  108. package/form-radio-group/index.mjs +39 -38
  109. package/form-select/index.mjs +33 -32
  110. package/form-switch/index.mjs +26 -26
  111. package/form-textarea/index.mjs +26 -26
  112. package/form-view/index.mjs +46 -42
  113. package/fy-array/index.mjs +65 -61
  114. package/fy-cascader/index.mjs +14 -13
  115. package/fy-checkbox/index.mjs +37 -32
  116. package/fy-code/index.mjs +11 -14
  117. package/fy-curd/index.mjs +206 -2795
  118. package/fy-date/index.mjs +16 -57
  119. package/fy-draggable/index.mjs +21 -20
  120. package/fy-dynamic/index.mjs +64 -207
  121. package/fy-empty/index.mjs +12 -29
  122. package/fy-form/index.mjs +178 -732
  123. package/fy-form-design/index.mjs +1738 -1179
  124. package/fy-input/index.mjs +15 -101
  125. package/fy-input-color/index.mjs +17 -66
  126. package/fy-input-icon/index.mjs +21 -116
  127. package/fy-input-map/index.mjs +27 -24
  128. package/fy-input-number/index.mjs +23 -22
  129. package/fy-input-table/index.mjs +22 -18
  130. package/fy-input-tree/index.mjs +32 -28
  131. package/fy-progress/index.mjs +24 -23
  132. package/fy-radio/index.mjs +23 -18
  133. package/fy-rate/index.mjs +16 -49
  134. package/fy-select/index.mjs +29 -122
  135. package/fy-slider/index.mjs +18 -17
  136. package/fy-switch/index.mjs +21 -20
  137. package/fy-tabs/index.mjs +14 -48
  138. package/fy-time/index.mjs +20 -14
  139. package/fy-title/index.mjs +1 -1
  140. package/fy-tree/index.mjs +26 -20
  141. package/fy-u-editor/index.mjs +1 -1
  142. package/fy-upload/index.mjs +76 -74
  143. package/guide-steps/index.mjs +24 -22
  144. package/highlight-j-s/index.mjs +19 -29
  145. package/icon-temp/index.mjs +12 -30
  146. package/iframe-window/index.mjs +19 -18
  147. package/image-cropper/index.mjs +53 -51
  148. package/image-preview/index.mjs +27 -25
  149. package/input-number/index.mjs +63 -172
  150. package/input-number-range/index.mjs +24 -23
  151. package/license/index.mjs +1 -1
  152. package/loading-view/index.mjs +15 -33
  153. package/login/index.mjs +40 -35
  154. package/nav-bar/index.mjs +15 -30
  155. package/notice/index.mjs +19 -18
  156. package/package.json +1 -1
  157. package/page/index.mjs +12 -20
  158. package/page-header/index.mjs +13 -34
  159. package/page-index/index.mjs +34 -33
  160. package/page-index-top/index.mjs +100 -51
  161. package/page-skeleton/index.mjs +18 -35
  162. package/page-skeleton-new/index.mjs +16 -15
  163. package/pageable-table/index.mjs +85 -223
  164. package/pageable-view/index.mjs +34 -33
  165. package/present-view/index.mjs +75 -71
  166. package/record-video/index.mjs +1 -1
  167. package/resize-observer/index.mjs +21 -29
  168. package/search/index.mjs +29 -27
  169. package/search-popover/index.mjs +1 -1
  170. package/sign/index.mjs +1 -1
  171. package/split-pane/index.mjs +40 -45
  172. package/static-pageable-table/index.mjs +20 -18
  173. package/swiper/index.mjs +27 -25
  174. package/table-view/index.mjs +627 -89
  175. package/tag-render/index.mjs +21 -19
  176. package/text-ellipsis/index.mjs +13 -12
  177. package/tinymce-editor/index.mjs +73 -72
  178. package/toolbar/index.mjs +15 -208
  179. package/toolbar-button/index.mjs +32 -57
  180. package/verify/index.mjs +1 -1
  181. package/vue-cron/index.mjs +112 -104
  182. package/watermark/index.mjs +1 -1
  183. package/web-types.json +1 -1
  184. package/x-input-tag/index.mjs +51 -117
  185. package/chunks/FormTemp.7f91629d.mjs +0 -165
  186. package/chunks/confirmable-mixin.817b542f.mjs +0 -116
  187. package/chunks/form-input-mixin.4632ad36.mjs +0 -24
  188. package/chunks/form-item-mixin.ad148e7b.mjs +0 -140
  189. package/chunks/input-number-mixin.41a066be.mjs +0 -60
@@ -1,28 +1,566 @@
1
- var o = (e, r, t) => new Promise((s, l) => {
2
- var a = (i) => {
1
+ var M = Object.defineProperty, L = Object.defineProperties;
2
+ var A = Object.getOwnPropertyDescriptors;
3
+ var _ = Object.getOwnPropertySymbols;
4
+ var K = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
5
+ var g = (e, t, i) => t in e ? M(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, h = (e, t) => {
6
+ for (var i in t || (t = {}))
7
+ K.call(t, i) && g(e, i, t[i]);
8
+ if (_)
9
+ for (var i of _(t))
10
+ R.call(t, i) && g(e, i, t[i]);
11
+ return e;
12
+ }, c = (e, t) => L(e, A(t));
13
+ var r = (e, t, i) => new Promise((s, o) => {
14
+ var a = (d) => {
3
15
  try {
4
- c(t.next(i));
5
- } catch (h) {
6
- l(h);
16
+ l(i.next(d));
17
+ } catch (b) {
18
+ o(b);
7
19
  }
8
- }, b = (i) => {
20
+ }, n = (d) => {
9
21
  try {
10
- c(t.throw(i));
11
- } catch (h) {
12
- l(h);
22
+ l(i.throw(d));
23
+ } catch (b) {
24
+ o(b);
13
25
  }
14
- }, c = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(a, b);
15
- c((t = t.apply(e, r)).next());
26
+ }, l = (d) => d.done ? s(d.value) : Promise.resolve(d.value).then(a, n);
27
+ l((i = i.apply(e, t)).next());
16
28
  });
17
- import { merge as n } from "@web-utils/integrations/lodash";
18
- import { isString as d, isArray as m, trace as f, warning as _, toStringArray as g, isFunction as w, hasOwn as p } from "@web-utils/core";
19
- import { k as v } from "../chunks/index.57f871af.mjs";
20
- import { n as y } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
21
- var P = function() {
22
- var e = this, r = e.$createElement, t = e._self._c || r;
23
- return t("div", {
29
+ import { cloneDeep as C, merge as f } from "@web-utils/integrations/lodash";
30
+ import { hasOwn as p, isVerticalScrollbarVisible as D, scrollbarWidth as I, computePosition as V, isPlainObject as u, isFunction as w, isUndefined as m, isNotEmpty as F, fastClone as O, delay as E, findTreeChildren as j, isString as x, isArray as z, trace as v, warning as W, toStringArray as U } from "@web-utils/core";
31
+ import { c as q, d as H, e as y, k as G } from "../chunks/index.d91bd77a.mjs";
32
+ import N from "element-ui/lib/button";
33
+ import J from "element-ui/lib/form-item";
34
+ import Q from "element-ui/lib/row";
35
+ import { n as $ } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
36
+ import X from "element-ui/lib/form";
37
+ import { _ as Y } from "../chunks/PageableTable.333cbdc1.mjs";
38
+ import { addResizeListener as T, removeResizeListener as P } from "@web-utils/integrations/resize";
39
+ import { s as Z, r as ee } from "../chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs";
40
+ import { _ as te } from "../chunks/Toolbar.5c539dbb.mjs";
41
+ const ie = {
42
+ name: "FormItemConfigProvider",
43
+ provide() {
44
+ return {
45
+ formItemConfig: this.config
46
+ };
47
+ },
48
+ props: {
49
+ block: Boolean,
50
+ wrapCol: {
51
+ type: Boolean,
52
+ default: !0
53
+ }
54
+ },
55
+ data() {
56
+ return {
57
+ config: {
58
+ block: !1,
59
+ wrapCol: !0
60
+ }
61
+ };
62
+ },
63
+ watch: {
64
+ block: {
65
+ immediate: !0,
66
+ handler(e) {
67
+ this.config.block = e;
68
+ }
69
+ },
70
+ wrapCol: {
71
+ immediate: !0,
72
+ handler(e) {
73
+ this.config.wrapCol = e;
74
+ }
75
+ }
76
+ },
77
+ render() {
78
+ return this.$scopedSlots.default();
79
+ }
80
+ };
81
+ let se, re;
82
+ const k = {};
83
+ var oe = /* @__PURE__ */ $(
84
+ ie,
85
+ se,
86
+ re,
87
+ !1,
88
+ ae,
89
+ null,
90
+ null,
91
+ null
92
+ );
93
+ function ae(e) {
94
+ for (let t in k)
95
+ this[t] = k[t];
96
+ }
97
+ const ne = /* @__PURE__ */ function() {
98
+ return oe.exports;
99
+ }(), le = {
100
+ name: "EditableTree",
101
+ props: {
102
+ label: {
103
+ type: String,
104
+ default: "书签"
105
+ },
106
+ addRootNodeLabel: {
107
+ type: String
108
+ },
109
+ defaultExpandedKeys: {
110
+ type: Array,
111
+ default: () => []
112
+ },
113
+ newNodeBuilder: {
114
+ type: Function,
115
+ default: (e, t) => ({
116
+ name: e,
117
+ parentId: t.id
118
+ })
119
+ },
120
+ contextMenu: Boolean,
121
+ lazy: {
122
+ type: Boolean,
123
+ default: !0
124
+ },
125
+ expandFirstNode: {
126
+ type: Boolean,
127
+ default: !0
128
+ },
129
+ readonly: Boolean,
130
+ saveApi: {
131
+ type: Function
132
+ },
133
+ updateApi: {
134
+ type: Function
135
+ },
136
+ deleteApi: {
137
+ type: Function
138
+ },
139
+ fetchApi: {
140
+ type: Function
141
+ },
142
+ customRootNode: {
143
+ type: {
144
+ type: Object,
145
+ default: void 0
146
+ }
147
+ },
148
+ rootNode: {
149
+ type: Object
150
+ },
151
+ contextMenuIcon: Boolean,
152
+ contextMenuInline: Boolean,
153
+ treeProps: {
154
+ type: Object,
155
+ default: () => ({
156
+ children: "children",
157
+ label: "name",
158
+ isLeaf: (e) => p(e, "hasChildren") ? !e.hasChildren : p(e, "hasChild") ? !e.hasChild : p(e, "children") && e.children ? e.children.length === 0 : !0
159
+ })
160
+ },
161
+ menuLabel: {
162
+ type: Object,
163
+ default: () => ({
164
+ appendPeer: "添加同级节点",
165
+ appendChild: "添加",
166
+ removeNode: "删除",
167
+ editNode: "修改"
168
+ })
169
+ },
170
+ icon: {
171
+ type: [Function, Boolean],
172
+ default: () => "el-icon-collection-tag"
173
+ },
174
+ confirmButton: {
175
+ type: Boolean,
176
+ default: !0
177
+ },
178
+ addRootNodeButtonStyle: {
179
+ type: String,
180
+ default: "top"
181
+ },
182
+ reserveExpandKey: Boolean,
183
+ nodeKey: {
184
+ type: String,
185
+ default: "id"
186
+ }
187
+ },
188
+ data() {
189
+ return {
190
+ loading: !1,
191
+ showMenu: !1,
192
+ empty: !0,
193
+ expandedKeys: this.lazy ? [] : this.defaultExpandedKeys,
194
+ treeData: [],
195
+ curNode: {},
196
+ curData: {},
197
+ position: {},
198
+ text: "",
199
+ right: 4,
200
+ treeKey: Date.now()
201
+ };
202
+ },
203
+ computed: {
204
+ defaultOptions() {
205
+ return {
206
+ confirmButtonText: "确定",
207
+ cancelButtonText: "取消",
208
+ closeOnClickModal: !1,
209
+ modal: !0,
210
+ inputErrorMessage: `${this.label}名不能为空!`,
211
+ inputPlaceholder: `请输入${this.label}名...`,
212
+ inputValidator: (e) => e != null && e.trim().length > 0
213
+ };
214
+ },
215
+ innerTreeData() {
216
+ var e;
217
+ return (e = this.$attrs.data) != null && e.length ? this.$attrs.data : this.treeData;
218
+ }
219
+ },
220
+ watch: {
221
+ defaultExpandedKeys: {
222
+ immediate: !0,
223
+ handler(e) {
224
+ this.expandedKeys = [...e];
225
+ }
226
+ }
227
+ },
228
+ created() {
229
+ this.tryFetch();
230
+ },
231
+ mounted() {
232
+ T(this.$refs.tree.$el, this.resize), T(this.$refs.treeWrapper, this.resize);
233
+ },
234
+ beforeDestroy() {
235
+ P(this.$refs.tree.$el, this.resize), P(this.$refs.treeWrapper, this.resize);
236
+ },
237
+ methods: {
238
+ filterTreeProperties: q,
239
+ filterTreeEvents: H,
240
+ addExpandKey(e) {
241
+ this.reserveExpandKey && this.expandedKeys.push(e[this.nodeKey]);
242
+ },
243
+ removeExpandKey(e) {
244
+ this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((t) => t !== e[this.nodeKey]));
245
+ },
246
+ resize() {
247
+ D(this.$refs.treeWrapper) ? this.right = 4 + I : this.right = 4;
248
+ },
249
+ showContextMenu(e, t, i) {
250
+ return r(this, null, function* () {
251
+ t.contextmenu === !1 || t.id === -1 || t.id === 0 || t.edit === !0 || this.contextMenu && (this.curNode = i, this.curData = t, this.showMenu = !0, this.$refs.tree.setCurrentKey(t.id), yield this.$nextTick(), this.position = V(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
252
+ });
253
+ },
254
+ hideContextMenu() {
255
+ this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
256
+ },
257
+ tryFetch() {
258
+ return r(this, null, function* () {
259
+ var e, t;
260
+ if (this.lazy === !1 && this.fetchApi) {
261
+ const i = yield this.fetchApi((t = (e = this.rootNode) == null ? void 0 : e.id) != null ? t : -1, {});
262
+ if (u(i.data) && (i.data = [i.data]), i.data = i.data || [], this.empty = i.data.length === 0, u(this.customRootNode)) {
263
+ const s = C(this.customRootNode);
264
+ s[this.treeProps.children || "children"] = i.data, this.treeData = [s];
265
+ } else if (w(this.customRootNode)) {
266
+ const s = this.customRootNode(i.data);
267
+ s[this.treeProps.children || "children"] = i.data, this.treeData = u(s) ? [s] : s;
268
+ } else
269
+ this.treeData = i.data;
270
+ }
271
+ });
272
+ },
273
+ loadNode(e, t) {
274
+ return r(this, null, function* () {
275
+ var i, s, o, a;
276
+ if (e.level === 0) {
277
+ const n = yield this.fetchApi((s = (i = this.rootNode) == null ? void 0 : i.id) != null ? s : -1, e);
278
+ if (this.empty = n.data.length === 0, u(this.customRootNode)) {
279
+ const l = C(this.customRootNode);
280
+ l[this.treeProps.children || "children"] = n.data, t([l]);
281
+ } else if (w(this.customRootNode)) {
282
+ const l = this.customRootNode(n.data);
283
+ l[this.treeProps.children || "children"] = n.data, this.treeData = u(l) ? [l] : l;
284
+ } else
285
+ t(n.data);
286
+ yield this.$nextTick(), this.$emit("root-node-loaded", n.data), this.defaultExpandedKeys ? this.expandedKeys = [(o = n == null ? void 0 : n.data[0]) == null ? void 0 : o.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(a = n == null ? void 0 : n.data[0]) == null ? void 0 : a.id]);
287
+ } else {
288
+ if (e.leaf || e.data.isTempNode)
289
+ return t([]);
290
+ const n = yield this.fetchApi(e.data.id, e);
291
+ t(n.data), yield this.$nextTick(), this.$emit("node-loaded", n.data);
292
+ }
293
+ });
294
+ },
295
+ clear() {
296
+ this.cancelEdit(), this.removeNewNode();
297
+ },
298
+ clearChecked() {
299
+ this.$refs.tree.setCheckedKeys([]);
300
+ },
301
+ removeNewNode() {
302
+ this.newChild && this.newChild.id === -1 && (console.log(this.newChild), this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
303
+ },
304
+ cancelEdit() {
305
+ this.editData && (m(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
306
+ },
307
+ editNode(e, t) {
308
+ return r(this, null, function* () {
309
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = t, this.text = t[this.treeProps.label], m(t.edit) ? this.$set(t, "edit", !0) : t.edit = !0, yield this.$nextTick(), this.$refs.labelTxt.focus()) : yield this.$prompt(`请输入新的${this.label}名:`, c(h({}, this.defaultOptions), {
310
+ inputValue: t[this.treeProps.label],
311
+ beforeClose: (i, s, o) => r(this, null, function* () {
312
+ if (i === "confirm") {
313
+ try {
314
+ s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...", this.text = s.inputValue, yield this.onConfirm(this.curNode, this.curData), o();
315
+ } catch (a) {
316
+ s.confirmButtonText = "确定";
317
+ }
318
+ s.confirmButtonLoading = !1;
319
+ } else
320
+ o();
321
+ })
322
+ })).catch((i) => i);
323
+ });
324
+ },
325
+ appendRootNode() {
326
+ return r(this, null, function* () {
327
+ 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}名:`, c(h({}, this.defaultOptions), {
328
+ beforeClose: (e, t, i) => r(this, null, function* () {
329
+ if (e === "confirm") {
330
+ try {
331
+ this.createNewChild(-1), t.confirmButtonLoading = !0, t.confirmButtonText = "处理中...";
332
+ const s = yield this.saveApi(this.newNodeBuilder(t.inputValue, { id: -1 }));
333
+ this.newChild[this.treeProps.label] = t.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();
334
+ } catch (s) {
335
+ t.confirmButtonText = "确定";
336
+ }
337
+ t.confirmButtonLoading = !1;
338
+ } else
339
+ i();
340
+ })
341
+ })).catch((e) => e);
342
+ });
343
+ },
344
+ appendChildNode(e) {
345
+ this.text = "";
346
+ const t = e.expanded;
347
+ e.expand(() => r(this, null, function* () {
348
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(e.data.id), this.$refs.tree.append(this.newChild, e), yield this.scrollIntoView(t)) : yield this.$prompt(`请输入${this.label}名:`, c(h({}, this.defaultOptions), {
349
+ beforeClose: (i, s, o) => r(this, null, function* () {
350
+ if (i === "confirm") {
351
+ try {
352
+ this.createNewChild(e.data.id), s.confirmButtonLoading = !0, s.confirmButtonText = "处理中...";
353
+ const a = yield this.saveApi(this.newNodeBuilder(s.inputValue, e.data));
354
+ this.newChild[this.treeProps.label] = s.inputValue, this.newChild.edit = !1, y(this.newChild, a.data), this.$refs.tree.append(this.newChild, e), yield this.locateView(), o();
355
+ } catch (a) {
356
+ s.confirmButtonText = "确定";
357
+ }
358
+ s.confirmButtonLoading = !1;
359
+ } else
360
+ o();
361
+ })
362
+ })).catch((i) => i);
363
+ }));
364
+ },
365
+ appendChildNodeWithData(e, t, i) {
366
+ this.text = "";
367
+ const s = e.expanded;
368
+ e.expand(() => r(this, null, function* () {
369
+ this.clear(), this.newChild = {
370
+ id: -1,
371
+ parentId: t,
372
+ [this.treeProps.label]: i,
373
+ edit: !1,
374
+ isTempNode: !0,
375
+ hasChildren: !1
376
+ }, this.$refs.tree.append(this.newChild, e), yield this.scrollIntoView(s);
377
+ }));
378
+ },
379
+ appendPeerNode(e) {
380
+ e.parent && e.parent.level !== 0 ? this.appendChildNode(e.parent) : this.appendRootNode();
381
+ },
382
+ addRootNode(e) {
383
+ return r(this, null, function* () {
384
+ this.$refs.tree.remove(e), yield this.$nextTick(), this.$refs.tree.root.insertChild({ data: e }, void 0, !0);
385
+ });
386
+ },
387
+ addChildNode(e) {
388
+ return r(this, null, function* () {
389
+ this.curNode && this.curNode.level !== 0 ? this.curNode.expand(() => r(this, null, function* () {
390
+ this.$refs.tree.remove(e), yield this.$nextTick(), this.$refs.tree.append(e, this.curNode);
391
+ })) : yield this.addRootNode(e);
392
+ });
393
+ },
394
+ addPeerNode(e) {
395
+ return r(this, null, function* () {
396
+ this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(() => r(this, null, function* () {
397
+ this.$refs.tree.remove(e), yield this.$nextTick(), this.$refs.tree.append(e, this.curNode.parent);
398
+ })) : yield this.addRootNode(e);
399
+ });
400
+ },
401
+ updateNode(e) {
402
+ const t = this.$refs.tree.getNode(e);
403
+ t && (t.data = e);
404
+ },
405
+ setCurrentKey(e) {
406
+ this.$refs.tree && this.$refs.tree.setCurrentKey(e);
407
+ },
408
+ createNewChild(e) {
409
+ this.newChild = {
410
+ id: -1,
411
+ parentId: e,
412
+ [this.treeProps.label]: "",
413
+ edit: !0,
414
+ isTempNode: !0,
415
+ hasChildren: !1
416
+ }, this.$emit("create-new-node", this.newChild);
417
+ },
418
+ removeNodeModal(e) {
419
+ return r(this, null, function* () {
420
+ yield this.$confirm(
421
+ `你确定要删除${this.label}[<span class="break-word" style="color: orange">${e.data[this.treeProps.label]}</span>]吗?`,
422
+ "系统提示",
423
+ {
424
+ type: "warning",
425
+ modal: !0,
426
+ dangerouslyUseHTMLString: !0,
427
+ iconClass: "el-icon-question",
428
+ closeOnClickModal: !1,
429
+ confirmButtonClass: "el-button--danger",
430
+ cancelButtonClass: "el-button--primary is-plain",
431
+ beforeClose: (t, i, s) => r(this, null, function* () {
432
+ if (t === "confirm") {
433
+ try {
434
+ i.confirmButtonLoading = !0, i.confirmButtonText = "删除...";
435
+ const o = e.parent, a = yield this.deleteApi(e.data.id);
436
+ a.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", o, e.data), s()) : this.$message.error(a.message);
437
+ } catch (o) {
438
+ }
439
+ i.confirmButtonText = "确定", i.confirmButtonLoading = !1;
440
+ } else
441
+ s();
442
+ })
443
+ }
444
+ ).catch((t) => t);
445
+ });
446
+ },
447
+ removeNode(e) {
448
+ return r(this, null, function* () {
449
+ try {
450
+ const t = e.parent;
451
+ if (this.deleteApi) {
452
+ const i = yield this.deleteApi(e.data.id);
453
+ i.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", t, e.data)) : this.$message.error(i.message);
454
+ } else
455
+ this.$refs.tree.remove(e);
456
+ } catch (t) {
457
+ }
458
+ });
459
+ },
460
+ onConfirm(e, t) {
461
+ return r(this, null, function* () {
462
+ if (t[this.treeProps.label] === this.text || !F(this.text)) {
463
+ this.clear();
464
+ return;
465
+ }
466
+ m(t.loading) ? this.$set(t, "loading", !0) : t.loading = !0;
467
+ try {
468
+ if (this.loading = !0, t.id === -1) {
469
+ const i = yield this.saveApi(this.newNodeBuilder(this.text, e.parent.data || { id: -1 })), s = O(t);
470
+ y(t, c(h({}, i.data), { isTempNode: !1 })), this.$emit("node-added", t, s, e), this.registerNode(e);
471
+ } else
472
+ yield this.updateApi(c(h({}, t), { [this.treeProps.label]: this.text }));
473
+ t[this.treeProps.label] = this.text, t.edit = !1, this.$emit("node-updated", t, e), this.text = "";
474
+ } catch (i) {
475
+ }
476
+ t.loading = !1, this.loading = !1;
477
+ });
478
+ },
479
+ onCancel(e, t) {
480
+ t.id === -1 ? this.$refs.tree.remove(e) : t.edit = !1, this.text = "";
481
+ },
482
+ nodeClick(e, t, i) {
483
+ this.hideContextMenu(), (m(e.loading) || !e.loading) && (this.curNode = t, this.curData = e, this.$emit("on-node-click", e, t, i));
484
+ },
485
+ getCurrentNode() {
486
+ return this.$refs.tree.getCurrentNode();
487
+ },
488
+ locateView() {
489
+ return r(this, null, function* () {
490
+ yield this.$nextTick();
491
+ const e = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
492
+ e && e.scrollIntoView();
493
+ });
494
+ },
495
+ scrollIntoView(e) {
496
+ return r(this, null, function* () {
497
+ var t, i;
498
+ yield this.$nextTick(), e || (yield E(300)), (i = (t = this.$refs) == null ? void 0 : t.labelTxt) == null || i.focus();
499
+ });
500
+ },
501
+ inputKeyup(e, t, i) {
502
+ e.keyCode === 13 && this.onConfirm(t, i), e.keyCode === 27 && this.clear();
503
+ },
504
+ inputBlur(e, t, i) {
505
+ this.confirmButton || this.onConfirm(t, i);
506
+ },
507
+ getCheckedKeys() {
508
+ return this.$refs.tree.getCheckedKeys();
509
+ },
510
+ setCheckedKeys(e) {
511
+ this.$refs.tree.setCheckedKeys(e);
512
+ },
513
+ getCheckedNodes() {
514
+ return this.$refs.tree.getCheckedNodes();
515
+ },
516
+ setCheckedNodes(e) {
517
+ this.$refs.tree.setCheckedNodes(e);
518
+ },
519
+ getNode(e) {
520
+ return this.$refs.tree.getNode(e);
521
+ },
522
+ getRootNode() {
523
+ return this.$refs.tree.root;
524
+ },
525
+ findTreeNode(e) {
526
+ return j(
527
+ this.$refs.tree.root.childNodes,
528
+ (t) => t.data === e || t.data.id === e,
529
+ "childNodes"
530
+ );
531
+ },
532
+ registerNode(e) {
533
+ e.store.registerNode(e), delete e.store.nodesMap[-1];
534
+ },
535
+ reloadTree() {
536
+ return r(this, null, function* () {
537
+ this.lazy ? this.treeKey = Date.now() : yield this.tryFetch();
538
+ });
539
+ }
540
+ }
541
+ }, B = {};
542
+ var de = /* @__PURE__ */ $(
543
+ le,
544
+ ee,
545
+ Z,
546
+ !1,
547
+ he,
548
+ null,
549
+ null,
550
+ null
551
+ );
552
+ function he(e) {
553
+ for (let t in B)
554
+ this[t] = B[t];
555
+ }
556
+ const ce = /* @__PURE__ */ function() {
557
+ return de.exports;
558
+ }();
559
+ var ue = function() {
560
+ var e = this, t = e.$createElement, i = e._self._c || t;
561
+ return i("div", {
24
562
  staticClass: "table-view"
25
- }, [t("Toolbar", e._g(e._b({
563
+ }, [i(te, e._g(e._b({
26
564
  on: {
27
565
  search: e.toggleSearch,
28
566
  del: e.del,
@@ -47,21 +585,21 @@ var P = function() {
47
585
  proxy: !0
48
586
  };
49
587
  })], null, !0)
50
- }, "Toolbar", e.toolbarProps, !1), e.toolbarListeners)), t("div", {
588
+ }, "Toolbar", e.toolbarProps, !1), e.toolbarListeners)), i("div", {
51
589
  staticClass: "table-view-content-wrapper"
52
- }, [t("div", {
590
+ }, [i("div", {
53
591
  staticClass: "table-view-content"
54
- }, [e.treeProps.show ? t("div", {
592
+ }, [e.treeProps.show ? i("div", {
55
593
  ref: "treeScroller",
56
594
  staticClass: "table-view-sidebar",
57
595
  on: {
58
596
  scroll: e.onTreeScroll
59
597
  }
60
- }, [t("div", {
598
+ }, [i("div", {
61
599
  staticStyle: {
62
600
  "font-size": "16px"
63
601
  }
64
- }, [e._v("视图导航")]), t("EditableTree", e._g(e._b({
602
+ }, [e._v("视图导航")]), i(ce, e._g(e._b({
65
603
  ref: "tree",
66
604
  attrs: {
67
605
  readonly: ""
@@ -69,26 +607,26 @@ var P = function() {
69
607
  scopedSlots: e._u([{
70
608
  key: "default",
71
609
  fn: function(s) {
72
- var l = s.node, a = s.data;
610
+ var o = s.node, a = s.data;
73
611
  return [e._t("tree-node", function() {
74
- return [t("span", [t("i", {
612
+ return [i("span", [i("i", {
75
613
  staticClass: "node-icon",
76
- class: l.childNodes.length > 0 ? l.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets"
614
+ class: o.childNodes.length > 0 ? o.expanded ? "el-icon-folder-opened" : "el-icon-folder" : "el-icon-tickets"
77
615
  }), e._t("tree-label", function() {
78
- return [e._v(e._s(l.label))];
616
+ return [e._v(e._s(o.label))];
79
617
  }, {
80
- node: l,
618
+ node: o,
81
619
  data: a
82
620
  })], 2)];
83
621
  }, {
84
- node: l,
622
+ node: o,
85
623
  data: a
86
624
  })];
87
625
  }
88
626
  }], null, !0)
89
- }, "EditableTree", e.treeProps, !1), e.treeListeners))], 1) : e._e(), t("div", {
627
+ }, "EditableTree", e.treeProps, !1), e.treeListeners))], 1) : e._e(), i("div", {
90
628
  staticClass: "table-view-table"
91
- }, [t("PageableTable", e._g(e._b({
629
+ }, [i(Y, e._g(e._b({
92
630
  ref: "table",
93
631
  class: [{
94
632
  "border-top": e.borderTop,
@@ -103,15 +641,15 @@ var P = function() {
103
641
  "row-dblclick": e.rowDbClick,
104
642
  "selection-change": e.onSelectionChange
105
643
  }
106
- }, "PageableTable", e.tableProps, !1), e.tableListeners), [e._t("columns")], 2)], 1)]), e.toolbarProps.searchable ? t("div", {
644
+ }, "PageableTable", e.tableProps, !1), e.tableListeners), [e._t("columns")], 2)], 1)]), e.toolbarProps.searchable ? i("div", {
107
645
  staticClass: "slide-panel",
108
646
  style: {
109
647
  right: `${e.right}px`,
110
648
  width: `${e.searchPanelProps.width}px`
111
649
  }
112
- }, [e._m(0), t("div", {
650
+ }, [e._m(0), i("div", {
113
651
  staticClass: "slide-panel-content"
114
- }, [t("ElForm", {
652
+ }, [i(X, {
115
653
  ref: "form",
116
654
  attrs: {
117
655
  "label-position": "right",
@@ -124,30 +662,30 @@ var P = function() {
124
662
  return s.preventDefault(), e.onSearchClick.apply(null, arguments);
125
663
  }
126
664
  }
127
- }, [t("FormItemConfigProvider", {
665
+ }, [i(ne, {
128
666
  attrs: {
129
667
  block: "",
130
668
  "wrap-col": !1
131
669
  }
132
- }, [t("ElRow", {
670
+ }, [i(Q, {
133
671
  attrs: {
134
672
  gutter: 0
135
673
  }
136
674
  }, [e._t("search-form", function() {
137
- return [t("p", [e._v("请添加搜索条件!")])];
138
- })], 2)], 1), t("ElFormItem", {
675
+ return [i("p", [e._v("请添加搜索条件!")])];
676
+ })], 2)], 1), i(J, {
139
677
  attrs: {
140
678
  "label-width": "0"
141
679
  }
142
- }, [t("div", {
680
+ }, [i("div", {
143
681
  staticClass: "slide-panel-actions"
144
- }, [t("ElButton", {
682
+ }, [i(N, {
145
683
  attrs: {
146
684
  type: "primary",
147
685
  "native-type": "submit",
148
686
  size: "mini"
149
687
  }
150
- }, [e._v(" 开始搜索 ")]), t("ElButton", {
688
+ }, [e._v(" 开始搜索 ")]), i(N, {
151
689
  attrs: {
152
690
  size: "mini"
153
691
  },
@@ -155,15 +693,15 @@ var P = function() {
155
693
  click: e.onClearClick
156
694
  }
157
695
  }, [e._v(" 清除条件 ")])], 1)])], 1)], 1)]) : e._e()]), e._t("default")], 2);
158
- }, S = [function() {
159
- var e = this, r = e.$createElement, t = e._self._c || r;
160
- return t("div", {
696
+ }, pe = [function() {
697
+ var e = this, t = e.$createElement, i = e._self._c || t;
698
+ return i("div", {
161
699
  staticClass: "slide-panel-line"
162
- }, [t("div", {
700
+ }, [i("div", {
163
701
  staticClass: "slide-panel-line-indicator"
164
702
  })]);
165
703
  }];
166
- const $ = [
704
+ const fe = [
167
705
  "back",
168
706
  "create",
169
707
  "save",
@@ -183,16 +721,16 @@ const $ = [
183
721
  "disabled",
184
722
  "reload",
185
723
  "slot"
186
- ], T = {
724
+ ], me = {
187
725
  name: "TableView",
188
726
  bus: {
189
- reloadTableView(e, r) {
727
+ reloadTableView(e, t) {
190
728
  if (this._viewIds)
191
- if (d(e) || m(e)) {
192
- let t = e;
193
- d(t) && (t = t.split(",")), this._viewIds.some((s) => t.includes(s)) && (r ? this.$refs.tree && (f.call(this.$parent || {}, "reloadTree"), this.refreshTree()) : (f.call(this.$parent || {}, "reloadTable"), this.reloadTable()));
729
+ if (x(e) || z(e)) {
730
+ let i = e;
731
+ x(i) && (i = i.split(",")), this._viewIds.some((s) => i.includes(s)) && (t ? this.$refs.tree && (v.call(this.$parent || {}, "reloadTree"), this.refreshTree()) : (v.call(this.$parent || {}, "reloadTable"), this.reloadTable()));
194
732
  } else
195
- _.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
733
+ W.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
196
734
  }
197
735
  },
198
736
  props: {
@@ -260,20 +798,20 @@ const $ = [
260
798
  },
261
799
  computed: {
262
800
  buttonSlots() {
263
- return $.filter((e) => this.$scopedSlots[e]);
801
+ return fe.filter((e) => this.$scopedSlots[e]);
264
802
  },
265
803
  toolbarProps() {
266
- var s, l;
267
- const e = {}, r = n(this.toolbarAttrs, e);
268
- let t = (r == null ? void 0 : r.buttons) || this.$parent.buttons;
269
- return t = t || [], t.includes("reload") || (t = [...t, "reload"]), r.buttons = t, r.buttons = g(r.buttons), r.searchable = !!((l = (s = this.$scopedSlots)["search-form"]) != null && l.call(s)), r;
804
+ var s, o;
805
+ const e = {}, t = f(this.toolbarAttrs, e);
806
+ let i = (t == null ? void 0 : t.buttons) || this.$parent.buttons;
807
+ return i = i || [], i.includes("reload") || (i = [...i, "reload"]), t.buttons = i, t.buttons = U(t.buttons), t.searchable = !!((o = (s = this.$scopedSlots)["search-form"]) != null && o.call(s)), t;
270
808
  },
271
809
  treeProps() {
272
810
  const e = {
273
811
  treeProps: {
274
812
  children: "children",
275
813
  label: "label",
276
- isLeaf: (r) => p(r, "hasChildren") ? !r.hasChildren : p(r, "hasChild") ? !r.hasChild : !0
814
+ isLeaf: (t) => p(t, "hasChildren") ? !t.hasChildren : p(t, "hasChild") ? !t.hasChild : !0
277
815
  },
278
816
  show: !1,
279
817
  lazy: !0,
@@ -282,30 +820,30 @@ const $ = [
282
820
  "expand-first-node": !1,
283
821
  "default-expand-all": !1
284
822
  };
285
- return n(this.treeAttrs, e);
823
+ return f(this.treeAttrs, e);
286
824
  },
287
825
  tableProps() {
288
- const e = this.tableAttrs.api || this.$parent.getPage, r = {
826
+ const e = this.tableAttrs.api || this.$parent.getPage, t = {
289
827
  model: this.searchModel || {},
290
828
  height: "auto",
291
829
  "highlight-current-row": !0,
292
830
  api: e
293
831
  };
294
- return n(this.tableAttrs, r);
832
+ return f(this.tableAttrs, t);
295
833
  },
296
834
  searchPanelProps() {
297
835
  const e = {
298
836
  width: 350,
299
837
  model: this.searchModel || {}
300
838
  };
301
- return n(this.searchPanelAttrs, e);
839
+ return f(this.searchPanelAttrs, e);
302
840
  }
303
841
  },
304
842
  created() {
305
843
  this._viewIds = [], this.viewId && this._viewIds.push(this.viewId), this._viewIds.includes(this.$parent.$options.name) || this._viewIds.push(this.$parent.$options.name);
306
844
  },
307
845
  activated() {
308
- return o(this, null, function* () {
846
+ return r(this, null, function* () {
309
847
  this.$refs.treeScroller && (this.treeScrollTop && (this.$refs.treeScroller.scrollTop = this.treeScrollTop), this.treeScrollLeft && (this.$refs.treeScroller.scrollLeft = this.treeScrollLeft));
310
848
  });
311
849
  },
@@ -317,21 +855,21 @@ const $ = [
317
855
  this.right = this.right === 0 ? -this.searchPanelProps.width : 0;
318
856
  },
319
857
  onSearchClick() {
320
- return o(this, null, function* () {
858
+ return r(this, null, function* () {
321
859
  this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), yield this.refreshTable();
322
860
  });
323
861
  },
324
862
  onClearClick() {
325
- return o(this, null, function* () {
863
+ return r(this, null, function* () {
326
864
  this.$emit("reset"), this.$refs.form.resetFields(), this.$refs.table.setModel(this.searchModel || this.searchPanelProps.model), yield this.refreshTable();
327
865
  });
328
866
  },
329
867
  openFrom(e) {
330
- this.$router.push(v(this.formPath, e));
868
+ this.$router.push(G(this.formPath, e));
331
869
  },
332
870
  rowDbClick(e) {
333
- var r;
334
- !((r = this.tableListeners) != null && r["row-dblclick"]) && this.formPath && this.openFrom(e);
871
+ var t;
872
+ !((t = this.tableListeners) != null && t["row-dblclick"]) && this.formPath && this.openFrom(e);
335
873
  },
336
874
  onSelectionChange(e) {
337
875
  this.selectedRows = e;
@@ -341,10 +879,10 @@ const $ = [
341
879
  !((e = this.toolbarListeners) != null && e.create) && this.formPath && this.openFrom();
342
880
  },
343
881
  del() {
344
- return o(this, null, function* () {
345
- var r;
882
+ return r(this, null, function* () {
883
+ var t;
346
884
  const e = this.deleteApi || this.$parent.del;
347
- if (!((r = this.toolbarListeners) != null && r.del) && w(e)) {
885
+ if (!((t = this.toolbarListeners) != null && t.del) && w(e)) {
348
886
  if (!this.selectedRows.length) {
349
887
  this.$message.warning("请选择要删除的记录!");
350
888
  return;
@@ -357,16 +895,16 @@ const $ = [
357
895
  modal: !0,
358
896
  dangerouslyUseHTMLString: !0,
359
897
  closeOnClickModal: !1,
360
- beforeClose: (t, s, l) => o(this, null, function* () {
361
- if (t === "confirm")
898
+ beforeClose: (i, s, o) => r(this, null, function* () {
899
+ if (i === "confirm")
362
900
  try {
363
901
  s.confirmButtonLoading = !0, s.confirmButtonText = "删除...", yield e.call(this, this.selectedRows.map((a) => a.id).join(",")), this.$message.success("删除成功"), yield this.reloadTable(), yield this.refreshTree();
364
902
  } catch (a) {
365
903
  }
366
- l();
904
+ o();
367
905
  })
368
906
  }
369
- ).catch((t) => t);
907
+ ).catch((i) => i);
370
908
  }
371
909
  });
372
910
  },
@@ -375,7 +913,7 @@ const $ = [
375
913
  (e = this.$refs.table) == null || e.reload();
376
914
  },
377
915
  refreshTable() {
378
- return o(this, null, function* () {
916
+ return r(this, null, function* () {
379
917
  var e;
380
918
  yield (e = this.$refs.table) == null ? void 0 : e.getPage();
381
919
  });
@@ -387,24 +925,24 @@ const $ = [
387
925
  return this.searchPanelProps.model;
388
926
  }
389
927
  }
390
- }, u = {};
391
- var C = /* @__PURE__ */ y(
392
- T,
393
- P,
394
- S,
928
+ }, S = {};
929
+ var be = /* @__PURE__ */ $(
930
+ me,
931
+ ue,
932
+ pe,
395
933
  !1,
396
- L,
934
+ ye,
397
935
  null,
398
936
  null,
399
937
  null
400
938
  );
401
- function L(e) {
402
- for (let r in u)
403
- this[r] = u[r];
939
+ function ye(e) {
940
+ for (let t in S)
941
+ this[t] = S[t];
404
942
  }
405
- const M = /* @__PURE__ */ function() {
406
- return C.exports;
943
+ const Me = /* @__PURE__ */ function() {
944
+ return be.exports;
407
945
  }();
408
946
  export {
409
- M as default
947
+ Me as default
410
948
  };