@web-utils/component 2.7.20 → 2.7.21

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 (393) hide show
  1. package/dist/chunks/{config.46422d7f.js → config.7dec2bf2.js} +2 -2
  2. package/dist/chunks/confirmable-mixin.7112b769.js +75 -0
  3. package/dist/chunks/dataformat.9cc4428a.js +158 -0
  4. package/dist/chunks/dayjs.b0f2f7d9.js +247 -0
  5. package/dist/chunks/detail.6619700c.js +29 -0
  6. package/dist/chunks/dic.9de2fe5a.js +135 -0
  7. package/dist/chunks/{event.dd6f522d.js → event.fc358074.js} +31 -31
  8. package/dist/chunks/{form-input-mixin.ff5b58f7.js → form-input-mixin.df413ca8.js} +6 -6
  9. package/dist/chunks/{form-item-mixin.79f6eaff.js → form-item-mixin.b850e028.js} +18 -18
  10. package/dist/chunks/{form-pick-mixin.61ad06b2.js → form-pick-mixin.c4e0391b.js} +2 -2
  11. package/dist/chunks/init.e0133910.js +122 -0
  12. package/dist/chunks/{input-number-mixin.41a066be.js → input-number-mixin.6849fa63.js} +4 -4
  13. package/dist/chunks/{mixins.5a78e0db.js → mixins.6a394a6c.js} +4 -4
  14. package/dist/chunks/{packages.1fc9ccba.js → packages.419bde01.js} +7 -7
  15. package/dist/chunks/permission.07c49abf.js +16 -0
  16. package/dist/chunks/slot.a7387ecc.js +27 -0
  17. package/dist/chunks/{tab-mixin.8c0142e0.js → tab-mixin.51886d91.js} +20 -20
  18. package/dist/chunks/util.89913643.js +261 -0
  19. package/dist/chunks/utils.d7f73f8d.js +185 -0
  20. package/dist/chunks/utils.f44207f4.js +26 -0
  21. package/dist/chunks/vueComponentNormalizer.bf552d98.js +32 -0
  22. package/dist/components/address-input/index.js +36 -36
  23. package/dist/components/address-input/style.css +10 -1
  24. package/dist/components/affix/index.js +39 -39
  25. package/dist/components/affix/style.css +4 -1
  26. package/dist/components/aside-menu/index.js +29 -29
  27. package/dist/components/aside-menu/style.css +3 -1
  28. package/dist/components/avatar/index.js +43 -43
  29. package/dist/components/avatar/style.css +51 -1
  30. package/dist/components/awesome-button/index.js +28 -28
  31. package/dist/components/base.css +536 -1
  32. package/dist/components/capsule-tab/index.js +26 -26
  33. package/dist/components/capsule-tab/style.css +26 -1
  34. package/dist/components/card/index.js +49 -49
  35. package/dist/components/card/style.css +84 -1
  36. package/dist/components/carousel/index.js +35 -35
  37. package/dist/components/carousel/style.css +35 -1
  38. package/dist/components/chat/index.js +203 -203
  39. package/dist/components/chat/style.css +277 -1
  40. package/dist/components/chunk-file-uploader/index.js +46 -46
  41. package/dist/components/chunk-file-uploader/style.css +3 -1
  42. package/dist/components/chunk-file-uploader-button/index.js +22 -22
  43. package/dist/components/chunk-file-uploader-button/style.css +16 -1
  44. package/dist/components/chunk-file-uploader-drop/index.js +27 -27
  45. package/dist/components/chunk-file-uploader-drop/style.css +11 -1
  46. package/dist/components/chunk-file-uploader-file/index.js +118 -118
  47. package/dist/components/chunk-file-uploader-file/style.css +124 -1
  48. package/dist/components/chunk-file-uploader-files/index.js +27 -27
  49. package/dist/components/chunk-file-uploader-files/style.css +8 -1
  50. package/dist/components/chunk-file-uploader-list/index.js +27 -27
  51. package/dist/components/chunk-file-uploader-list/style.css +8 -1
  52. package/dist/components/chunk-file-uploader-un-support/index.js +27 -27
  53. package/dist/components/chunk-file-uploader-un-support/style.css +5 -1
  54. package/dist/components/code-mirror-editor/index.js +134 -134
  55. package/dist/components/code-mirror-editor/style.css +11 -1
  56. package/dist/components/color-picker/index.js +39 -39
  57. package/dist/components/column/index.js +66 -66
  58. package/dist/components/column-default/index.js +54 -54
  59. package/dist/components/column-dynamic/index.js +54 -54
  60. package/dist/components/column-menu/index.js +128 -128
  61. package/dist/components/column-slot/index.js +168 -168
  62. package/dist/components/comment/index.js +33 -33
  63. package/dist/components/comment/style.css +110 -1
  64. package/dist/components/confirm-button/index.js +18 -18
  65. package/dist/components/confirmable/index.js +17 -17
  66. package/dist/components/context-menu/index.js +89 -89
  67. package/dist/components/context-menu/style.css +84 -1
  68. package/dist/components/count-up/index.js +36 -36
  69. package/dist/components/custom-scrollbar/index.js +45 -45
  70. package/dist/components/data-box/index.js +41 -41
  71. package/dist/components/data-box/style.css +52 -1
  72. package/dist/components/data-card/index.js +38 -38
  73. package/dist/components/data-card/style.css +35 -1
  74. package/dist/components/data-cardtext/index.js +33 -33
  75. package/dist/components/data-cardtext/style.css +30 -1
  76. package/dist/components/data-display/index.js +37 -37
  77. package/dist/components/data-display/style.css +31 -1
  78. package/dist/components/data-icons/index.js +40 -40
  79. package/dist/components/data-icons/style.css +47 -1
  80. package/dist/components/data-imgtext/index.js +44 -44
  81. package/dist/components/data-imgtext/style.css +65 -1
  82. package/dist/components/data-operatext/index.js +44 -44
  83. package/dist/components/data-operatext/style.css +72 -1
  84. package/dist/components/data-panel/index.js +38 -38
  85. package/dist/components/data-panel/style.css +31 -1
  86. package/dist/components/data-pay/index.js +60 -60
  87. package/dist/components/data-pay/style.css +96 -1
  88. package/dist/components/data-price/index.js +38 -38
  89. package/dist/components/data-price/style.css +75 -1
  90. package/dist/components/data-progress/index.js +39 -39
  91. package/dist/components/data-progress/style.css +24 -1
  92. package/dist/components/data-rotate/index.js +39 -39
  93. package/dist/components/data-rotate/style.css +44 -1
  94. package/dist/components/data-table-picker/index.js +151 -53
  95. package/dist/components/data-tabs/index.js +39 -39
  96. package/dist/components/data-tabs/style.css +64 -1
  97. package/dist/components/dialog-column/index.js +50 -50
  98. package/dist/components/dialog-excel/index.js +68 -68
  99. package/dist/components/dialog-filter/index.js +84 -84
  100. package/dist/components/dialog-form/index.js +89 -89
  101. package/dist/components/dialog-form/style.css +5 -0
  102. package/dist/components/dynamic-table/index.js +71 -71
  103. package/dist/components/dynamic-table/style.css +24 -1
  104. package/dist/components/e-charts/index.js +95 -94
  105. package/dist/components/e-charts/style.css +4 -1
  106. package/dist/components/easy-popup/index.js +87 -0
  107. package/dist/components/easy-popup/style.css +12 -0
  108. package/dist/components/editable-progress/index.js +48 -48
  109. package/dist/components/editable-progress/style.css +33 -1
  110. package/dist/components/editable-tree/index.js +587 -287
  111. package/dist/components/editable-tree/style.css +79 -1
  112. package/dist/components/egd-collapse/index.js +29 -29
  113. package/dist/components/egd-collapse-item/index.js +51 -51
  114. package/dist/components/element-dialog/index.js +74 -65
  115. package/dist/components/element-dialog/style.css +82 -1
  116. package/dist/components/empty-view/index.js +26 -26
  117. package/dist/components/empty-view/style.css +11 -1
  118. package/dist/components/error-view/index.js +25 -25
  119. package/dist/components/error-view/style.css +11 -1
  120. package/dist/components/flex-column/index.js +19 -19
  121. package/dist/components/flex-item/index.js +20 -20
  122. package/dist/components/flex-row/index.js +19 -19
  123. package/dist/components/flex-scroller/index.js +24 -24
  124. package/dist/components/flex-scroller/style.css +14 -1
  125. package/dist/components/flow/index.js +100 -100
  126. package/dist/components/flow/style.css +38 -1
  127. package/dist/components/flow-node/index.js +37 -37
  128. package/dist/components/flow-viewer/index.js +135 -0
  129. package/dist/components/flow-viewer/style.css +13 -0
  130. package/dist/components/form-button/index.js +32 -32
  131. package/dist/components/form-cascader/index.js +62 -61
  132. package/dist/components/form-checkbox-group/index.js +61 -61
  133. package/dist/components/form-checkbox-group/style.css +45 -1
  134. package/dist/components/form-date-picker/index.js +57 -57
  135. package/dist/components/form-group/index.js +38 -38
  136. package/dist/components/form-group/style.css +76 -1
  137. package/dist/components/form-holder/index.js +30 -30
  138. package/dist/components/form-input/index.js +50 -50
  139. package/dist/components/form-input-email/index.js +44 -44
  140. package/dist/components/form-input-id-card/index.js +49 -49
  141. package/dist/components/form-input-number/index.js +49 -49
  142. package/dist/components/form-input-number/style.css +6 -1
  143. package/dist/components/form-input-phone-number/index.js +45 -45
  144. package/dist/components/form-input-time/index.js +48 -48
  145. package/dist/components/form-item/index.js +73 -73
  146. package/dist/components/form-item/style.css +5 -1
  147. package/dist/components/form-item-config-provider/index.js +19 -19
  148. package/dist/components/form-item-group/index.js +65 -65
  149. package/dist/components/form-item-group/style.css +25 -1
  150. package/dist/components/form-radio-group/index.js +61 -61
  151. package/dist/components/form-radio-group/style.css +47 -1
  152. package/dist/components/form-select/index.js +52 -52
  153. package/dist/components/form-switch/index.js +45 -45
  154. package/dist/components/form-temp/index.js +50 -50
  155. package/dist/components/form-textarea/index.js +44 -44
  156. package/dist/components/form-view/index.js +143 -142
  157. package/dist/components/form-view/style.css +155 -1
  158. package/dist/components/fy-array/index.js +64 -64
  159. package/dist/components/fy-array/style.css +12 -1
  160. package/dist/components/fy-article/index.js +34 -34
  161. package/dist/components/fy-article/style.css +56 -1
  162. package/dist/components/fy-cascader/index.js +52 -52
  163. package/dist/components/fy-checkbox/index.js +52 -52
  164. package/dist/components/fy-checkbox/style.css +9 -1
  165. package/dist/components/fy-code/index.js +30 -30
  166. package/dist/components/fy-curd/index.js +317 -317
  167. package/dist/components/fy-curd/style.css +236 -1
  168. package/dist/components/fy-date/index.js +45 -45
  169. package/dist/components/fy-date/style.css +15 -1
  170. package/dist/components/fy-dialog-form/index.js +115 -115
  171. package/dist/components/fy-draggable/index.js +120 -120
  172. package/dist/components/fy-draggable/style.css +136 -1
  173. package/dist/components/fy-dynamic/index.js +126 -126
  174. package/dist/components/fy-dynamic/style.css +29 -1
  175. package/dist/components/fy-empty/index.js +26 -26
  176. package/dist/components/fy-empty/style.css +18 -1
  177. package/dist/components/fy-form/index.js +365 -365
  178. package/dist/components/fy-form/style.css +73 -1
  179. package/dist/components/fy-form-design/index.js +6906 -433
  180. package/dist/components/fy-form-design/style.css +560 -1
  181. package/dist/components/fy-form-menu/index.js +45 -45
  182. package/dist/components/fy-input/index.js +61 -61
  183. package/dist/components/fy-input-color/index.js +41 -41
  184. package/dist/components/fy-input-icon/index.js +70 -70
  185. package/dist/components/fy-input-icon/style.css +33 -1
  186. package/dist/components/fy-input-map/index.js +102 -102
  187. package/dist/components/fy-input-map/style.css +44 -1
  188. package/dist/components/fy-input-number/index.js +39 -39
  189. package/dist/components/fy-input-table/index.js +70 -70
  190. package/dist/components/fy-input-table/style.css +4 -1
  191. package/dist/components/fy-input-tree/index.js +105 -105
  192. package/dist/components/fy-input-tree/style.css +19 -1
  193. package/dist/components/fy-progress/index.js +25 -25
  194. package/dist/components/fy-radio/index.js +36 -36
  195. package/dist/components/fy-radio/style.css +6 -1
  196. package/dist/components/fy-rate/index.js +40 -40
  197. package/dist/components/fy-rate/style.css +3 -1
  198. package/dist/components/fy-select/index.js +101 -101
  199. package/dist/components/fy-select/style.css +19 -1
  200. package/dist/components/fy-slider/index.js +42 -42
  201. package/dist/components/fy-switch/index.js +37 -37
  202. package/dist/components/fy-tabs/index.js +35 -35
  203. package/dist/components/fy-time/index.js +47 -47
  204. package/dist/components/fy-title/index.js +23 -23
  205. package/dist/components/fy-title/style.css +5 -1
  206. package/dist/components/fy-tree/index.js +157 -157
  207. package/dist/components/fy-tree/style.css +39 -1
  208. package/dist/components/fy-u-editor/index.js +99 -99
  209. package/dist/components/fy-u-editor/style.css +9 -1
  210. package/dist/components/fy-upload/index.js +270 -270
  211. package/dist/components/fy-upload/style.css +55 -1
  212. package/dist/components/guide-steps/index.js +41 -41
  213. package/dist/components/guide-steps/style.css +28 -1
  214. package/dist/components/header-menu/index.js +94 -94
  215. package/dist/components/header-search/index.js +121 -121
  216. package/dist/components/highlight-j-s/index.js +76 -0
  217. package/dist/components/highlight-j-s/style.css +18 -0
  218. package/dist/components/icon-card/index.js +28 -28
  219. package/dist/components/icon-card/style.css +50 -1
  220. package/dist/components/icon-temp/index.js +24 -24
  221. package/dist/components/icon-temp/style.css +17 -1
  222. package/dist/components/iframe-window/index.js +24 -24
  223. package/dist/components/iframe-window/style.css +14 -1
  224. package/dist/components/image-cropper/index.js +117 -117
  225. package/dist/components/image-cropper/style.css +28 -1
  226. package/dist/components/image-preview/index.js +127 -127
  227. package/dist/components/image-preview/style.css +66 -1
  228. package/dist/components/image-viewer/index.js +35 -35
  229. package/dist/components/image-viewer/style.css +15 -1
  230. package/dist/components/input-number/index.js +116 -116
  231. package/dist/components/input-number/style.css +9 -1
  232. package/dist/components/input-number-range/index.js +37 -37
  233. package/dist/components/input-number-range/style.css +6 -1
  234. package/dist/components/j-s-x-component/index.js +4 -4
  235. package/dist/components/keep-view-alive/index.js +71 -71
  236. package/dist/components/keyboard/index.js +182 -182
  237. package/dist/components/keyboard/style.css +473 -1
  238. package/dist/components/license/index.js +54 -54
  239. package/dist/components/loading-view/index.js +25 -25
  240. package/dist/components/loading-view/style.css +11 -1
  241. package/dist/components/login/index.js +94 -94
  242. package/dist/components/login/style.css +19 -1
  243. package/dist/components/name-avatar/index.js +26 -26
  244. package/dist/components/name-avatar/style.css +30 -1
  245. package/dist/components/nav-bar/index.js +22 -22
  246. package/dist/components/nav-bar/style.css +11 -1
  247. package/dist/components/not-implement/index.js +22 -22
  248. package/dist/components/not-implement/style.css +9 -1
  249. package/dist/components/notice/index.js +55 -55
  250. package/dist/components/notice/style.css +48 -1
  251. package/dist/components/page/index.js +20 -20
  252. package/dist/components/page/style.css +6 -1
  253. package/dist/components/page-header/index.js +28 -28
  254. package/dist/components/page-header/style.css +8 -1
  255. package/dist/components/page-index/index.js +57 -57
  256. package/dist/components/page-index/style.css +17 -1
  257. package/dist/components/page-index-top/index.js +46 -46
  258. package/dist/components/page-skeleton/index.js +28 -28
  259. package/dist/components/page-skeleton/style.css +17 -1
  260. package/dist/components/page-skeleton-new/index.js +38 -38
  261. package/dist/components/page-skeleton-new/style.css +36 -1
  262. package/dist/components/pageable-table/index.js +140 -139
  263. package/dist/components/pageable-table/style.css +66 -1
  264. package/dist/components/pageable-view/index.js +103 -102
  265. package/dist/components/pageable-view/style.css +63 -1
  266. package/dist/components/photo-swipe/index.js +64 -64
  267. package/dist/components/process-designer/index.js +4638 -0
  268. package/dist/components/process-designer/style.css +1648 -0
  269. package/dist/components/properties-panel/index.js +4765 -0
  270. package/dist/components/properties-panel/style.css +106 -0
  271. package/dist/components/queue/index.js +24 -24
  272. package/dist/components/record-video/index.js +55 -55
  273. package/dist/components/record-video/style.css +47 -1
  274. package/dist/components/resize-observer/index.js +26 -26
  275. package/dist/components/resize-observer/style.css +25 -1
  276. package/dist/components/search/index.js +64 -64
  277. package/dist/components/search/style.css +51 -1
  278. package/dist/components/search-popover/index.js +98 -98
  279. package/dist/components/search-popover/style.css +90 -1
  280. package/dist/components/sign/index.js +66 -66
  281. package/dist/components/sign/style.css +6 -1
  282. package/dist/components/sign-panel/index.js +78 -78
  283. package/dist/components/sign-panel/style.css +91 -1
  284. package/dist/components/skeleton/index.js +35 -35
  285. package/dist/components/skeleton/style.css +55 -1
  286. package/dist/components/split-pane/index.js +88 -88
  287. package/dist/components/split-pane/style.css +98 -1
  288. package/dist/components/stateful/index.js +29 -29
  289. package/dist/components/stateful/style.css +27 -1
  290. package/dist/components/static-pageable-table/index.js +30 -30
  291. package/dist/components/static-pageable-table/style.css +3 -1
  292. package/dist/components/swiper/index.js +69 -69
  293. package/dist/components/swiper/style.css +37 -1
  294. package/dist/components/tab/index.js +47 -47
  295. package/dist/components/tab/style.css +108 -1
  296. package/dist/components/tab-item/index.js +29 -29
  297. package/dist/components/table-column/index.js +25 -25
  298. package/dist/components/table-page/index.js +51 -51
  299. package/dist/components/table-view/index.js +123 -122
  300. package/dist/components/table-view/style.css +90 -1
  301. package/dist/components/tag-render/index.js +39 -39
  302. package/dist/components/tag-render/style.css +27 -1
  303. package/dist/components/text-ellipsis/index.js +40 -40
  304. package/dist/components/text-ellipsis/style.css +3 -1
  305. package/dist/components/tinymce-editor/index.js +62 -62
  306. package/dist/components/tinymce-editor/style.css +37 -1
  307. package/dist/components/tinymce-wrapper/index.js +76 -76
  308. package/dist/components/tinymce-wrapper/style.css +30 -1
  309. package/dist/components/toolbar/index.js +51 -51
  310. package/dist/components/toolbar/style.css +35 -1
  311. package/dist/components/toolbar-button/index.js +33 -33
  312. package/dist/components/toolbar-button/style.css +15 -1
  313. package/dist/components/trigger/index.js +27 -27
  314. package/dist/components/verify/index.js +33 -33
  315. package/dist/components/verify/style.css +9 -1
  316. package/dist/components/vue-tags-input/index.js +137 -137
  317. package/dist/components/vue-tags-input/style.css +102 -1
  318. package/dist/components/watermark/index.js +25 -25
  319. package/dist/components/watermark/style.css +10 -1
  320. package/dist/index.css +1797 -0
  321. package/dist/index.es.js +22766 -12431
  322. package/package.json +18 -6
  323. package/web-types.json +307 -1
  324. package/dist/chunks/AfdColumn.vue_vue_type_template_lang.768f2ed2.js +0 -302
  325. package/dist/chunks/ConfigArray.vue_vue_type_template_lang.66483daa.js +0 -51
  326. package/dist/chunks/ConfigColor.vue_vue_type_template_lang.cd880091.js +0 -24
  327. package/dist/chunks/ConfigCustom.vue_vue_type_template_lang.6e03d7fd.js +0 -52
  328. package/dist/chunks/ConfigDate.vue_vue_type_template_lang.116fbad4.js +0 -104
  329. package/dist/chunks/ConfigDynamic.vue_vue_type_template_lang.99082e47.js +0 -133
  330. package/dist/chunks/ConfigEvent.vue_vue_type_template_lang.5e8ed6cc.js +0 -96
  331. package/dist/chunks/ConfigGroup.vue_vue_type_template_lang.44117322.js +0 -48
  332. package/dist/chunks/ConfigInput.vue_vue_type_template_lang.cc1eb052.js +0 -96
  333. package/dist/chunks/ConfigMap.vue_vue_type_template_lang.daee4d38.js +0 -31
  334. package/dist/chunks/ConfigNumber.vue_vue_type_template_lang.d60231d7.js +0 -130
  335. package/dist/chunks/ConfigRate.vue_vue_type_style_index_0_scoped_true_lang.cf5d437d.js +0 -125
  336. package/dist/chunks/ConfigSelect.vue_vue_type_template_lang.dfc91f07.js +0 -488
  337. package/dist/chunks/ConfigSlider.vue_vue_type_template_lang.27b8cc7b.js +0 -99
  338. package/dist/chunks/ConfigSwitch.vue_vue_type_style_index_0_scoped_true_lang.4caf1bd0.js +0 -54
  339. package/dist/chunks/ConfigTable.vue_vue_type_template_lang.b27540fd.js +0 -344
  340. package/dist/chunks/ConfigTextarea.vue_vue_type_template_lang.5cddf41c.js +0 -88
  341. package/dist/chunks/ConfigTitle.vue_vue_type_template_lang.57d9deb5.js +0 -87
  342. package/dist/chunks/ConfigTree.vue_vue_type_style_index_0_scoped_true_lang.89ec5376.js +0 -465
  343. package/dist/chunks/ConfigUEditor.vue_vue_type_template_lang.9726b4f5.js +0 -240
  344. package/dist/chunks/ConfigUpload.vue_vue_type_template_lang.129c0ced.js +0 -476
  345. package/dist/chunks/FormConfig.vue_vue_type_template_lang.82463ce5.js +0 -220
  346. package/dist/chunks/WidgetConfig.vue_vue_type_template_lang.3cc74fe8.js +0 -1821
  347. package/dist/chunks/WidgetForm.vue_vue_type_template_lang.d4b05679.js +0 -247
  348. package/dist/chunks/WidgetFormGroup.vue_vue_type_template_lang.bdcb6d37.js +0 -271
  349. package/dist/chunks/WidgetFormItem.vue_vue_type_template_lang.48d55a5c.js +0 -24
  350. package/dist/chunks/WidgetFormTable.vue_vue_type_template_lang.e2b788ba.js +0 -229
  351. package/dist/chunks/confirmable-mixin.3a79781b.js +0 -75
  352. package/dist/chunks/dataformat.65b92bfe.js +0 -158
  353. package/dist/chunks/detail.d67573b1.js +0 -28
  354. package/dist/chunks/dic.70feb9b4.js +0 -135
  355. package/dist/chunks/init.7c58eb34.js +0 -122
  356. package/dist/chunks/monaco.cefcb9f5.js +0 -290
  357. package/dist/chunks/permission.ce5d2121.js +0 -16
  358. package/dist/chunks/slot.4b391395.js +0 -27
  359. package/dist/chunks/util.23fe58fb.js +0 -261
  360. package/dist/chunks/utils.97652d86.js +0 -26
  361. package/dist/chunks/utils.fa73de78.js +0 -185
  362. package/dist/chunks/vueComponentNormalizer.71e2aa87.js +0 -32
  363. package/dist/components/afd-column/index.js +0 -57
  364. package/dist/components/config-array/index.js +0 -28
  365. package/dist/components/config-color/index.js +0 -28
  366. package/dist/components/config-custom/index.js +0 -62
  367. package/dist/components/config-date/index.js +0 -28
  368. package/dist/components/config-dynamic/index.js +0 -28
  369. package/dist/components/config-event/index.js +0 -74
  370. package/dist/components/config-group/index.js +0 -36
  371. package/dist/components/config-input/index.js +0 -29
  372. package/dist/components/config-map/index.js +0 -28
  373. package/dist/components/config-number/index.js +0 -28
  374. package/dist/components/config-rate/index.js +0 -71
  375. package/dist/components/config-rate/style.css +0 -1
  376. package/dist/components/config-select/index.js +0 -90
  377. package/dist/components/config-slider/index.js +0 -28
  378. package/dist/components/config-switch/index.js +0 -33
  379. package/dist/components/config-switch/style.css +0 -1
  380. package/dist/components/config-table/index.js +0 -122
  381. package/dist/components/config-textarea/index.js +0 -28
  382. package/dist/components/config-title/index.js +0 -33
  383. package/dist/components/config-tree/index.js +0 -122
  384. package/dist/components/config-tree/style.css +0 -1
  385. package/dist/components/config-u-editor/index.js +0 -34
  386. package/dist/components/config-upload/index.js +0 -58
  387. package/dist/components/form-config/index.js +0 -28
  388. package/dist/components/fy-dialog-form/style.css +0 -1
  389. package/dist/components/widget-config/index.js +0 -110
  390. package/dist/components/widget-form/index.js +0 -71
  391. package/dist/components/widget-form-group/index.js +0 -96
  392. package/dist/components/widget-form-item/index.js +0 -71
  393. package/dist/components/widget-form-table/index.js +0 -95
