@web-utils/component 2.7.21 → 2.7.22

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 (310) hide show
  1. package/dist/chunks/confirmable-mixin.35bd1934.js +104 -0
  2. package/dist/chunks/{dayjs.b0f2f7d9.js → dayjs.ed2e1b73.js} +1 -1
  3. package/dist/chunks/{detail.6619700c.js → detail.d47a021c.js} +1 -1
  4. package/dist/chunks/{form-input-mixin.df413ca8.js → form-input-mixin.760cd65d.js} +1 -1
  5. package/dist/chunks/{form-item-mixin.b850e028.js → form-item-mixin.fa314b67.js} +14 -3
  6. package/dist/chunks/{tab-mixin.51886d91.js → tab-mixin.9d568df9.js} +1 -1
  7. package/dist/chunks/{vueComponentNormalizer.bf552d98.js → vueComponentNormalizer.77ec6792.js} +1 -1
  8. package/dist/components/address-input/index.js +1 -1
  9. package/dist/components/address-input/style.css +1 -10
  10. package/dist/components/affix/index.js +1 -1
  11. package/dist/components/affix/style.css +1 -4
  12. package/dist/components/aside-menu/index.js +1 -1
  13. package/dist/components/aside-menu/style.css +1 -3
  14. package/dist/components/avatar/index.js +1 -1
  15. package/dist/components/avatar/style.css +1 -51
  16. package/dist/components/awesome-button/index.js +42 -12
  17. package/dist/components/base.css +1 -536
  18. package/dist/components/capsule-tab/index.js +1 -1
  19. package/dist/components/capsule-tab/style.css +1 -26
  20. package/dist/components/card/index.js +1 -1
  21. package/dist/components/card/style.css +1 -84
  22. package/dist/components/carousel/index.js +1 -1
  23. package/dist/components/carousel/style.css +1 -35
  24. package/dist/components/chat/index.js +2 -2
  25. package/dist/components/chat/style.css +1 -277
  26. package/dist/components/chunk-file-uploader/index.js +1 -1
  27. package/dist/components/chunk-file-uploader/style.css +1 -3
  28. package/dist/components/chunk-file-uploader-button/index.js +1 -1
  29. package/dist/components/chunk-file-uploader-button/style.css +1 -16
  30. package/dist/components/chunk-file-uploader-drop/index.js +23 -5
  31. package/dist/components/chunk-file-uploader-drop/style.css +1 -11
  32. package/dist/components/chunk-file-uploader-file/index.js +2 -2
  33. package/dist/components/chunk-file-uploader-file/style.css +1 -124
  34. package/dist/components/chunk-file-uploader-files/index.js +1 -1
  35. package/dist/components/chunk-file-uploader-files/style.css +1 -8
  36. package/dist/components/chunk-file-uploader-list/index.js +1 -1
  37. package/dist/components/chunk-file-uploader-list/style.css +1 -8
  38. package/dist/components/chunk-file-uploader-un-support/index.js +1 -1
  39. package/dist/components/chunk-file-uploader-un-support/style.css +1 -5
  40. package/dist/components/code-mirror-editor/index.js +7 -7
  41. package/dist/components/code-mirror-editor/style.css +1 -11
  42. package/dist/components/color-picker/index.js +21 -3
  43. package/dist/components/column/index.js +1 -1
  44. package/dist/components/column-default/index.js +1 -1
  45. package/dist/components/column-dynamic/index.js +1 -1
  46. package/dist/components/column-menu/index.js +1 -1
  47. package/dist/components/column-slot/index.js +2 -2
  48. package/dist/components/comment/index.js +1 -1
  49. package/dist/components/comment/style.css +1 -110
  50. package/dist/components/confirm-button/index.js +2 -2
  51. package/dist/components/confirmable/index.js +2 -2
  52. package/dist/components/context-menu/index.js +1 -1
  53. package/dist/components/context-menu/style.css +1 -84
  54. package/dist/components/count-up/index.js +15 -4
  55. package/dist/components/custom-scrollbar/index.js +18 -5
  56. package/dist/components/data-box/index.js +1 -1
  57. package/dist/components/data-box/style.css +1 -52
  58. package/dist/components/data-card/index.js +1 -1
  59. package/dist/components/data-card/style.css +1 -35
  60. package/dist/components/data-cardtext/index.js +1 -1
  61. package/dist/components/data-cardtext/style.css +1 -30
  62. package/dist/components/data-display/index.js +1 -1
  63. package/dist/components/data-display/style.css +1 -31
  64. package/dist/components/data-icons/index.js +1 -1
  65. package/dist/components/data-icons/style.css +1 -47
  66. package/dist/components/data-imgtext/index.js +1 -1
  67. package/dist/components/data-imgtext/style.css +1 -65
  68. package/dist/components/data-operatext/index.js +1 -1
  69. package/dist/components/data-operatext/style.css +1 -72
  70. package/dist/components/data-panel/index.js +1 -1
  71. package/dist/components/data-panel/style.css +1 -31
  72. package/dist/components/data-pay/index.js +1 -1
  73. package/dist/components/data-pay/style.css +1 -96
  74. package/dist/components/data-price/index.js +1 -1
  75. package/dist/components/data-price/style.css +1 -75
  76. package/dist/components/data-progress/index.js +1 -1
  77. package/dist/components/data-progress/style.css +1 -24
  78. package/dist/components/data-rotate/index.js +1 -1
  79. package/dist/components/data-rotate/style.css +1 -44
  80. package/dist/components/data-table-picker/index.js +1 -1
  81. package/dist/components/data-tabs/index.js +1 -1
  82. package/dist/components/data-tabs/style.css +1 -64
  83. package/dist/components/dialog-column/index.js +1 -1
  84. package/dist/components/dialog-excel/index.js +2 -2
  85. package/dist/components/dialog-filter/index.js +1 -1
  86. package/dist/components/dialog-form/index.js +1 -1
  87. package/dist/components/dynamic-table/index.js +1 -1
  88. package/dist/components/dynamic-table/style.css +1 -24
  89. package/dist/components/e-charts/index.js +1 -1
  90. package/dist/components/e-charts/style.css +1 -4
  91. package/dist/components/easy-popup/index.js +1 -1
  92. package/dist/components/easy-popup/style.css +1 -12
  93. package/dist/components/editable-progress/index.js +1 -1
  94. package/dist/components/editable-progress/style.css +1 -33
  95. package/dist/components/editable-tree/index.js +216 -163
  96. package/dist/components/editable-tree/style.css +1 -79
  97. package/dist/components/egd-collapse/index.js +1 -1
  98. package/dist/components/egd-collapse-item/index.js +1 -1
  99. package/dist/components/element-dialog/index.js +1 -1
  100. package/dist/components/element-dialog/style.css +1 -82
  101. package/dist/components/empty-view/index.js +1 -1
  102. package/dist/components/empty-view/style.css +1 -11
  103. package/dist/components/error-view/index.js +1 -1
  104. package/dist/components/error-view/style.css +1 -11
  105. package/dist/components/flex-column/index.js +14 -2
  106. package/dist/components/flex-item/index.js +15 -3
  107. package/dist/components/flex-row/index.js +14 -2
  108. package/dist/components/flex-scroller/index.js +1 -1
  109. package/dist/components/flex-scroller/style.css +1 -14
  110. package/dist/components/flow/index.js +1 -1
  111. package/dist/components/flow/style.css +1 -38
  112. package/dist/components/flow-node/index.js +1 -1
  113. package/dist/components/flow-viewer/index.js +34 -7
  114. package/dist/components/flow-viewer/style.css +1 -13
  115. package/dist/components/form-button/index.js +2 -2
  116. package/dist/components/form-cascader/index.js +14 -3
  117. package/dist/components/form-checkbox-group/index.js +14 -3
  118. package/dist/components/form-checkbox-group/style.css +1 -45
  119. package/dist/components/form-date-picker/index.js +20 -11
  120. package/dist/components/form-group/index.js +1 -1
  121. package/dist/components/form-group/style.css +1 -76
  122. package/dist/components/form-holder/index.js +21 -3
  123. package/dist/components/form-input/index.js +14 -3
  124. package/dist/components/form-input-email/index.js +14 -3
  125. package/dist/components/form-input-id-card/index.js +14 -3
  126. package/dist/components/form-input-number/index.js +14 -3
  127. package/dist/components/form-input-number/style.css +1 -6
  128. package/dist/components/form-input-phone-number/index.js +14 -3
  129. package/dist/components/form-input-time/index.js +14 -3
  130. package/dist/components/form-item/index.js +43 -15
  131. package/dist/components/form-item/style.css +1 -5
  132. package/dist/components/form-item-config-provider/index.js +1 -1
  133. package/dist/components/form-item-group/index.js +1 -1
  134. package/dist/components/form-item-group/style.css +1 -25
  135. package/dist/components/form-radio-group/index.js +14 -3
  136. package/dist/components/form-radio-group/style.css +1 -47
  137. package/dist/components/form-select/index.js +14 -3
  138. package/dist/components/form-switch/index.js +14 -3
  139. package/dist/components/form-temp/index.js +1 -1
  140. package/dist/components/form-textarea/index.js +14 -3
  141. package/dist/components/form-view/index.js +35 -13
  142. package/dist/components/form-view/style.css +1 -155
  143. package/dist/components/fy-array/index.js +1 -1
  144. package/dist/components/fy-array/style.css +1 -12
  145. package/dist/components/fy-article/index.js +1 -1
  146. package/dist/components/fy-article/style.css +1 -56
  147. package/dist/components/fy-cascader/index.js +1 -1
  148. package/dist/components/fy-checkbox/index.js +1 -1
  149. package/dist/components/fy-checkbox/style.css +1 -9
  150. package/dist/components/fy-code/index.js +1 -1
  151. package/dist/components/fy-curd/index.js +1 -1
  152. package/dist/components/fy-curd/style.css +1 -236
  153. package/dist/components/fy-date/index.js +1 -1
  154. package/dist/components/fy-date/style.css +1 -15
  155. package/dist/components/fy-dialog-form/index.js +1 -1
  156. package/dist/components/fy-dialog-form/style.css +1 -0
  157. package/dist/components/fy-draggable/index.js +1 -1
  158. package/dist/components/fy-draggable/style.css +1 -136
  159. package/dist/components/fy-dynamic/index.js +1 -1
  160. package/dist/components/fy-dynamic/style.css +1 -29
  161. package/dist/components/fy-empty/index.js +1 -1
  162. package/dist/components/fy-empty/style.css +1 -18
  163. package/dist/components/fy-form/index.js +23 -5
  164. package/dist/components/fy-form/style.css +1 -73
  165. package/dist/components/fy-form-design/index.js +73 -49
  166. package/dist/components/fy-form-design/style.css +1 -560
  167. package/dist/components/fy-form-menu/index.js +1 -1
  168. package/dist/components/fy-input/index.js +1 -1
  169. package/dist/components/fy-input-color/index.js +1 -1
  170. package/dist/components/fy-input-icon/index.js +1 -1
  171. package/dist/components/fy-input-icon/style.css +1 -33
  172. package/dist/components/fy-input-map/index.js +1 -1
  173. package/dist/components/fy-input-map/style.css +1 -44
  174. package/dist/components/fy-input-number/index.js +1 -1
  175. package/dist/components/fy-input-table/index.js +1 -1
  176. package/dist/components/fy-input-table/style.css +1 -4
  177. package/dist/components/fy-input-tree/index.js +1 -1
  178. package/dist/components/fy-input-tree/style.css +1 -19
  179. package/dist/components/fy-progress/index.js +1 -1
  180. package/dist/components/fy-radio/index.js +1 -1
  181. package/dist/components/fy-radio/style.css +1 -6
  182. package/dist/components/fy-rate/index.js +1 -1
  183. package/dist/components/fy-rate/style.css +1 -3
  184. package/dist/components/fy-select/index.js +1 -1
  185. package/dist/components/fy-select/style.css +1 -19
  186. package/dist/components/fy-slider/index.js +1 -1
  187. package/dist/components/fy-switch/index.js +1 -1
  188. package/dist/components/fy-tabs/index.js +1 -1
  189. package/dist/components/fy-time/index.js +1 -1
  190. package/dist/components/fy-title/index.js +1 -1
  191. package/dist/components/fy-title/style.css +1 -5
  192. package/dist/components/fy-tree/index.js +1 -1
  193. package/dist/components/fy-tree/style.css +1 -39
  194. package/dist/components/fy-u-editor/index.js +47 -14
  195. package/dist/components/fy-u-editor/style.css +1 -9
  196. package/dist/components/fy-upload/index.js +1 -1
  197. package/dist/components/fy-upload/style.css +1 -55
  198. package/dist/components/guide-steps/index.js +1 -1
  199. package/dist/components/guide-steps/style.css +1 -28
  200. package/dist/components/header-menu/index.js +1 -1
  201. package/dist/components/header-search/index.js +1 -1
  202. package/dist/components/highlight-j-s/index.js +1 -1
  203. package/dist/components/highlight-j-s/style.css +1 -18
  204. package/dist/components/icon-card/index.js +1 -1
  205. package/dist/components/icon-card/style.css +1 -50
  206. package/dist/components/icon-temp/index.js +1 -1
  207. package/dist/components/icon-temp/style.css +1 -17
  208. package/dist/components/iframe-window/index.js +1 -1
  209. package/dist/components/iframe-window/style.css +1 -14
  210. package/dist/components/image-cropper/index.js +15 -6
  211. package/dist/components/image-cropper/style.css +1 -28
  212. package/dist/components/image-preview/index.js +15 -5
  213. package/dist/components/image-preview/style.css +1 -66
  214. package/dist/components/image-viewer/index.js +1 -1
  215. package/dist/components/image-viewer/style.css +1 -15
  216. package/dist/components/input-number/index.js +1 -1
  217. package/dist/components/input-number/style.css +1 -9
  218. package/dist/components/input-number-range/index.js +1 -1
  219. package/dist/components/input-number-range/style.css +1 -6
  220. package/dist/components/keep-view-alive/index.js +1 -1
  221. package/dist/components/keyboard/index.js +1 -1
  222. package/dist/components/keyboard/style.css +1 -473
  223. package/dist/components/license/index.js +1 -1
  224. package/dist/components/loading-view/index.js +1 -1
  225. package/dist/components/loading-view/style.css +1 -11
  226. package/dist/components/login/index.js +1 -1
  227. package/dist/components/login/style.css +1 -19
  228. package/dist/components/name-avatar/index.js +1 -1
  229. package/dist/components/name-avatar/style.css +1 -30
  230. package/dist/components/nav-bar/index.js +1 -1
  231. package/dist/components/nav-bar/style.css +1 -11
  232. package/dist/components/not-implement/index.js +1 -1
  233. package/dist/components/not-implement/style.css +1 -9
  234. package/dist/components/notice/index.js +1 -1
  235. package/dist/components/notice/style.css +1 -48
  236. package/dist/components/page/index.js +1 -1
  237. package/dist/components/page/style.css +1 -6
  238. package/dist/components/page-header/index.js +1 -1
  239. package/dist/components/page-header/style.css +1 -8
  240. package/dist/components/page-index/index.js +42 -18
  241. package/dist/components/page-index/style.css +1 -17
  242. package/dist/components/page-index-top/index.js +38 -16
  243. package/dist/components/page-skeleton/index.js +1 -1
  244. package/dist/components/page-skeleton/style.css +1 -17
  245. package/dist/components/page-skeleton-new/index.js +1 -1
  246. package/dist/components/page-skeleton-new/style.css +1 -36
  247. package/dist/components/pageable-table/index.js +78 -34
  248. package/dist/components/pageable-table/style.css +1 -66
  249. package/dist/components/pageable-view/index.js +78 -34
  250. package/dist/components/pageable-view/style.css +1 -63
  251. package/dist/components/photo-swipe/index.js +46 -24
  252. package/dist/components/process-designer/index.js +80 -50
  253. package/dist/components/process-designer/style.css +1 -1648
  254. package/dist/components/properties-panel/index.js +77 -51
  255. package/dist/components/properties-panel/style.css +1 -106
  256. package/dist/components/queue/index.js +1 -1
  257. package/dist/components/record-video/index.js +1 -1
  258. package/dist/components/record-video/style.css +1 -47
  259. package/dist/components/resize-observer/index.js +1 -1
  260. package/dist/components/resize-observer/style.css +1 -25
  261. package/dist/components/search/index.js +1 -1
  262. package/dist/components/search/style.css +1 -51
  263. package/dist/components/search-popover/index.js +29 -9
  264. package/dist/components/search-popover/style.css +1 -90
  265. package/dist/components/sign/index.js +2 -2
  266. package/dist/components/sign/style.css +1 -6
  267. package/dist/components/sign-panel/index.js +1 -1
  268. package/dist/components/sign-panel/style.css +1 -91
  269. package/dist/components/skeleton/index.js +1 -1
  270. package/dist/components/skeleton/style.css +1 -55
  271. package/dist/components/split-pane/index.js +21 -3
  272. package/dist/components/split-pane/style.css +1 -98
  273. package/dist/components/stateful/index.js +1 -1
  274. package/dist/components/stateful/style.css +1 -27
  275. package/dist/components/static-pageable-table/index.js +1 -1
  276. package/dist/components/static-pageable-table/style.css +1 -3
  277. package/dist/components/swiper/index.js +25 -5
  278. package/dist/components/swiper/style.css +1 -37
  279. package/dist/components/tab/index.js +2 -2
  280. package/dist/components/tab/style.css +1 -108
  281. package/dist/components/tab-item/index.js +3 -3
  282. package/dist/components/table-column/index.js +17 -7
  283. package/dist/components/table-page/index.js +1 -1
  284. package/dist/components/table-view/index.js +62 -36
  285. package/dist/components/table-view/style.css +1 -90
  286. package/dist/components/tag-render/index.js +13 -2
  287. package/dist/components/tag-render/style.css +1 -27
  288. package/dist/components/text-ellipsis/index.js +1 -1
  289. package/dist/components/text-ellipsis/style.css +1 -3
  290. package/dist/components/tinymce-editor/index.js +27 -9
  291. package/dist/components/tinymce-editor/style.css +1 -37
  292. package/dist/components/tinymce-wrapper/index.js +17 -7
  293. package/dist/components/tinymce-wrapper/style.css +1 -30
  294. package/dist/components/toolbar/index.js +4 -4
  295. package/dist/components/toolbar/style.css +1 -35
  296. package/dist/components/toolbar-button/index.js +28 -10
  297. package/dist/components/toolbar-button/style.css +1 -15
  298. package/dist/components/trigger/index.js +1 -1
  299. package/dist/components/verify/index.js +1 -1
  300. package/dist/components/verify/style.css +1 -9
  301. package/dist/components/vue-tags-input/index.js +1 -1
  302. package/dist/components/vue-tags-input/style.css +1 -102
  303. package/dist/components/watermark/index.js +15 -5
  304. package/dist/components/watermark/style.css +1 -10
  305. package/dist/index.css +26 -68
  306. package/dist/index.es.js +990 -877
  307. package/package.json +4 -4
  308. package/web-types.json +1 -1
  309. package/dist/chunks/confirmable-mixin.7112b769.js +0 -75
  310. package/dist/components/dialog-form/style.css +0 -5