@@ -1,18 +1,318 @@
1
- import { hasOwn as d, addResizeListener as h, removeResizeListener as u, isVerticalScrollbarVisible as x, scrollbarWidth as w, computePosition as N, isPlainObject as r, cloneDeep as p, isFunction as f, isUndefined as l, isNotEmpty as C, fastClone as v, delay as g, findTreeChildren as $ } from "@web-utils/core";
2
- import { a as b, b as _, c } from "../../chunks/utils.fa73de78.js";
3
- import { n as k } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
4
- var B = function() {
5
- var e = this, t = e.$createElement, i = e._self._c || t;
6
- return i("div", {
1
+ import { hasOwn, isVerticalScrollbarVisible, scrollbarWidth, computePosition, isPlainObject, isFunction, isUndefined, isNotEmpty, fastClone, delay, findTreeChildren } from "@web-utils/core";
2
+ import { cloneDeep } from "@web-utils/integrations/lodash";
3
+ 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";
5
+ var MapShim = function() {
6
+ if (typeof Map < "u")
7
+ return Map;
8
+ function getIndex(arr, key) {
9
+ var result = -1;
10
+ return arr.some(function(entry, index2) {
11
+ return entry[0] === key ? (result = index2, !0) : !1;
12
+ }), result;
13
+ }
14
+ return (
15
+ /** @class */
16
+ function() {
17
+ function class_1() {
18
+ this.__entries__ = [];
19
+ }
20
+ return Object.defineProperty(class_1.prototype, "size", {
21
+ /**
22
+ * @returns {boolean}
23
+ */
24
+ get: function() {
25
+ return this.__entries__.length;
26
+ },
27
+ enumerable: !0,
28
+ configurable: !0
29
+ }), class_1.prototype.get = function(key) {
30
+ var index2 = getIndex(this.__entries__, key), entry = this.__entries__[index2];
31
+ return entry && entry[1];
32
+ }, class_1.prototype.set = function(key, value) {
33
+ var index2 = getIndex(this.__entries__, key);
34
+ ~index2 ? this.__entries__[index2][1] = value : this.__entries__.push([key, value]);
35
+ }, class_1.prototype.delete = function(key) {
36
+ var entries = this.__entries__, index2 = getIndex(entries, key);
37
+ ~index2 && entries.splice(index2, 1);
38
+ }, class_1.prototype.has = function(key) {
39
+ return !!~getIndex(this.__entries__, key);
40
+ }, class_1.prototype.clear = function() {
41
+ this.__entries__.splice(0);
42
+ }, class_1.prototype.forEach = function(callback, ctx) {
43
+ ctx === void 0 && (ctx = null);
44
+ for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
45
+ var entry = _a[_i];
46
+ callback.call(ctx, entry[1], entry[0]);
47
+ }
48
+ }, class_1;
49
+ }()
50
+ );
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")();
53
+ }(), requestAnimationFrame$1 = function() {
54
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(global$1) : function(callback) {
55
+ return setTimeout(function() {
56
+ return callback(Date.now());
57
+ }, 1e3 / 60);
58
+ };
59
+ }(), trailingTimeout = 2;
60
+ function throttle(callback, delay2) {
61
+ var leadingCall = !1, trailingCall = !1, lastCallTime = 0;
62
+ function resolvePending() {
63
+ leadingCall && (leadingCall = !1, callback()), trailingCall && proxy();
64
+ }
65
+ function timeoutCallback() {
66
+ requestAnimationFrame$1(resolvePending);
67
+ }
68
+ function proxy() {
69
+ var timeStamp = Date.now();
70
+ if (leadingCall) {
71
+ if (timeStamp - lastCallTime < trailingTimeout)
72
+ return;
73
+ trailingCall = !0;
74
+ } else
75
+ leadingCall = !0, trailingCall = !1, setTimeout(timeoutCallback, delay2);
76
+ lastCallTime = timeStamp;
77
+ }
78
+ return proxy;
79
+ }
80
+ var REFRESH_DELAY = 20, transitionKeys = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], mutationObserverSupported = typeof MutationObserver < "u", ResizeObserverController = (
81
+ /** @class */
82
+ function() {
83
+ function ResizeObserverController2() {
84
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
85
+ }
86
+ return ResizeObserverController2.prototype.addObserver = function(observer) {
87
+ ~this.observers_.indexOf(observer) || this.observers_.push(observer), this.connected_ || this.connect_();
88
+ }, ResizeObserverController2.prototype.removeObserver = function(observer) {
89
+ var observers2 = this.observers_, index2 = observers2.indexOf(observer);
90
+ ~index2 && observers2.splice(index2, 1), !observers2.length && this.connected_ && this.disconnect_();
91
+ }, ResizeObserverController2.prototype.refresh = function() {
92
+ var changesDetected = this.updateObservers_();
93
+ changesDetected && this.refresh();
94
+ }, ResizeObserverController2.prototype.updateObservers_ = function() {
95
+ var activeObservers = this.observers_.filter(function(observer) {
96
+ return observer.gatherActive(), observer.hasActive();
97
+ });
98
+ return activeObservers.forEach(function(observer) {
99
+ return observer.broadcastActive();
100
+ }), activeObservers.length > 0;
101
+ }, ResizeObserverController2.prototype.connect_ = function() {
102
+ !isBrowser || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), mutationObserverSupported ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
103
+ attributes: !0,
104
+ childList: !0,
105
+ characterData: !0,
106
+ subtree: !0
107
+ })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
108
+ }, ResizeObserverController2.prototype.disconnect_ = function() {
109
+ !isBrowser || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
110
+ }, ResizeObserverController2.prototype.onTransitionEnd_ = function(_a) {
111
+ var _b = _a.propertyName, propertyName = _b === void 0 ? "" : _b, isReflowProperty = transitionKeys.some(function(key) {
112
+ return !!~propertyName.indexOf(key);
113
+ });
114
+ isReflowProperty && this.refresh();
115
+ }, ResizeObserverController2.getInstance = function() {
116
+ return this.instance_ || (this.instance_ = new ResizeObserverController2()), this.instance_;
117
+ }, ResizeObserverController2.instance_ = null, ResizeObserverController2;
118
+ }()
119
+ ), defineConfigurable = function(target, props) {
120
+ for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
121
+ var key = _a[_i];
122
+ Object.defineProperty(target, key, {
123
+ value: props[key],
124
+ enumerable: !1,
125
+ writable: !1,
126
+ configurable: !0
127
+ });
128
+ }
129
+ return target;
130
+ }, getWindowOf = function(target) {
131
+ var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
132
+ return ownerGlobal || global$1;
133
+ }, emptyRect = createRectInit(0, 0, 0, 0);
134
+ function toFloat(value) {
135
+ return parseFloat(value) || 0;
136
+ }
137
+ function getBordersSize(styles) {
138
+ for (var positions = [], _i = 1; _i < arguments.length; _i++)
139
+ positions[_i - 1] = arguments[_i];
140
+ return positions.reduce(function(size, position) {
141
+ var value = styles["border-" + position + "-width"];
142
+ return size + toFloat(value);
143
+ }, 0);
144
+ }
145
+ function getPaddings(styles) {
146
+ for (var positions = ["top", "right", "bottom", "left"], paddings = {}, _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
147
+ var position = positions_1[_i], value = styles["padding-" + position];
148
+ paddings[position] = toFloat(value);
149
+ }
150
+ return paddings;
151
+ }
152
+ function getSVGContentRect(target) {
153
+ var bbox = target.getBBox();
154
+ return createRectInit(0, 0, bbox.width, bbox.height);
155
+ }
156
+ function getHTMLElementContentRect(target) {
157
+ var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
158
+ if (!clientWidth && !clientHeight)
159
+ return emptyRect;
160
+ var styles = getWindowOf(target).getComputedStyle(target), paddings = getPaddings(styles), horizPad = paddings.left + paddings.right, vertPad = paddings.top + paddings.bottom, width = toFloat(styles.width), height = toFloat(styles.height);
161
+ if (styles.boxSizing === "border-box" && (Math.round(width + horizPad) !== clientWidth && (width -= getBordersSize(styles, "left", "right") + horizPad), Math.round(height + vertPad) !== clientHeight && (height -= getBordersSize(styles, "top", "bottom") + vertPad)), !isDocumentElement(target)) {
162
+ var vertScrollbar = Math.round(width + horizPad) - clientWidth, horizScrollbar = Math.round(height + vertPad) - clientHeight;
163
+ Math.abs(vertScrollbar) !== 1 && (width -= vertScrollbar), Math.abs(horizScrollbar) !== 1 && (height -= horizScrollbar);
164
+ }
165
+ return createRectInit(paddings.left, paddings.top, width, height);
166
+ }
167
+ var isSVGGraphicsElement = function() {
168
+ return typeof SVGGraphicsElement < "u" ? function(target) {
169
+ return target instanceof getWindowOf(target).SVGGraphicsElement;
170
+ } : function(target) {
171
+ return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox == "function";
172
+ };
173
+ }();
174
+ function isDocumentElement(target) {
175
+ return target === getWindowOf(target).document.documentElement;
176
+ }
177
+ function getContentRect(target) {
178
+ return isBrowser ? isSVGGraphicsElement(target) ? getSVGContentRect(target) : getHTMLElementContentRect(target) : emptyRect;
179
+ }
180
+ 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);
182
+ return defineConfigurable(rect, {
183
+ x,
184
+ y,
185
+ width,
186
+ height,
187
+ top: y,
188
+ right: x + width,
189
+ bottom: height + y,
190
+ left: x
191
+ }), rect;
192
+ }
193
+ function createRectInit(x, y, width, height) {
194
+ return { x, y, width, height };
195
+ }
196
+ var ResizeObservation = (
197
+ /** @class */
198
+ function() {
199
+ function ResizeObservation2(target) {
200
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = createRectInit(0, 0, 0, 0), this.target = target;
201
+ }
202
+ return ResizeObservation2.prototype.isActive = function() {
203
+ var rect = getContentRect(this.target);
204
+ return this.contentRect_ = rect, rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;
205
+ }, ResizeObservation2.prototype.broadcastRect = function() {
206
+ var rect = this.contentRect_;
207
+ return this.broadcastWidth = rect.width, this.broadcastHeight = rect.height, rect;
208
+ }, ResizeObservation2;
209
+ }()
210
+ ), ResizeObserverEntry = (
211
+ /** @class */
212
+ function() {
213
+ function ResizeObserverEntry2(target, rectInit) {
214
+ var contentRect = createReadOnlyRect(rectInit);
215
+ defineConfigurable(this, { target, contentRect });
216
+ }
217
+ return ResizeObserverEntry2;
218
+ }()
219
+ ), ResizeObserverSPI = (
220
+ /** @class */
221
+ function() {
222
+ function ResizeObserverSPI2(callback, controller, callbackCtx) {
223
+ if (this.activeObservations_ = [], this.observations_ = new MapShim(), typeof callback != "function")
224
+ throw new TypeError("The callback provided as parameter 1 is not a function.");
225
+ this.callback_ = callback, this.controller_ = controller, this.callbackCtx_ = callbackCtx;
226
+ }
227
+ return ResizeObserverSPI2.prototype.observe = function(target) {
228
+ if (!arguments.length)
229
+ throw new TypeError("1 argument required, but only 0 present.");
230
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
231
+ if (!(target instanceof getWindowOf(target).Element))
232
+ throw new TypeError('parameter 1 is not of type "Element".');
233
+ var observations = this.observations_;
234
+ observations.has(target) || (observations.set(target, new ResizeObservation(target)), this.controller_.addObserver(this), this.controller_.refresh());
235
+ }
236
+ }, ResizeObserverSPI2.prototype.unobserve = function(target) {
237
+ if (!arguments.length)
238
+ throw new TypeError("1 argument required, but only 0 present.");
239
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
240
+ if (!(target instanceof getWindowOf(target).Element))
241
+ throw new TypeError('parameter 1 is not of type "Element".');
242
+ var observations = this.observations_;
243
+ observations.has(target) && (observations.delete(target), observations.size || this.controller_.removeObserver(this));
244
+ }
245
+ }, ResizeObserverSPI2.prototype.disconnect = function() {
246
+ this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
247
+ }, ResizeObserverSPI2.prototype.gatherActive = function() {
248
+ var _this = this;
249
+ this.clearActive(), this.observations_.forEach(function(observation) {
250
+ observation.isActive() && _this.activeObservations_.push(observation);
251
+ });
252
+ }, ResizeObserverSPI2.prototype.broadcastActive = function() {
253
+ if (this.hasActive()) {
254
+ var ctx = this.callbackCtx_, entries = this.activeObservations_.map(function(observation) {
255
+ return new ResizeObserverEntry(observation.target, observation.broadcastRect());
256
+ });
257
+ this.callback_.call(ctx, entries, ctx), this.clearActive();
258
+ }
259
+ }, ResizeObserverSPI2.prototype.clearActive = function() {
260
+ this.activeObservations_.splice(0);
261
+ }, ResizeObserverSPI2.prototype.hasActive = function() {
262
+ return this.activeObservations_.length > 0;
263
+ }, ResizeObserverSPI2;
264
+ }()
265
+ ), observers = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new MapShim(), ResizeObserver = (
266
+ /** @class */
267
+ function() {
268
+ function ResizeObserver2(callback) {
269
+ if (!(this instanceof ResizeObserver2))
270
+ throw new TypeError("Cannot call a class as a function.");
271
+ if (!arguments.length)
272
+ throw new TypeError("1 argument required, but only 0 present.");
273
+ var controller = ResizeObserverController.getInstance(), observer = new ResizeObserverSPI(callback, controller, this);
274
+ observers.set(this, observer);
275
+ }
276
+ return ResizeObserver2;
277
+ }()
278
+ );
279
+ [
280
+ "observe",
281
+ "unobserve",
282
+ "disconnect"
283
+ ].forEach(function(method) {
284
+ ResizeObserver.prototype[method] = function() {
285
+ var _a;
286
+ return (_a = observers.get(this))[method].apply(_a, arguments);
287
+ };
288
+ });
289
+ var index = function() {
290
+ return typeof global$1.ResizeObserver < "u" ? global$1.ResizeObserver : ResizeObserver;
291
+ }();
292
+ const isServer = typeof window > "u", resizeHandler = (entries) => {
293
+ for (const entry of entries) {
294
+ const listeners = entry.target.__resizeListeners__ || [];
295
+ listeners.length && listeners.forEach((fn) => {
296
+ fn();
297
+ });
298
+ }
299
+ }, addResizeListener = (element, fn) => {
300
+ isServer || (element.__resizeListeners__ || (element.__resizeListeners__ = [], element.__ro__ = new index(resizeHandler), element.__ro__.observe(element)), element.__resizeListeners__.push(fn));
301
+ }, removeResizeListener = (element, fn) => {
302
+ !element || !element.__resizeListeners__ || (element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1), element.__resizeListeners__.length || element.__ro__.disconnect());
303
+ };
304
+ var render = function() {
305
+ var _vm = this, _h = _vm.$createElement, _c = _vm._self._c || _h;
306
+ return _c("div", {
7
307
  staticClass: "editable-tree"
8
- }, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? i("ElButton", {
308
+ }, [!_vm.readonly && _vm.addRootNodeButtonStyle === "top-right" ? _c("ElButton", {
9
309
  staticStyle: {
10
310
  position: "absolute",
11
311
  top: "4px",
12
312
  "z-index": "1"
13
313
  },
14
314
  style: {
15
- right: `${e.right}px`
315
+ right: `${_vm.right}px`
16
316
  },
17
317
  attrs: {
18
318
  type: "primary",
@@ -22,95 +322,95 @@ var B = function() {
22
322
  plain: ""
23
323
  },
24
324
  on: {
25
- click: function(a) {
26
- return a.stopPropagation(), e.$emit("add-root-node");
325
+ click: function($event) {
326
+ return $event.stopPropagation(), _vm.$emit("add-root-node");
27
327
  }
28
328
  }
29
- }) : e._e(), i("div", {
329
+ }) : _vm._e(), _c("div", {
30
330
  ref: "treeWrapper",
31
331
  staticClass: "et-tree-wrapper"
32
- }, [!e.readonly && e.addRootNodeButtonStyle === "top" ? i("div", {
332
+ }, [!_vm.readonly && _vm.addRootNodeButtonStyle === "top" ? _c("div", {
33
333
  staticStyle: {
34
334
  "padding-left": "24px"
35
335
  }
36
- }, [i("ElButton", {
336
+ }, [_c("ElButton", {
37
337
  attrs: {
38
- disabled: e.loading,
338
+ disabled: _vm.loading,
39
339
  size: "mini",
40
340
  type: "text"
41
341
  },
42
342
  on: {
43
- click: e.appendRootNode
343
+ click: _vm.appendRootNode
44
344
  }
45
- }, [i("i", {
345
+ }, [_c("i", {
46
346
  staticClass: "el-icon-lx-add"
47
- }), e._v(" " + e._s(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`) + " ")])], 1) : e._e(), i("ElTree", e._g(e._b({
48
- key: e.treeKey,
347
+ }), _vm._v(" " + _vm._s(_vm.addRootNodeLabel ? _vm.addRootNodeLabel : `添加${_vm.label}`) + " ")])], 1) : _vm._e(), _c("ElTree", _vm._g(_vm._b({
348
+ key: _vm.treeKey,
49
349
  ref: "tree",
50
350
  staticClass: "flex-item",
51
351
  attrs: {
52
- "default-expanded-keys": e.expandedKeys,
352
+ "default-expanded-keys": _vm.expandedKeys,
53
353
  "expand-on-click-node": !1,
54
354
  "highlight-current": "",
55
- load: e.loadNode,
56
- data: e.innerTreeData,
57
- props: e.treeProps,
58
- lazy: e.lazy,
59
- "node-key": e.nodeKey
355
+ load: _vm.loadNode,
356
+ data: _vm.innerTreeData,
357
+ props: _vm.treeProps,
358
+ lazy: _vm.lazy,
359
+ "node-key": _vm.nodeKey
60
360
  },
61
361
  on: {
62
- "node-click": e.nodeClick,
63
- "node-contextmenu": e.showContextMenu,
64
- "node-expand": e.addExpandKey,
65
- "node-collapse": e.removeExpandKey
362
+ "node-click": _vm.nodeClick,
363
+ "node-contextmenu": _vm.showContextMenu,
364
+ "node-expand": _vm.addExpandKey,
365
+ "node-collapse": _vm.removeExpandKey
66
366
  },
67
- scopedSlots: e._u([{
367
+ scopedSlots: _vm._u([{
68
368
  key: "default",
69
- fn: function(a) {
70
- var o = a.node, s = a.data;
71
- return [e._t("default", function() {
72
- return [s.edit ? [i("span", {
369
+ fn: function(_ref) {
370
+ var node = _ref.node, data = _ref.data;
371
+ return [_vm._t("default", function() {
372
+ return [data.edit ? [_c("span", {
73
373
  staticClass: "custom-tree-node flex-row flex-item oh",
74
374
  attrs: {
75
- "data-id": s.id
375
+ "data-id": data.id
76
376
  }
77
- }, [e.icon ? i("i", {
377
+ }, [_vm.icon ? _c("i", {
78
378
  staticClass: "node-icon shrink-0",
79
- class: s.loading ? "el-icon-loading" : "el-icon-edit-outline"
80
- }) : e._e(), i("ElInput", {
379
+ class: data.loading ? "el-icon-loading" : "el-icon-edit-outline"
380
+ }) : _vm._e(), _c("ElInput", {
81
381
  ref: "labelTxt",
82
382
  staticClass: "node-input flex-item",
83
383
  attrs: {
84
384
  size: "mini",
85
- placeholder: e.defaultOptions.inputPlaceholder
385
+ placeholder: _vm.defaultOptions.inputPlaceholder
86
386
  },
87
387
  on: {
88
- blur: function(n) {
89
- return e.inputBlur(n, o, s);
388
+ blur: function(event) {
389
+ return _vm.inputBlur(event, node, data);
90
390
  }
91
391
  },
92
392
  nativeOn: {
93
- keyup: function(n) {
94
- return function(y) {
95
- return e.inputKeyup(y, o, s);
393
+ keyup: function($event) {
394
+ return function(event) {
395
+ return _vm.inputKeyup(event, node, data);
96
396
  }.apply(null, arguments);
97
397
  },
98
- click: function(n) {
99
- n.stopPropagation();
398
+ click: function($event) {
399
+ $event.stopPropagation();
100
400
  }
101
401
  },
102
402
  model: {
103
- value: e.text,
104
- callback: function(n) {
105
- e.text = n;
403
+ value: _vm.text,
404
+ callback: function($$v) {
405
+ _vm.text = $$v;
106
406
  },
107
407
  expression: "text"
108
408
  }
109
- }), e.confirmButton ? [i("ElButton", {
409
+ }), _vm.confirmButton ? [_c("ElButton", {
110
410
  directives: [{
111
411
  name: "show",
112
412
  rawName: "v-show",
113
- value: !s.loading,
413
+ value: !data.loading,
114
414
  expression: "!data.loading"
115
415
  }],
116
416
  staticClass: "shrink-0",
@@ -119,15 +419,15 @@ var B = function() {
119
419
  type: "text"
120
420
  },
121
421
  on: {
122
- click: function(n) {
123
- return n.stopPropagation(), e.onConfirm(o, s);
422
+ click: function($event) {
423
+ return $event.stopPropagation(), _vm.onConfirm(node, data);
124
424
  }
125
425
  }
126
- }, [e._v("确定")]), i("ElButton", {
426
+ }, [_vm._v("确定")]), _c("ElButton", {
127
427
  directives: [{
128
428
  name: "show",
129
429
  rawName: "v-show",
130
- value: !s.loading,
430
+ value: !data.loading,
131
431
  expression: "!data.loading"
132
432
  }],
133
433
  staticClass: "shrink-0",
@@ -136,85 +436,85 @@ var B = function() {
136
436
  type: "text"
137
437
  },
138
438
  on: {
139
- click: function(n) {
140
- return n.stopPropagation(), e.onCancel(o, s);
439
+ click: function($event) {
440
+ return $event.stopPropagation(), _vm.onCancel(node, data);
141
441
  }
142
442
  }
143
- }, [e._v("取消")])] : e._e()], 2)] : [i("span", {
443
+ }, [_vm._v("取消")])] : _vm._e()], 2)] : [_c("span", {
144
444
  staticClass: "custom-tree-node",
145
445
  attrs: {
146
- "data-id": s.id
446
+ "data-id": data.id
147
447
  }
148
- }, [i("span", {
448
+ }, [_c("span", {
149
449
  staticClass: "node-label flex-row flex-item oh ellipsis-1"
150
- }, [e.icon ? i("i", {
450
+ }, [_vm.icon ? _c("i", {
151
451
  staticClass: "node-icon",
152
- class: s.loading ? "el-icon-loading" : e.icon(s, o)
153
- }) : e._e(), i("span", {
452
+ class: data.loading ? "el-icon-loading" : _vm.icon(data, node)
453
+ }) : _vm._e(), _c("span", {
154
454
  staticClass: "flex-item-relative",
155
455
  staticStyle: {
156
456
  height: "21px"
157
457
  }
158
- }, [i("span", {
458
+ }, [_c("span", {
159
459
  staticClass: "ellipsis-1 absolute-box et-tree-label",
160
460
  attrs: {
161
- title: o.label
461
+ title: node.label
162
462
  }
163
- }, [e._t("label", function() {
164
- return [e._v(e._s(o.label))];
463
+ }, [_vm._t("label", function() {
464
+ return [_vm._v(_vm._s(node.label))];
165
465
  }, {
166
- data: s,
167
- node: o
168
- })], 2)]), e._t("label-suffix", null, {
169
- node: o,
170
- data: s
171
- })], 2), !e.contextMenu && !e.readonly ? i("span", {
466
+ data,
467
+ node
468
+ })], 2)]), _vm._t("label-suffix", null, {
469
+ node,
470
+ data
471
+ })], 2), !_vm.contextMenu && !_vm.readonly ? _c("span", {
172
472
  directives: [{
173
473
  name: "show",
174
474
  rawName: "v-show",
175
- value: !s.loading && !e.loading,
475
+ value: !data.loading && !_vm.loading,
176
476
  expression: "!data.loading && !loading"
177
477
  }],
178
478
  staticClass: "handle-actions"
179
- }, [i("ElButton", {
479
+ }, [_c("ElButton", {
180
480
  attrs: {
181
481
  size: "mini",
182
482
  type: "text"
183
483
  },
184
484
  on: {
185
- click: function(n) {
186
- return n.stopPropagation(), e.appendChildNode(o, s);
485
+ click: function($event) {
486
+ return $event.stopPropagation(), _vm.appendChildNode(node, data);
187
487
  }
188
488
  }
189
- }, [e._v("添加")]), i("ElButton", {
489
+ }, [_vm._v("添加")]), _c("ElButton", {
190
490
  attrs: {
191
491
  size: "mini",
192
492
  type: "text"
193
493
  },
194
494
  on: {
195
- click: function(n) {
196
- return n.stopPropagation(), e.editNode(o, s);
495
+ click: function($event) {
496
+ return $event.stopPropagation(), _vm.editNode(node, data);
197
497
  }
198
498
  }
199
- }, [e._v("修改")]), i("ElPopconfirm", {
499
+ }, [_vm._v("修改")]), _c("ElPopconfirm", {
200
500
  staticClass: "pop-confirm",
201
501
  attrs: {
202
502
  "icon-color": "red",
203
503
  title: "你确定要删除吗?"
204
504
  },
205
505
  on: {
206
- confirm: function(n) {
207
- return e.removeNode(o, s);
506
+ confirm: function($event) {
507
+ return _vm.removeNode(node, data);
208
508
  }
209
509
  },
210
- scopedSlots: e._u([{
510
+ scopedSlots: _vm._u([{
211
511
  key: "reference",
212
512
  fn: function() {
213
- return [i("ElButton", {
513
+ return [_c("ElButton", {
214
514
  directives: [{
215
515
  name: "show",
216
516
  rawName: "v-show",
217
- value: o.isLeaf,
517
+ value: node.isLeaf,
218
518
  expression: "node.isLeaf"
219
519
  }],
220
520
  staticStyle: {
@@ -225,26 +525,26 @@ var B = function() {
225
525
  type: "text"
226
526
  },
227
527
  on: {
228
- click: function(n) {
229
- n.stopPropagation();
528
+ click: function($event) {
529
+ $event.stopPropagation();
230
530
  }
231
531
  }
232
- }, [e._v("删除")])];
532
+ }, [_vm._v("删除")])];
233
533
  },
234
534
  proxy: !0
235
535
  }], null, !0)
236
- })], 1) : e._e(), e.contextMenuIcon && e.contextMenu && !e.readonly ? i("span", {
536
+ })], 1) : _vm._e(), _vm.contextMenuIcon && _vm.contextMenu && !_vm.readonly ? _c("span", {
237
537
  directives: [{
238
538
  name: "show",
239
539
  rawName: "v-show",
240
- value: !s.loading && !e.loading,
540
+ value: !data.loading && !_vm.loading,
241
541
  expression: "!data.loading && !loading"
242
542
  }],
243
543
  staticClass: "handle-actions",
244
544
  staticStyle: {
245
545
  display: "inline-block"
246
546
  }
247
- }, [i("ElButton", {
547
+ }, [_c("ElButton", {
248
548
  staticStyle: {
249
549
  padding: "6px 10px 0"
250
550
  },
@@ -253,103 +553,103 @@ var B = function() {
253
553
  type: "text"
254
554
  },
255
555
  on: {
256
- click: function(n) {
257
- return n.stopPropagation(), e.showContextMenu(n, s, o);
556
+ click: function($event) {
557
+ return $event.stopPropagation(), _vm.showContextMenu($event, data, node);
258
558
  }
259
559
  }
260
- }, [e._v(". . .")])], 1) : e._e()])]];
560
+ }, [_vm._v(". . .")])], 1) : _vm._e()])]];
261
561
  }, {
262
- node: o,
263
- data: s
562
+ node,
563
+ data
264
564
  })];
265
565
  }
266
566
  }], null, !0)
267
- }, "ElTree", e.filterTreeProperties(e.$attrs), !1), e.filterTreeEvents(e.$listeners))), e.contextMenu && !e.readonly ? i("div", {
567
+ }, "ElTree", _vm.filterTreeProperties(_vm.$attrs), !1), _vm.filterTreeEvents(_vm.$listeners))), _vm.contextMenu && !_vm.readonly ? _c("div", {
268
568
  directives: [{
269
569
  name: "show",
270
570
  rawName: "v-show",
271
- value: e.showMenu,
571
+ value: _vm.showMenu,
272
572
  expression: "showMenu"
273
573
  }],
274
574
  ref: "contextMenu",
275
575
  staticClass: "menu",
276
- style: e.position
277
- }, [i("ul", {
576
+ style: _vm.position
577
+ }, [_c("ul", {
278
578
  staticClass: "menu-list"
279
- }, [e._t("context-menu", function() {
280
- return [i("li", {
579
+ }, [_vm._t("context-menu", function() {
580
+ return [_c("li", {
281
581
  directives: [{
282
582
  name: "show",
283
583
  rawName: "v-show",
284
- value: e.curData.id > -1,
584
+ value: _vm.curData.id > -1,
285
585
  expression: "curData.id > -1"
286
586
  }],
287
587
  staticClass: "menu-item",
288
588
  on: {
289
- click: function(a) {
290
- return e.appendPeerNode(e.curNode, e.curData);
589
+ click: function($event) {
590
+ return _vm.appendPeerNode(_vm.curNode, _vm.curData);
291
591
  }
292
592
  }
293
- }, [i("i", {
593
+ }, [_c("i", {
294
594
  staticClass: "menu-item-icon el-icon-lx-add",
295
595
  staticStyle: {
296
596
  color: "#228b22"
297
597
  }
298
- }), e._v(e._s(e.menuLabel.appendPeer) + " ")]), i("li", {
598
+ }), _vm._v(_vm._s(_vm.menuLabel.appendPeer) + " ")]), _c("li", {
299
599
  staticClass: "menu-item",
300
600
  on: {
301
- click: function(a) {
302
- return e.appendChildNode(e.curNode, e.curData);
601
+ click: function($event) {
602
+ return _vm.appendChildNode(_vm.curNode, _vm.curData);
303
603
  }
304
604
  }
305
- }, [i("i", {
605
+ }, [_c("i", {
306
606
  staticClass: "menu-item-icon el-icon-lx-add",
307
607
  staticStyle: {
308
608
  color: "#228b22"
309
609
  }
310
- }), e._v(e._s(e.menuLabel.appendChild) + " ")]), i("li", {
610
+ }), _vm._v(_vm._s(_vm.menuLabel.appendChild) + " ")]), _c("li", {
311
611
  directives: [{
312
612
  name: "show",
313
613
  rawName: "v-show",
314
- value: e.curData.id > -1,
614
+ value: _vm.curData.id > -1,
315
615
  expression: "curData.id > -1"
316
616
  }],
317
617
  staticClass: "menu-item",
318
618
  on: {
319
- click: function(a) {
320
- return e.editNode(e.curNode, e.curData);
619
+ click: function($event) {
620
+ return _vm.editNode(_vm.curNode, _vm.curData);
321
621
  }
322
622
  }
323
- }, [i("i", {
623
+ }, [_c("i", {
324
624
  staticClass: "menu-item-icon el-icon-edit-outline",
325
625
  staticStyle: {
326
626
  color: "#ffa500"
327
627
  }
328
- }), e._v(e._s(e.menuLabel.editNode) + " ")]), i("li", {
628
+ }), _vm._v(_vm._s(_vm.menuLabel.editNode) + " ")]), _c("li", {
329
629
  directives: [{
330
630
  name: "show",
331
631
  rawName: "v-show",
332
- value: e.curNode.isLeaf,
632
+ value: _vm.curNode.isLeaf,
333
633
  expression: "curNode.isLeaf"
334
634
  }],
335
635
  staticClass: "menu-item",
336
636
  on: {
337
- click: function(a) {
338
- return e.removeNodeModal(e.curNode, e.curData);
637
+ click: function($event) {
638
+ return _vm.removeNodeModal(_vm.curNode, _vm.curData);
339
639
  }
340
640
  }
341
- }, [i("i", {
641
+ }, [_c("i", {
342
642
  staticClass: "menu-item-icon el-icon-delete",
343
643
  staticStyle: {
344
644
  color: "#f00"
345
645
  }
346
- }), e._v(e._s(e.menuLabel.removeNode) + " ")])];
646
+ }), _vm._v(_vm._s(_vm.menuLabel.removeNode) + " ")])];
347
647
  }, {
348
- curNode: e.curNode,
349
- curData: e.curData
350
- })], 2)]) : e._e()], 1)], 1);
351
- }, T = [];
352
- const M = {
648
+ curNode: _vm.curNode,
649
+ curData: _vm.curData
650
+ })], 2)]) : _vm._e()], 1)], 1);
651
+ }, staticRenderFns = [];
652
+ const __vue2_script = {
353
653
  name: "EditableTree",
354
654
  props: {
355
655
  label: {
@@ -365,9 +665,9 @@ const M = {
365
665
  },
366
666
  newNodeBuilder: {
367
667
  type: Function,
368
- default: (e, t) => ({
369
- name: e,
370
- parentId: t.id
668
+ default: (name, parent) => ({
669
+ name,
670
+ parentId: parent.id
371
671
  })
372
672
  },
373
673
  contextMenu: Boolean,
@@ -408,7 +708,7 @@ const M = {
408
708
  default: () => ({
409
709
  children: "children",
410
710
  label: "name",
411
- isLeaf: (e) => d(e, "hasChildren") ? !e.hasChildren : d(e, "hasChild") ? !e.hasChild : d(e, "children") && e.children ? e.children.length === 0 : !0
711
+ isLeaf: (data) => hasOwn(data, "hasChildren") ? !data.hasChildren : hasOwn(data, "hasChild") ? !data.hasChild : hasOwn(data, "children") && data.children ? data.children.length === 0 : !0
412
712
  })
413
713
  },
414
714
  menuLabel: {
@@ -462,19 +762,19 @@ const M = {
462
762
  modal: !0,
463
763
  inputErrorMessage: `${this.label}名不能为空!`,
464
764
  inputPlaceholder: `请输入${this.label}名...`,
465
- inputValidator: (e) => e != null && e.trim().length > 0
765
+ inputValidator: (value) => value != null && value.trim().length > 0
466
766
  };
467
767
  },
468
768
  innerTreeData() {
469
- var e;
470
- return (e = this.$attrs.data) != null && e.length ? this.$attrs.data : this.treeData;
769
+ var _a;
770
+ return (_a = this.$attrs.data) != null && _a.length ? this.$attrs.data : this.treeData;
471
771
  }
472
772
  },
473
773
  watch: {
474
774
  defaultExpandedKeys: {
475
775
  immediate: !0,
476
- handler(e) {
477
- this.expandedKeys = [...e];
776
+ handler(newVal) {
777
+ this.expandedKeys = [...newVal];
478
778
  }
479
779
  }
480
780
  },
@@ -482,61 +782,61 @@ const M = {
482
782
  this.tryFetch();
483
783
  },
484
784
  mounted() {
485
- h(this.$refs.tree.$el, this.resize), h(this.$refs.treeWrapper, this.resize);
785
+ addResizeListener(this.$refs.tree.$el, this.resize), addResizeListener(this.$refs.treeWrapper, this.resize);
486
786
  },
487
787
  beforeDestroy() {
488
- u(this.$refs.tree.$el, this.resize), u(this.$refs.treeWrapper, this.resize);
788
+ removeResizeListener(this.$refs.tree.$el, this.resize), removeResizeListener(this.$refs.treeWrapper, this.resize);
489
789
  },
490
790
  methods: {
491
- filterTreeProperties: b,
492
- filterTreeEvents: _,
493
- addExpandKey(e) {
494
- this.reserveExpandKey && this.expandedKeys.push(e[this.nodeKey]);
791
+ filterTreeProperties,
792
+ filterTreeEvents,
793
+ addExpandKey(data) {
794
+ this.reserveExpandKey && this.expandedKeys.push(data[this.nodeKey]);
495
795
  },
496
- removeExpandKey(e) {
497
- this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((t) => t !== e[this.nodeKey]));
796
+ removeExpandKey(data) {
797
+ this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((key) => key !== data[this.nodeKey]));
498
798
  },
499
799
  resize() {
500
- x(this.$refs.treeWrapper) ? this.right = 4 + w : this.right = 4;
800
+ isVerticalScrollbarVisible(this.$refs.treeWrapper) ? this.right = 4 + scrollbarWidth : this.right = 4;
501
801
  },
502
- async showContextMenu(e, t, i) {
503
- 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), await this.$nextTick(), this.position = N(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
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));
504
804
  },
505
805
  hideContextMenu() {
506
806
  this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
507
807
  },
508
808
  async tryFetch() {
509
- var e;
809
+ var _a;
510
810
  if (this.lazy === !1 && this.fetchApi) {
511
- const t = await this.fetchApi(((e = this.rootNode) == null ? void 0 : e.id) ?? -1, {});
512
- if (r(t.data) && (t.data = [t.data]), t.data = t.data || [], this.empty = t.data.length === 0, r(this.customRootNode)) {
513
- const i = p(this.customRootNode);
514
- i[this.treeProps.children || "children"] = t.data, this.treeData = [i];
515
- } else if (f(this.customRootNode)) {
516
- const i = this.customRootNode(t.data);
517
- i[this.treeProps.children || "children"] = t.data, this.treeData = r(i) ? [i] : i;
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;
518
818
  } else
519
- this.treeData = t.data;
819
+ this.treeData = res.data;
520
820
  }
521
821
  },
522
- async loadNode(e, t) {
523
- var i, a, o;
524
- if (e.level === 0) {
525
- const s = await this.fetchApi(((i = this.rootNode) == null ? void 0 : i.id) ?? -1, e);
526
- if (this.empty = s.data.length === 0, r(this.customRootNode)) {
527
- const n = p(this.customRootNode);
528
- n[this.treeProps.children || "children"] = s.data, t([n]);
529
- } else if (f(this.customRootNode)) {
530
- const n = this.customRootNode(s.data);
531
- n[this.treeProps.children || "children"] = s.data, this.treeData = r(n) ? [n] : n;
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;
532
832
  } else
533
- t(s.data);
534
- await this.$nextTick(), this.$emit("root-node-loaded", s.data), this.defaultExpandedKeys ? this.expandedKeys = [(a = s == null ? void 0 : s.data[0]) == null ? void 0 : a.id, ...this.defaultExpandedKeys] : this.expandFirstNode && (this.expandedKeys = [(o = s == null ? void 0 : s.data[0]) == null ? void 0 : o.id]);
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]);
535
835
  } else {
536
- if (e.leaf || e.data.isTempNode)
537
- return t([]);
538
- const s = await this.fetchApi(e.data.id, e);
539
- t(s.data), await this.$nextTick(), this.$emit("node-loaded", s.data);
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);
540
840
  }
541
841
  },
542
842
  clear() {
@@ -549,115 +849,115 @@ const M = {
549
849
  this.newChild && this.newChild.id === -1 && (console.log(this.newChild), this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
550
850
  },
551
851
  cancelEdit() {
552
- this.editData && (l(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
852
+ this.editData && (isUndefined(this.editData.edit) ? this.$set(this.editData, "edit", !0) : this.editData.edit = !1);
553
853
  },
554
- async editNode(e, t) {
555
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = t, this.text = t[this.treeProps.label], l(t.edit) ? this.$set(t, "edit", !0) : t.edit = !0, await this.$nextTick(), this.$refs.labelTxt.focus()) : await this.$prompt(`请输入新的${this.label}名:`, {
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}名:`, {
556
856
  ...this.defaultOptions,
557
- inputValue: t[this.treeProps.label],
558
- beforeClose: async (i, a, o) => {
559
- if (i === "confirm") {
857
+ inputValue: data[this.treeProps.label],
858
+ beforeClose: async (action, instance, done) => {
859
+ if (action === "confirm") {
560
860
  try {
561
- a.confirmButtonLoading = !0, a.confirmButtonText = "处理中...", this.text = a.inputValue, await this.onConfirm(this.curNode, this.curData), o();
861
+ instance.confirmButtonLoading = !0, instance.confirmButtonText = "处理中...", this.text = instance.inputValue, await this.onConfirm(this.curNode, this.curData), done();
562
862
  } catch {
563
- a.confirmButtonText = "确定";
863
+ instance.confirmButtonText = "确定";
564
864
  }
565
- a.confirmButtonLoading = !1;
865
+ instance.confirmButtonLoading = !1;
566
866
  } else
567
- o();
867
+ done();
568
868
  }
569
- }).catch((i) => i);
869
+ }).catch((_) => _);
570
870
  },
571
871
  async appendRootNode() {
572
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}名:`, {
573
873
  ...this.defaultOptions,
574
- beforeClose: async (e, t, i) => {
575
- if (e === "confirm") {
874
+ beforeClose: async (action, instance, done) => {
875
+ if (action === "confirm") {
576
876
  try {
577
- this.createNewChild(-1), t.confirmButtonLoading = !0, t.confirmButtonText = "处理中...";
578
- const a = await this.saveApi(this.newNodeBuilder(t.inputValue, { id: -1 }));
579
- this.newChild[this.treeProps.label] = t.inputValue, this.newChild.edit = !1, c(this.newChild, a.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.locateView(), i();
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();
580
880
  } catch {
581
- t.confirmButtonText = "确定";
881
+ instance.confirmButtonText = "确定";
582
882
  }
583
- t.confirmButtonLoading = !1;
883
+ instance.confirmButtonLoading = !1;
584
884
  } else
585
- i();
885
+ done();
586
886
  }
587
- }).catch((e) => e);
887
+ }).catch((_) => _);
588
888
  },
589
- appendChildNode(e) {
889
+ appendChildNode(node) {
590
890
  this.text = "";
591
- const t = e.expanded;
592
- e.expand(async () => {
593
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.createNewChild(e.data.id), this.$refs.tree.append(this.newChild, e), await this.scrollIntoView(t)) : await this.$prompt(`请输入${this.label}名:`, {
891
+ 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}名:`, {
594
894
  ...this.defaultOptions,
595
- beforeClose: async (i, a, o) => {
596
- if (i === "confirm") {
895
+ beforeClose: async (action, instance, done) => {
896
+ if (action === "confirm") {
597
897
  try {
598
- this.createNewChild(e.data.id), a.confirmButtonLoading = !0, a.confirmButtonText = "处理中...";
599
- const s = await this.saveApi(this.newNodeBuilder(a.inputValue, e.data));
600
- this.newChild[this.treeProps.label] = a.inputValue, this.newChild.edit = !1, c(this.newChild, s.data), this.$refs.tree.append(this.newChild, e), await this.locateView(), o();
898
+ 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();
601
901
  } catch {
602
- a.confirmButtonText = "确定";
902
+ instance.confirmButtonText = "确定";
603
903
  }
604
- a.confirmButtonLoading = !1;
904
+ instance.confirmButtonLoading = !1;
605
905
  } else
606
- o();
906
+ done();
607
907
  }
608
- }).catch((i) => i);
908
+ }).catch((_) => _);
609
909
  });
610
910
  },
611
- appendChildNodeWithData(e, t, i) {
911
+ appendChildNodeWithData(node, parentId, label) {
612
912
  this.text = "";
613
- const a = e.expanded;
614
- e.expand(async () => {
913
+ const expanded = node.expanded;
914
+ node.expand(async () => {
615
915
  this.clear(), this.newChild = {
616
916
  id: -1,
617
- parentId: t,
618
- [this.treeProps.label]: i,
917
+ parentId,
918
+ [this.treeProps.label]: label,
619
919
  edit: !1,
620
920
  isTempNode: !0,
621
921
  hasChildren: !1
622
- }, this.$refs.tree.append(this.newChild, e), await this.scrollIntoView(a);
922
+ }, this.$refs.tree.append(this.newChild, node), await this.scrollIntoView(expanded);
623
923
  });
624
924
  },
625
- appendPeerNode(e) {
626
- e.parent && e.parent.level !== 0 ? this.appendChildNode(e.parent) : this.appendRootNode();
925
+ appendPeerNode(node) {
926
+ node.parent && node.parent.level !== 0 ? this.appendChildNode(node.parent) : this.appendRootNode();
627
927
  },
628
- async addRootNode(e) {
629
- this.$refs.tree.remove(e), await this.$nextTick(), this.$refs.tree.root.insertChild({ data: e }, void 0, !0);
928
+ async addRootNode(data) {
929
+ this.$refs.tree.remove(data), await this.$nextTick(), this.$refs.tree.root.insertChild({ data }, void 0, !0);
630
930
  },
631
- async addChildNode(e) {
931
+ async addChildNode(data) {
632
932
  this.curNode && this.curNode.level !== 0 ? this.curNode.expand(async () => {
633
- this.$refs.tree.remove(e), await this.$nextTick(), this.$refs.tree.append(e, this.curNode);
634
- }) : await this.addRootNode(e);
933
+ this.$refs.tree.remove(data), await this.$nextTick(), this.$refs.tree.append(data, this.curNode);
934
+ }) : await this.addRootNode(data);
635
935
  },
636
- async addPeerNode(e) {
936
+ async addPeerNode(data) {
637
937
  this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(async () => {
638
- this.$refs.tree.remove(e), await this.$nextTick(), this.$refs.tree.append(e, this.curNode.parent);
639
- }) : await this.addRootNode(e);
938
+ this.$refs.tree.remove(data), await this.$nextTick(), this.$refs.tree.append(data, this.curNode.parent);
939
+ }) : await this.addRootNode(data);
640
940
  },
641
- updateNode(e) {
642
- const t = this.$refs.tree.getNode(e);
643
- t && (t.data = e);
941
+ updateNode(data) {
942
+ const node = this.$refs.tree.getNode(data);
943
+ node && (node.data = data);
644
944
  },
645
- setCurrentKey(e) {
646
- this.$refs.tree && this.$refs.tree.setCurrentKey(e);
945
+ setCurrentKey(key) {
946
+ this.$refs.tree && this.$refs.tree.setCurrentKey(key);
647
947
  },
648
- createNewChild(e) {
948
+ createNewChild(parentId) {
649
949
  this.newChild = {
650
950
  id: -1,
651
- parentId: e,
951
+ parentId,
652
952
  [this.treeProps.label]: "",
653
953
  edit: !0,
654
954
  isTempNode: !0,
655
955
  hasChildren: !1
656
956
  }, this.$emit("create-new-node", this.newChild);
657
957
  },
658
- async removeNodeModal(e) {
958
+ async removeNodeModal(node) {
659
959
  await this.$confirm(
660
- `你确定要删除${this.label}[<span class="break-word" style="color: orange">${e.data[this.treeProps.label]}</span>]吗?`,
960
+ `你确定要删除${this.label}[<span class="break-word" style="color: orange">${node.data[this.treeProps.label]}</span>]吗?`,
661
961
  "系统提示",
662
962
  {
663
963
  type: "warning",
@@ -667,123 +967,123 @@ const M = {
667
967
  closeOnClickModal: !1,
668
968
  confirmButtonClass: "el-button--danger",
669
969
  cancelButtonClass: "el-button--primary is-plain",
670
- beforeClose: async (t, i, a) => {
671
- if (t === "confirm") {
970
+ beforeClose: async (action, instance, done) => {
971
+ if (action === "confirm") {
672
972
  try {
673
- i.confirmButtonLoading = !0, i.confirmButtonText = "删除...";
674
- const o = e.parent, s = await this.deleteApi(e.data.id);
675
- s.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", o, e.data), a()) : this.$message.error(s.message);
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);
676
976
  } catch {
677
977
  }
678
- i.confirmButtonText = "确定", i.confirmButtonLoading = !1;
978
+ instance.confirmButtonText = "确定", instance.confirmButtonLoading = !1;
679
979
  } else
680
- a();
980
+ done();
681
981
  }
682
982
  }
683
- ).catch((t) => t);
983
+ ).catch((_) => _);
684
984
  },
685
- async removeNode(e) {
985
+ async removeNode(node) {
686
986
  try {
687
- const t = e.parent;
987
+ const parentNode = node.parent;
688
988
  if (this.deleteApi) {
689
- const i = await this.deleteApi(e.data.id);
690
- i.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", t, e.data)) : this.$message.error(i.message);
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);
691
991
  } else
692
- this.$refs.tree.remove(e);
992
+ this.$refs.tree.remove(node);
693
993
  } catch {
694
994
  }
695
995
  },
696
- async onConfirm(e, t) {
697
- if (t[this.treeProps.label] === this.text || !C(this.text)) {
996
+ async onConfirm(node, data) {
997
+ if (data[this.treeProps.label] === this.text || !isNotEmpty(this.text)) {
698
998
  this.clear();
699
999
  return;
700
1000
  }
701
- l(t.loading) ? this.$set(t, "loading", !0) : t.loading = !0;
1001
+ isUndefined(data.loading) ? this.$set(data, "loading", !0) : data.loading = !0;
702
1002
  try {
703
- if (this.loading = !0, t.id === -1) {
704
- const i = await this.saveApi(this.newNodeBuilder(this.text, e.parent.data || { id: -1 })), a = v(t);
705
- c(t, { ...i.data, isTempNode: !1 }), this.$emit("node-added", t, a, e), this.registerNode(e);
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);
706
1006
  } else
707
- await this.updateApi({ ...t, [this.treeProps.label]: this.text });
708
- t[this.treeProps.label] = this.text, t.edit = !1, this.$emit("node-updated", t, e), this.text = "";
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 = "";
709
1009
  } catch {
710
1010
  }
711
- t.loading = !1, this.loading = !1;
1011
+ data.loading = !1, this.loading = !1;
712
1012
  },
713
- onCancel(e, t) {
714
- t.id === -1 ? this.$refs.tree.remove(e) : t.edit = !1, this.text = "";
1013
+ onCancel(node, data) {
1014
+ data.id === -1 ? this.$refs.tree.remove(node) : data.edit = !1, this.text = "";
715
1015
  },
716
- nodeClick(e, t, i) {
717
- this.hideContextMenu(), (l(e.loading) || !e.loading) && (this.curNode = t, this.curData = e, this.$emit("on-node-click", e, t, i));
1016
+ nodeClick(data, node, tree) {
1017
+ this.hideContextMenu(), (isUndefined(data.loading) || !data.loading) && (this.curNode = node, this.curData = data, this.$emit("on-node-click", data, node, tree));
718
1018
  },
719
1019
  getCurrentNode() {
720
1020
  return this.$refs.tree.getCurrentNode();
721
1021
  },
722
1022
  async locateView() {
723
1023
  await this.$nextTick();
724
- const e = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
725
- e && e.scrollIntoView();
1024
+ const el = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
1025
+ el && el.scrollIntoView();
726
1026
  },
727
- async scrollIntoView(e) {
728
- var t, i;
729
- await this.$nextTick(), e || await g(300), (i = (t = this.$refs) == null ? void 0 : t.labelTxt) == null || i.focus();
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();
730
1030
  },
731
- inputKeyup(e, t, i) {
732
- e.keyCode === 13 && this.onConfirm(t, i), e.keyCode === 27 && this.clear();
1031
+ inputKeyup(event, node, data) {
1032
+ event.keyCode === 13 && this.onConfirm(node, data), event.keyCode === 27 && this.clear();
733
1033
  },
734
- inputBlur(e, t, i) {
735
- this.confirmButton || this.onConfirm(t, i);
1034
+ inputBlur(event, node, data) {
1035
+ this.confirmButton || this.onConfirm(node, data);
736
1036
  },
737
1037
  getCheckedKeys() {
738
1038
  return this.$refs.tree.getCheckedKeys();
739
1039
  },
740
- setCheckedKeys(e) {
741
- this.$refs.tree.setCheckedKeys(e);
1040
+ setCheckedKeys(keys) {
1041
+ this.$refs.tree.setCheckedKeys(keys);
742
1042
  },
743
1043
  getCheckedNodes() {
744
1044
  return this.$refs.tree.getCheckedNodes();
745
1045
  },
746
- setCheckedNodes(e) {
747
- this.$refs.tree.setCheckedNodes(e);
1046
+ setCheckedNodes(nodes) {
1047
+ this.$refs.tree.setCheckedNodes(nodes);
748
1048
  },
749
- getNode(e) {
750
- return this.$refs.tree.getNode(e);
1049
+ getNode(data) {
1050
+ return this.$refs.tree.getNode(data);
751
1051
  },
752
1052
  getRootNode() {
753
1053
  return this.$refs.tree.root;
754
1054
  },
755
- findTreeNode(e) {
756
- return $(
1055
+ findTreeNode(data) {
1056
+ return findTreeChildren(
757
1057
  this.$refs.tree.root.childNodes,
758
- (t) => t.data === e || t.data.id === e,
1058
+ (node) => node.data === data || node.data.id === data,
759
1059
  "childNodes"
760
1060
  );
761
1061
  },
762
- registerNode(e) {
763
- e.store.registerNode(e), delete e.store.nodesMap[-1];
1062
+ registerNode(node) {
1063
+ node.store.registerNode(node), delete node.store.nodesMap[-1];
764
1064
  },
765
1065
  async reloadTree() {
766
1066
  this.lazy ? this.treeKey = Date.now() : await this.tryFetch();
767
1067
  }
768
1068
  }
769
- }, m = {};
770
- var K = /* @__PURE__ */ k(
771
- M,
772
- B,
773
- T,
1069
+ }, __cssModules = {};
1070
+ var __component__ = /* @__PURE__ */ normalizeComponent(
1071
+ __vue2_script,
1072
+ render,
1073
+ staticRenderFns,
774
1074
  !1,
775
- P,
1075
+ __vue2_injectStyles,
776
1076
  null,
777
1077
  null,
778
1078
  null
779
1079
  );
780
- function P(e) {
781
- for (let t in m)
782
- this[t] = m[t];
1080
+ function __vue2_injectStyles(context) {
1081
+ for (let o in __cssModules)
1082
+ this[o] = __cssModules[o];
783
1083
  }
784
- const R = /* @__PURE__ */ function() {
785
- return K.exports;
1084
+ const EditableTree = /* @__PURE__ */ function() {
1085
+ return __component__.exports;
786
1086
  }();
787
1087
  export {
788
- R as default
1088
+ EditableTree as default
789
1089
  };