@@ -5,7 +5,7 @@ import { CanvasRenderer } from "echarts/renderers";
5
5
  import { isString } from "@web-utils/core";
6
6
  import { debounce } from "@web-utils/integrations/lodash";
7
7
  import { addListener, removeListener } from "resize-detector";
8
- import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.bf552d98.js";
8
+ import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.77ec6792.js";
9
9
  var render = function() {
10
10
  var _vm = this, _h = _vm.$createElement, _c = _vm._self._c || _h;
11
11
  return _c("div", {
@@ -1,4 +1 @@
1
- .echarts {
2
- width: 100%;
3
- height: 100%;
4
- }
1
+ .echarts{width:100%;height:100%}
@@ -1,4 +1,4 @@
1
- import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.bf552d98.js";
1
+ import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.77ec6792.js";
2
2
  var render = function() {
3
3
  var _vm = this, _h = _vm.$createElement, _c = _vm._self._c || _h;
4
4
  return _vm.rendered ? _c("div", {
@@ -1,12 +1 @@
1
- .easy-popup {
2
- position: fixed;
3
- z-index: 9999;
4
- user-select: none;
5
- width: 300px;
6
- padding: 12px;
7
- border: 1px solid #ebeef5;
8
- border-radius: 4px;
9
- background: #fff;
10
- box-shadow: 0 2px 12px #0000001a;
11
- min-height: 200px;
12
- }
1
+ .easy-popup{position:fixed;z-index:9999;user-select:none;width:300px;padding:12px;border:1px solid #ebeef5;border-radius:4px;background:#fff;box-shadow:0 2px 12px #0000001a;min-height:200px}
@@ -1,4 +1,4 @@
1
- import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.bf552d98.js";
1
+ import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.77ec6792.js";
2
2
  var render = function() {
3
3
  var _vm = this, _h = _vm.$createElement, _c = _vm._self._c || _h;
4
4
  return _c("div", {
@@ -1,33 +1 @@
1
- .editable-progress {
2
- display: flex;
3
- flex-direction: column;
4
- align-items: flex-start;
5
- justify-content: center;
6
- width: 100%;
7
- background-color: #e4e7ed;
8
- border-radius: 100px;
9
- }
10
- .editable-progress .el-progress,
11
- .editable-progress .el-slider {
12
- width: 100%;
13
- font-weight: 700;
14
- }
15
- .editable-progress .el-slider__runway {
16
- margin: 0;
17
- }
18
- .editable-progress .el-progress-bar__outer {
19
- background-color: #e4e7ed;
20
- }
21
- .editable-progress .el-slider__bar,
22
- .editable-progress .el-slider__runway {
23
- height: 22px;
24
- border-radius: 100px;
25
- }
26
- .editable-progress .el-slider__button-wrapper {
27
- width: 52px;
28
- height: 52px;
29
- }
30
- .editable-progress .el-slider__button-wrapper .el-slider__button {
31
- width: 24px;
32
- height: 24px;
33
- }
1
+ .editable-progress{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:100%;background-color:#e4e7ed;border-radius:100px}.editable-progress .el-progress,.editable-progress .el-slider{width:100%;font-weight:700}.editable-progress .el-slider__runway{margin:0}.editable-progress .el-progress-bar__outer{background-color:#e4e7ed}.editable-progress .el-slider__bar,.editable-progress .el-slider__runway{height:22px;border-radius:100px}.editable-progress .el-slider__button-wrapper{width:52px;height:52px}.editable-progress .el-slider__button-wrapper .el-slider__button{width:24px;height:24px}
@@ -1,9 +1,37 @@
1
+ var __defProp = Object.defineProperty, __defProps = Object.defineProperties;
2
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty, __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __spreadValues = (a, b) => {
6
+ for (var prop in b || (b = {}))
7
+ __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
8
+ if (__getOwnPropSymbols)
9
+ for (var prop of __getOwnPropSymbols(b))
10
+ __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
11
+ return a;
12
+ }, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13
+ var __async = (__this, __arguments, generator) => new Promise((resolve, reject) => {
14
+ var fulfilled = (value) => {
15
+ try {
16
+ step(generator.next(value));
17
+ } catch (e) {
18
+ reject(e);
19
+ }
20
+ }, rejected = (value) => {
21
+ try {
22
+ step(generator.throw(value));
23
+ } catch (e) {
24
+ reject(e);
25
+ }
26
+ }, step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
27
+ step((generator = generator.apply(__this, __arguments)).next());
28
+ });
1
29
  import { hasOwn, isVerticalScrollbarVisible, scrollbarWidth, computePosition, isPlainObject, isFunction, isUndefined, isNotEmpty, fastClone, delay, findTreeChildren } from "@web-utils/core";
2
30
  import { cloneDeep } from "@web-utils/integrations/lodash";
3
31
  import { a as filterTreeProperties, b as filterTreeEvents, c as assignReactiveProperties } from "../../chunks/utils.d7f73f8d.js";
4
- import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.bf552d98.js";
32
+ import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.77ec6792.js";
5
33
  var MapShim = function() {
6
- if (typeof Map < "u")
34
+ if (typeof Map != "undefined")
7
35
  return Map;
8
36
  function getIndex(arr, key) {
9
37
  var result = -1;
@@ -48,8 +76,8 @@ var MapShim = function() {
48
76
  }, class_1;
49
77
  }()
50
78
  );
51
- }(), isBrowser = typeof window < "u" && typeof document < "u" && window.document === document, global$1 = function() {
52
- return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
79
+ }(), isBrowser = typeof window != "undefined" && typeof document != "undefined" && window.document === document, global$1 = function() {
80
+ return typeof global != "undefined" && global.Math === Math ? global : typeof self != "undefined" && self.Math === Math ? self : typeof window != "undefined" && window.Math === Math ? window : Function("return this")();
53
81
  }(), requestAnimationFrame$1 = function() {
54
82
  return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(global$1) : function(callback) {
55
83
  return setTimeout(function() {
@@ -77,7 +105,7 @@ function throttle(callback, delay2) {
77
105
  }
78
106
  return proxy;
79
107
  }
80
- var REFRESH_DELAY = 20, transitionKeys = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], mutationObserverSupported = typeof MutationObserver < "u", ResizeObserverController = (
108
+ var REFRESH_DELAY = 20, transitionKeys = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], mutationObserverSupported = typeof MutationObserver != "undefined", ResizeObserverController = (
81
109
  /** @class */
82
110
  function() {
83
111
  function ResizeObserverController2() {
@@ -165,7 +193,7 @@ function getHTMLElementContentRect(target) {
165
193
  return createRectInit(paddings.left, paddings.top, width, height);
166
194
  }
167
195
  var isSVGGraphicsElement = function() {
168
- return typeof SVGGraphicsElement < "u" ? function(target) {
196
+ return typeof SVGGraphicsElement != "undefined" ? function(target) {
169
197
  return target instanceof getWindowOf(target).SVGGraphicsElement;
170
198
  } : function(target) {
171
199
  return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox == "function";
@@ -178,7 +206,7 @@ function getContentRect(target) {
178
206
  return isBrowser ? isSVGGraphicsElement(target) ? getSVGContentRect(target) : getHTMLElementContentRect(target) : emptyRect;
179
207
  }
180
208
  function createReadOnlyRect(_a) {
181
- var x = _a.x, y = _a.y, width = _a.width, height = _a.height, Constr = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, rect = Object.create(Constr.prototype);
209
+ var x = _a.x, y = _a.y, width = _a.width, height = _a.height, Constr = typeof DOMRectReadOnly != "undefined" ? DOMRectReadOnly : Object, rect = Object.create(Constr.prototype);
182
210
  return defineConfigurable(rect, {
183
211
  x,
184
212
  y,
@@ -227,7 +255,7 @@ var ResizeObservation = (
227
255
  return ResizeObserverSPI2.prototype.observe = function(target) {
228
256
  if (!arguments.length)
229
257
  throw new TypeError("1 argument required, but only 0 present.");
230
- if (!(typeof Element > "u" || !(Element instanceof Object))) {
258
+ if (!(typeof Element == "undefined" || !(Element instanceof Object))) {
231
259
  if (!(target instanceof getWindowOf(target).Element))
232
260
  throw new TypeError('parameter 1 is not of type "Element".');
233
261
  var observations = this.observations_;
@@ -236,7 +264,7 @@ var ResizeObservation = (
236
264
  }, ResizeObserverSPI2.prototype.unobserve = function(target) {
237
265
  if (!arguments.length)
238
266
  throw new TypeError("1 argument required, but only 0 present.");
239
- if (!(typeof Element > "u" || !(Element instanceof Object))) {
267
+ if (!(typeof Element == "undefined" || !(Element instanceof Object))) {
240
268
  if (!(target instanceof getWindowOf(target).Element))
241
269
  throw new TypeError('parameter 1 is not of type "Element".');
242
270
  var observations = this.observations_;
@@ -262,7 +290,7 @@ var ResizeObservation = (
262
290
  return this.activeObservations_.length > 0;
263
291
  }, ResizeObserverSPI2;
264
292
  }()
265
- ), observers = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new MapShim(), ResizeObserver = (
293
+ ), observers = typeof WeakMap != "undefined" ? /* @__PURE__ */ new WeakMap() : new MapShim(), ResizeObserver = (
266
294
  /** @class */
267
295
  function() {
268
296
  function ResizeObserver2(callback) {
@@ -287,9 +315,9 @@ var ResizeObservation = (
287
315
  };
288
316
  });
289
317
  var index = function() {
290
- return typeof global$1.ResizeObserver < "u" ? global$1.ResizeObserver : ResizeObserver;
318
+ return typeof global$1.ResizeObserver != "undefined" ? global$1.ResizeObserver : ResizeObserver;
291
319
  }();
292
- const isServer = typeof window > "u", resizeHandler = (entries) => {
320
+ const isServer = typeof window == "undefined", resizeHandler = (entries) => {
293
321
  for (const entry of entries) {
294
322
  const listeners = entry.target.__resizeListeners__ || [];
295
323
  listeners.length && listeners.forEach((fn) => {
@@ -799,45 +827,51 @@ const __vue2_script = {
799
827
  resize() {
800
828
  isVerticalScrollbarVisible(this.$refs.treeWrapper) ? this.right = 4 + scrollbarWidth : this.right = 4;
801
829
  },
802
- async showContextMenu(event, data, node) {
803
- data.contextmenu === !1 || data.id === -1 || data.id === 0 || data.edit === !0 || this.contextMenu && (this.curNode = node, this.curData = data, this.showMenu = !0, this.$refs.tree.setCurrentKey(data.id), await this.$nextTick(), this.position = computePosition(event, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
830
+ showContextMenu(event, data, node) {
831
+ return __async(this, null, function* () {
832
+ data.contextmenu === !1 || data.id === -1 || data.id === 0 || data.edit === !0 || this.contextMenu && (this.curNode = node, this.curData = data, this.showMenu = !0, this.$refs.tree.setCurrentKey(data.id), yield this.$nextTick(), this.position = computePosition(event, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
833
+ });
804
834
  },
805
835
  hideContextMenu() {
806
836
  this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
807
837
  },
808
- async tryFetch() {
809
- var _a;
810
- if (this.lazy === !1 && this.fetchApi) {
811
- const res = await this.fetchApi(((_a = this.rootNode) == null ? void 0 : _a.id) ?? -1, {});
812
- if (isPlainObject(res.data) && (res.data = [res.data]), res.data = res.data || [], this.empty = res.data.length === 0, isPlainObject(this.customRootNode)) {
813
- const data = cloneDeep(this.customRootNode);
814
- data[this.treeProps.children || "children"] = res.data, this.treeData = [data];
815
- } else if (isFunction(this.customRootNode)) {
816
- const data = this.customRootNode(res.data);
817
- data[this.treeProps.children || "children"] = res.data, this.treeData = isPlainObject(data) ? [data] : data;
818
- } else
819
- this.treeData = res.data;
820
- }
838
+ tryFetch() {
839
+ return __async(this, null, function* () {
840
+ var _a, _b;
841
+ if (this.lazy === !1 && this.fetchApi) {
842
+ const res = yield this.fetchApi((_b = (_a = this.rootNode) == null ? void 0 : _a.id) != null ? _b : -1, {});
843
+ if (isPlainObject(res.data) && (res.data = [res.data]), res.data = res.data || [], this.empty = res.data.length === 0, isPlainObject(this.customRootNode)) {
844
+ const data = cloneDeep(this.customRootNode);
845
+ data[this.treeProps.children || "children"] = res.data, this.treeData = [data];
846
+ } else if (isFunction(this.customRootNode)) {
847
+ const data = this.customRootNode(res.data);
848
+ data[this.treeProps.children || "children"] = res.data, this.treeData = isPlainObject(data) ? [data] : data;
849
+ } else
850
+ this.treeData = res.data;
851
+ }
852
+ });
821
853
  },
822
- async loadNode(node, resolve) {
823
- var _a, _b, _c;
824
- if (node.level === 0) {
825
- const res = await this.fetchApi(((_a = this.rootNode) == null ? void 0 : _a.id) ?? -1, node);
826
- if (this.empty = res.data.length === 0, isPlainObject(this.customRootNode)) {
827
- const data = cloneDeep(this.customRootNode);
828
- data[this.treeProps.children || "children"] = res.data, resolve([data]);
829
- } else if (isFunction(this.customRootNode)) {
830
- const data = this.customRootNode(res.data);
831
- data[this.treeProps.children || "children"] = res.data, this.treeData = isPlainObject(data) ? [data] : data;
832
- } else
833
- resolve(res.data);
834
- await this.$nextTick(), this.$emit("root-node-loaded", res.data), this.defaultExpandedKeys ? this.expandedKeys = [(_b = res == null ? void 0 : res.data[0]) == null ? void 0 : _b.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(_c = res == null ? void 0 : res.data[0]) == null ? void 0 : _c.id]);
835
- } else {
836
- if (node.leaf || node.data.isTempNode)
837
- return resolve([]);
838
- const res = await this.fetchApi(node.data.id, node);
839
- resolve(res.data), await this.$nextTick(), this.$emit("node-loaded", res.data);
840
- }
854
+ loadNode(node, resolve) {
855
+ return __async(this, null, function* () {
856
+ var _a, _b, _c, _d;
857
+ if (node.level === 0) {
858
+ const res = yield this.fetchApi((_b = (_a = this.rootNode) == null ? void 0 : _a.id) != null ? _b : -1, node);
859
+ if (this.empty = res.data.length === 0, isPlainObject(this.customRootNode)) {
860
+ const data = cloneDeep(this.customRootNode);
861
+ data[this.treeProps.children || "children"] = res.data, resolve([data]);
862
+ } else if (isFunction(this.customRootNode)) {
863
+ const data = this.customRootNode(res.data);
864
+ data[this.treeProps.children || "children"] = res.data, this.treeData = isPlainObject(data) ? [data] : data;
865
+ } else
866
+ resolve(res.data);
867
+ yield this.$nextTick(), this.$emit("root-node-loaded", res.data), this.defaultExpandedKeys ? this.expandedKeys = [(_c = res == null ? void 0 : res.data[0]) == null ? void 0 : _c.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(_d = res == null ? void 0 : res.data[0]) == null ? void 0 : _d.id]);
868
+ } else {
869
+ if (node.leaf || node.data.isTempNode)
870
+ return resolve([]);
871
+ const res = yield this.fetchApi(node.data.id, node);
872
+ resolve(res.data), yield this.$nextTick(), this.$emit("node-loaded", res.data);
873
+ }
874
+ });
841
875
  },
842
876
  clear() {
843
877
  this.cancelEdit(), this.removeNewNode();
@@ -851,67 +885,68 @@ const __vue2_script = {
851
885
  cancelEdit() {
852
886
  this.editData && (isUndefined(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
853
887
  },
854
- async editNode(node, data) {
855
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = data, this.text = data[this.treeProps.label], isUndefined(data.edit) ? this.$set(data, "edit", !0) : data.edit = !0, await this.$nextTick(), this.$refs.labelTxt.focus()) : await this.$prompt(`请输入新的${this.label}名:`, {
856
- ...this.defaultOptions,
857
- inputValue: data[this.treeProps.label],
858
- beforeClose: async (action, instance, done) => {
859
- if (action === "confirm") {
860
- try {
861
- instance.confirmButtonLoading = !0, instance.confirmButtonText = "处理中...", this.text = instance.inputValue, await this.onConfirm(this.curNode, this.curData), done();
862
- } catch {
863
- instance.confirmButtonText = "确定";
864
- }
865
- instance.confirmButtonLoading = !1;
866
- } else
867
- done();
868
- }
869
- }).catch((_) => _);
870
- },
871
- async appendRootNode() {
872
- 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}名:`, {
873
- ...this.defaultOptions,
874
- beforeClose: async (action, instance, done) => {
875
- if (action === "confirm") {
876
- try {
877
- this.createNewChild(-1), instance.confirmButtonLoading = !0, instance.confirmButtonText = "处理中...";
878
- const res = await this.saveApi(this.newNodeBuilder(instance.inputValue, { id: -1 }));
879
- this.newChild[this.treeProps.label] = instance.inputValue, this.newChild.edit = !1, assignReactiveProperties(this.newChild, res.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.locateView(), done();
880
- } catch {
881
- instance.confirmButtonText = "确定";
882
- }
883
- instance.confirmButtonLoading = !1;
884
- } else
885
- done();
886
- }
887
- }).catch((_) => _);
888
+ editNode(node, data) {
889
+ return __async(this, null, function* () {
890
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = data, this.text = data[this.treeProps.label], isUndefined(data.edit) ? this.$set(data, "edit", !0) : data.edit = !0, yield this.$nextTick(), this.$refs.labelTxt.focus()) : yield this.$prompt(`请输入新的${this.label}名:`, __spreadProps(__spreadValues({}, this.defaultOptions), {
891
+ inputValue: data[this.treeProps.label],
892
+ beforeClose: (action, instance, done) => __async(this, null, function* () {
893
+ if (action === "confirm") {
894
+ try {
895
+ instance.confirmButtonLoading = !0, instance.confirmButtonText = "处理中...", this.text = instance.inputValue, yield this.onConfirm(this.curNode, this.curData), done();
896
+ } catch (e) {
897
+ instance.confirmButtonText = "确定";
898
+ }
899
+ instance.confirmButtonLoading = !1;
900
+ } else
901
+ done();
902
+ })
903
+ })).catch((_) => _);
904
+ });
905
+ },
906
+ appendRootNode() {
907
+ return __async(this, null, function* () {
908
+ 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}名:`, __spreadProps(__spreadValues({}, this.defaultOptions), {
909
+ beforeClose: (action, instance, done) => __async(this, null, function* () {
910
+ if (action === "confirm") {
911
+ try {
912
+ this.createNewChild(-1), instance.confirmButtonLoading = !0, instance.confirmButtonText = "处理中...";
913
+ const res = yield this.saveApi(this.newNodeBuilder(instance.inputValue, { id: -1 }));
914
+ this.newChild[this.treeProps.label] = instance.inputValue, this.newChild.edit = !1, assignReactiveProperties(this.newChild, res.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), yield this.locateView(), done();
915
+ } catch (e) {
916
+ instance.confirmButtonText = "确定";
917
+ }
918
+ instance.confirmButtonLoading = !1;
919
+ } else
920
+ done();
921
+ })
922
+ })).catch((_) => _);
923
+ });
888
924
  },
889
925
  appendChildNode(node) {
890
926
  this.text = "";
891
927
  const expanded = node.expanded;
892
- node.expand(async () => {
893
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(node.data.id), this.$refs.tree.append(this.newChild, node), await this.scrollIntoView(expanded)) : await this.$prompt(`请输入${this.label}名:`, {
894
- ...this.defaultOptions,
895
- beforeClose: async (action, instance, done) => {
928
+ node.expand(() => __async(this, null, function* () {
929
+ !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(node.data.id), this.$refs.tree.append(this.newChild, node), yield this.scrollIntoView(expanded)) : yield this.$prompt(`请输入${this.label}名:`, __spreadProps(__spreadValues({}, this.defaultOptions), {
930
+ beforeClose: (action, instance, done) => __async(this, null, function* () {
896
931
  if (action === "confirm") {
897
932
  try {
898
933
  this.createNewChild(node.data.id), instance.confirmButtonLoading = !0, instance.confirmButtonText = "处理中...";
899
- const res = await this.saveApi(this.newNodeBuilder(instance.inputValue, node.data));
900
- this.newChild[this.treeProps.label] = instance.inputValue, this.newChild.edit = !1, assignReactiveProperties(this.newChild, res.data), this.$refs.tree.append(this.newChild, node), await this.locateView(), done();
901
- } catch {
934
+ const res = yield this.saveApi(this.newNodeBuilder(instance.inputValue, node.data));
935
+ this.newChild[this.treeProps.label] = instance.inputValue, this.newChild.edit = !1, assignReactiveProperties(this.newChild, res.data), this.$refs.tree.append(this.newChild, node), yield this.locateView(), done();
936
+ } catch (e) {
902
937
  instance.confirmButtonText = "确定";
903
938
  }
904
939
  instance.confirmButtonLoading = !1;
905
940
  } else
906
941
  done();
907
- }
908
- }).catch((_) => _);
909
- });
942
+ })
943
+ })).catch((_) => _);
944
+ }));
910
945
  },
911
946
  appendChildNodeWithData(node, parentId, label) {
912
947
  this.text = "";
913
948
  const expanded = node.expanded;
914
- node.expand(async () => {
949
+ node.expand(() => __async(this, null, function* () {
915
950
  this.clear(), this.newChild = {
916
951
  id: -1,
917
952
  parentId,
@@ -919,24 +954,30 @@ const __vue2_script = {
919
954
  edit: !1,
920
955
  isTempNode: !0,
921
956
  hasChildren: !1
922
- }, this.$refs.tree.append(this.newChild, node), await this.scrollIntoView(expanded);
923
- });
957
+ }, this.$refs.tree.append(this.newChild, node), yield this.scrollIntoView(expanded);
958
+ }));
924
959
  },
925
960
  appendPeerNode(node) {
926
961
  node.parent && node.parent.level !== 0 ? this.appendChildNode(node.parent) : this.appendRootNode();
927
962
  },
928
- async addRootNode(data) {
929
- this.$refs.tree.remove(data), await this.$nextTick(), this.$refs.tree.root.insertChild({ data }, void 0, !0);
963
+ addRootNode(data) {
964
+ return __async(this, null, function* () {
965
+ this.$refs.tree.remove(data), yield this.$nextTick(), this.$refs.tree.root.insertChild({ data }, void 0, !0);
966
+ });
930
967
  },
931
- async addChildNode(data) {
932
- this.curNode && this.curNode.level !== 0 ? this.curNode.expand(async () => {
933
- this.$refs.tree.remove(data), await this.$nextTick(), this.$refs.tree.append(data, this.curNode);
934
- }) : await this.addRootNode(data);
968
+ addChildNode(data) {
969
+ return __async(this, null, function* () {
970
+ this.curNode && this.curNode.level !== 0 ? this.curNode.expand(() => __async(this, null, function* () {
971
+ this.$refs.tree.remove(data), yield this.$nextTick(), this.$refs.tree.append(data, this.curNode);
972
+ })) : yield this.addRootNode(data);
973
+ });
935
974
  },
936
- async addPeerNode(data) {
937
- this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(async () => {
938
- this.$refs.tree.remove(data), await this.$nextTick(), this.$refs.tree.append(data, this.curNode.parent);
939
- }) : await this.addRootNode(data);
975
+ addPeerNode(data) {
976
+ return __async(this, null, function* () {
977
+ this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(() => __async(this, null, function* () {
978
+ this.$refs.tree.remove(data), yield this.$nextTick(), this.$refs.tree.append(data, this.curNode.parent);
979
+ })) : yield this.addRootNode(data);
980
+ });
940
981
  },
941
982
  updateNode(data) {
942
983
  const node = this.$refs.tree.getNode(data);
@@ -955,60 +996,66 @@ const __vue2_script = {
955
996
  hasChildren: !1
956
997
  }, this.$emit("create-new-node", this.newChild);
957
998
  },
958
- async removeNodeModal(node) {
959
- await this.$confirm(
960
- `你确定要删除${this.label}[<span class="break-word" style="color: orange">${node.data[this.treeProps.label]}</span>]吗?`,
961
- "系统提示",
962
- {
963
- type: "warning",
964
- modal: !0,
965
- dangerouslyUseHTMLString: !0,
966
- iconClass: "el-icon-question",
967
- closeOnClickModal: !1,
968
- confirmButtonClass: "el-button--danger",
969
- cancelButtonClass: "el-button--primary is-plain",
970
- beforeClose: async (action, instance, done) => {
971
- if (action === "confirm") {
972
- try {
973
- instance.confirmButtonLoading = !0, instance.confirmButtonText = "删除...";
974
- const parentNode = node.parent, res = await this.deleteApi(node.data.id);
975
- res.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(node), this.$emit("node-deleted", parentNode, node.data), done()) : this.$message.error(res.message);
976
- } catch {
977
- }
978
- instance.confirmButtonText = "确定", instance.confirmButtonLoading = !1;
979
- } else
980
- done();
999
+ removeNodeModal(node) {
1000
+ return __async(this, null, function* () {
1001
+ yield this.$confirm(
1002
+ `你确定要删除${this.label}[<span class="break-word" style="color: orange">${node.data[this.treeProps.label]}</span>]吗?`,
1003
+ "系统提示",
1004
+ {
1005
+ type: "warning",
1006
+ modal: !0,
1007
+ dangerouslyUseHTMLString: !0,
1008
+ iconClass: "el-icon-question",
1009
+ closeOnClickModal: !1,
1010
+ confirmButtonClass: "el-button--danger",
1011
+ cancelButtonClass: "el-button--primary is-plain",
1012
+ beforeClose: (action, instance, done) => __async(this, null, function* () {
1013
+ if (action === "confirm") {
1014
+ try {
1015
+ instance.confirmButtonLoading = !0, instance.confirmButtonText = "删除...";
1016
+ const parentNode = node.parent, res = yield this.deleteApi(node.data.id);
1017
+ res.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(node), this.$emit("node-deleted", parentNode, node.data), done()) : this.$message.error(res.message);
1018
+ } catch (_) {
1019
+ }
1020
+ instance.confirmButtonText = "确定", instance.confirmButtonLoading = !1;
1021
+ } else
1022
+ done();
1023
+ })
981
1024
  }
1025
+ ).catch((_) => _);
1026
+ });
1027
+ },
1028
+ removeNode(node) {
1029
+ return __async(this, null, function* () {
1030
+ try {
1031
+ const parentNode = node.parent;
1032
+ if (this.deleteApi) {
1033
+ const res = yield this.deleteApi(node.data.id);
1034
+ res.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(node), this.$emit("node-deleted", parentNode, node.data)) : this.$message.error(res.message);
1035
+ } else
1036
+ this.$refs.tree.remove(node);
1037
+ } catch (e) {
982
1038
  }
983
- ).catch((_) => _);
984
- },
985
- async removeNode(node) {
986
- try {
987
- const parentNode = node.parent;
988
- if (this.deleteApi) {
989
- const res = await this.deleteApi(node.data.id);
990
- res.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(node), this.$emit("node-deleted", parentNode, node.data)) : this.$message.error(res.message);
991
- } else
992
- this.$refs.tree.remove(node);
993
- } catch {
994
- }
1039
+ });
995
1040
  },
996
- async onConfirm(node, data) {
997
- if (data[this.treeProps.label] === this.text || !isNotEmpty(this.text)) {
998
- this.clear();
999
- return;
1000
- }
1001
- isUndefined(data.loading) ? this.$set(data, "loading", !0) : data.loading = !0;
1002
- try {
1003
- if (this.loading = !0, data.id === -1) {
1004
- const res = await this.saveApi(this.newNodeBuilder(this.text, node.parent.data || { id: -1 })), old = fastClone(data);
1005
- assignReactiveProperties(data, { ...res.data, isTempNode: !1 }), this.$emit("node-added", data, old, node), this.registerNode(node);
1006
- } else
1007
- await this.updateApi({ ...data, [this.treeProps.label]: this.text });
1008
- data[this.treeProps.label] = this.text, data.edit = !1, this.$emit("node-updated", data, node), this.text = "";
1009
- } catch {
1010
- }
1011
- data.loading = !1, this.loading = !1;
1041
+ onConfirm(node, data) {
1042
+ return __async(this, null, function* () {
1043
+ if (data[this.treeProps.label] === this.text || !isNotEmpty(this.text)) {
1044
+ this.clear();
1045
+ return;
1046
+ }
1047
+ isUndefined(data.loading) ? this.$set(data, "loading", !0) : data.loading = !0;
1048
+ try {
1049
+ if (this.loading = !0, data.id === -1) {
1050
+ const res = yield this.saveApi(this.newNodeBuilder(this.text, node.parent.data || { id: -1 })), old = fastClone(data);
1051
+ assignReactiveProperties(data, __spreadProps(__spreadValues({}, res.data), { isTempNode: !1 })), this.$emit("node-added", data, old, node), this.registerNode(node);
1052
+ } else
1053
+ yield this.updateApi(__spreadProps(__spreadValues({}, data), { [this.treeProps.label]: this.text }));
1054
+ data[this.treeProps.label] = this.text, data.edit = !1, this.$emit("node-updated", data, node), this.text = "";
1055
+ } catch (e) {
1056
+ }
1057
+ data.loading = !1, this.loading = !1;
1058
+ });
1012
1059
  },
1013
1060
  onCancel(node, data) {
1014
1061
  data.id === -1 ? this.$refs.tree.remove(node) : data.edit = !1, this.text = "";
@@ -1019,14 +1066,18 @@ const __vue2_script = {
1019
1066
  getCurrentNode() {
1020
1067
  return this.$refs.tree.getCurrentNode();
1021
1068
  },
1022
- async locateView() {
1023
- await this.$nextTick();
1024
- const el = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
1025
- el && el.scrollIntoView();
1069
+ locateView() {
1070
+ return __async(this, null, function* () {
1071
+ yield this.$nextTick();
1072
+ const el = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
1073
+ el && el.scrollIntoView();
1074
+ });
1026
1075
  },
1027
- async scrollIntoView(expanded) {
1028
- var _a, _b;
1029
- await this.$nextTick(), expanded || await delay(300), (_b = (_a = this.$refs) == null ? void 0 : _a.labelTxt) == null || _b.focus();
1076
+ scrollIntoView(expanded) {
1077
+ return __async(this, null, function* () {
1078
+ var _a, _b;
1079
+ yield this.$nextTick(), expanded || (yield delay(300)), (_b = (_a = this.$refs) == null ? void 0 : _a.labelTxt) == null || _b.focus();
1080
+ });
1030
1081
  },
1031
1082
  inputKeyup(event, node, data) {
1032
1083
  event.keyCode === 13 && this.onConfirm(node, data), event.keyCode === 27 && this.clear();
@@ -1062,8 +1113,10 @@ const __vue2_script = {
1062
1113
  registerNode(node) {
1063
1114
  node.store.registerNode(node), delete node.store.nodesMap[-1];
1064
1115
  },
1065
- async reloadTree() {
1066
- this.lazy ? this.treeKey = Date.now() : await this.tryFetch();
1116
+ reloadTree() {
1117
+ return __async(this, null, function* () {
1118
+ this.lazy ? this.treeKey = Date.now() : yield this.tryFetch();
1119
+ });
1067
1120
  }
1068
1121
  }
1069
1122
  }, __cssModules = {};