@web-utils/form-ui 1.0.0-beta72 → 1.0.0-beta74

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 (328) hide show
  1. package/address-input/index.mjs +1 -1
  2. package/affix/index.d.ts +0 -2
  3. package/affix/index.mjs +2 -3
  4. package/capsule-tab/index.mjs +1 -1
  5. package/card/index.mjs +15 -16
  6. package/chunks/-fXBgN9b2.mjs +37 -0
  7. package/chunks/{-UHCmZBh.mjs → -yfgKY3g.mjs} +1 -1
  8. package/chunks/{Ciy3EJGG2.mjs → -zgWD713.mjs} +44 -45
  9. package/chunks/{qFn9SqfB2.mjs → 7_9hAeqb.mjs} +72 -73
  10. package/chunks/{CidE_6Q52.mjs → 8A7LSgb4.mjs} +26 -27
  11. package/chunks/B0BOjeph2.mjs +108 -0
  12. package/chunks/BE4V5Vf5.mjs +133 -0
  13. package/chunks/{Diidem-9.mjs → BGJjAw5E.mjs} +1 -1
  14. package/chunks/{BJNI7n9Z.mjs → BH7VEktl.mjs} +19 -19
  15. package/chunks/{BrJzSp9f.mjs → BI6kCG2j2.mjs} +2 -2
  16. package/chunks/BctSGDgW2.mjs +29 -0
  17. package/chunks/BhIWiH5R.mjs +661 -0
  18. package/chunks/BhzlH7Az.mjs +90 -0
  19. package/chunks/{DWjZMJ1e2.mjs → Bj0kgDOA.mjs} +132 -133
  20. package/chunks/{DmEOzzaP2.mjs → BrelfRGo2.mjs} +14 -14
  21. package/chunks/{X6BItEt1.mjs → BsqIRxSS.mjs} +6 -7
  22. package/chunks/{Bnm0osro.mjs → Byy1rvPO.mjs} +13 -16
  23. package/chunks/{iPHgzcZ0.mjs → C6mb7Nru2.mjs} +4 -4
  24. package/chunks/{Bhkk9TmJ2.mjs → CFoSvMJ-2.mjs} +1 -1
  25. package/chunks/{Vrr45MGv.mjs → CO3taG7t2.mjs} +1 -1
  26. package/chunks/{QAHALDuF2.mjs → CWBRpkHy.mjs} +138 -139
  27. package/chunks/Ccxbv7uz2.mjs +34 -0
  28. package/chunks/Ce4tNNzg2.mjs +63 -0
  29. package/chunks/{SEQG09ut.mjs → CelJ2L8A2.mjs} +2 -2
  30. package/chunks/CjYOitzM2.mjs +31 -0
  31. package/chunks/Cknuquqx.mjs +32 -0
  32. package/chunks/ClVh1Lek.mjs +130 -0
  33. package/chunks/CwyebsNL2.mjs +39 -0
  34. package/chunks/{CJl5ZiUq2.mjs → D4Pd8rZi.mjs} +28 -30
  35. package/chunks/D6YM84Pf2.mjs +29 -0
  36. package/chunks/{DlROUHPJ2.mjs → DTq5QLoT.mjs} +43 -43
  37. package/chunks/{5oaTzHT-2.mjs → DVMfVn-M.mjs} +14 -13
  38. package/chunks/DVdQHb_v.mjs +50 -0
  39. package/chunks/{YS7hFnUB2.mjs → Daa7nl7U.mjs} +19 -19
  40. package/chunks/{D6TSUCGL.mjs → Dh_BQpvC2.mjs} +2 -2
  41. package/chunks/DizOY5i8.mjs +69 -0
  42. package/chunks/{Czi7_tAe.mjs → DjaV6_cg2.mjs} +2 -2
  43. package/chunks/{CKWgRCN52.mjs → Dm3gQGoV2.mjs} +2 -2
  44. package/chunks/DqW9QtF3.mjs +68 -0
  45. package/chunks/{CKbOqPFm2.mjs → DqWJCka8.mjs} +9 -9
  46. package/chunks/{CIerTjpq2.mjs → DrWUdRj32.mjs} +2 -2
  47. package/chunks/{BrSZZNRc.mjs → DucSg7Mt.mjs} +70 -72
  48. package/chunks/Dv7YRB2U2.mjs +25 -0
  49. package/chunks/DyLQsqWJ.mjs +61 -0
  50. package/chunks/HsHwYW1a.mjs +99 -0
  51. package/chunks/KDVLIvaS.mjs +30 -0
  52. package/chunks/{BHwRv4F0.mjs → Lkg7bYLD2.mjs} +73 -74
  53. package/chunks/OBTStTaa.mjs +179 -0
  54. package/chunks/{DSnICEQN.mjs → Opn85Hlx2.mjs} +1 -1
  55. package/chunks/{C9nRNgwm2.mjs → QTy8g5MS.mjs} +589 -763
  56. package/chunks/{CsA_9MVv.mjs → YdNYH25C.mjs} +1 -1
  57. package/chunks/_q6JzJYp.mjs +773 -0
  58. package/chunks/{BiYsC43_.mjs → gTgPZrgY2.mjs} +119 -120
  59. package/chunks/{D2FNAA1a.mjs → jsgk7Yse2.mjs} +2 -2
  60. package/chunks/nL59ZuIk.mjs +58 -0
  61. package/chunks/{BJuAz5lX2.mjs → sWVkgzQt2.mjs} +2 -2
  62. package/chunks/{DN2qkQvd.mjs → tjwOOiNr2.mjs} +31 -32
  63. package/code-mirror-editor/index.mjs +1 -1
  64. package/confirm-button/index.mjs +1 -1
  65. package/confirmable/index.mjs +1 -1
  66. package/context-menu/index.mjs +1 -1
  67. package/count-up/index.mjs +1 -1
  68. package/custom-scrollbar/index.mjs +1 -1
  69. package/data-box/index.mjs +9 -10
  70. package/data-card/index.mjs +8 -9
  71. package/data-card-text/index.mjs +8 -9
  72. package/data-display/index.mjs +9 -10
  73. package/data-icons/index.mjs +9 -10
  74. package/data-imgtext/index.mjs +9 -11
  75. package/data-operatext/index.mjs +8 -9
  76. package/data-panel/index.mjs +9 -10
  77. package/data-pay/index.mjs +10 -12
  78. package/data-price/index.mjs +8 -9
  79. package/data-progress/index.mjs +10 -11
  80. package/data-rotate/index.mjs +9 -10
  81. package/data-table-picker/index.mjs +11 -12
  82. package/data-tabs/index.mjs +9 -10
  83. package/dict-render/index.mjs +1 -1
  84. package/e-charts/index.mjs +2 -2
  85. package/easy-popup/index.mjs +1 -1
  86. package/editable-progress/index.mjs +8 -8
  87. package/editable-tree/index.mjs +595 -2
  88. package/editable-tree/style.css +1 -1
  89. package/element-dialog/index.mjs +1 -1
  90. package/element-dialog/style.css +1 -1
  91. package/element-resize-observer/index.mjs +1 -1
  92. package/flex-box/index.mjs +1 -1
  93. package/flex-column/index.mjs +1 -1
  94. package/flex-item/index.mjs +1 -1
  95. package/flex-row/index.mjs +1 -1
  96. package/flex-scroller/index.mjs +1 -1
  97. package/flow-designer/index.mjs +1 -1
  98. package/flow-designer/style.css +1 -1
  99. package/flow-viewer/index.mjs +1 -1
  100. package/form-cascader/index.mjs +1 -1
  101. package/form-checkbox/index.mjs +1 -1
  102. package/form-checkbox-group/index.mjs +1 -1
  103. package/form-checkbox-group/style.css +1 -1
  104. package/form-date-picker/index.mjs +1 -1
  105. package/form-holder/index.mjs +1 -1
  106. package/form-image/index.mjs +1 -1
  107. package/form-input/index.mjs +1 -1
  108. package/form-input-cron-expression/index.mjs +1 -1
  109. package/form-input-email/index.mjs +1 -1
  110. package/form-input-id-card/index.mjs +1 -1
  111. package/form-input-number/index.mjs +1 -1
  112. package/form-input-phone-number/index.mjs +1 -1
  113. package/form-input-tag/index.mjs +1 -1
  114. package/form-input-time/index.mjs +1 -1
  115. package/form-item-group/index.mjs +1 -1
  116. package/form-item-x/index.mjs +1 -1
  117. package/form-radio-group/index.mjs +1 -1
  118. package/form-rate/index.mjs +1 -1
  119. package/form-row/index.mjs +1 -1
  120. package/form-select/index.mjs +1 -1
  121. package/form-slider/index.mjs +1 -1
  122. package/form-switch/index.mjs +1 -1
  123. package/form-table/index.mjs +1 -1
  124. package/form-table-plus/index.mjs +1 -1
  125. package/form-text/index.mjs +1 -1
  126. package/form-textarea/index.mjs +1 -1
  127. package/form-time-select/index.mjs +1 -1
  128. package/form-tree-select/index.mjs +1 -1
  129. package/form-tree-select-multiple/index.mjs +1 -1
  130. package/form-view/index.mjs +3 -3
  131. package/guide-steps/index.mjs +77 -2
  132. package/guide-steps/style.css +1 -1
  133. package/helper/dictionary.mjs +1 -1
  134. package/helper/input.mjs +1 -1
  135. package/highlight-j-s/index.mjs +1 -1
  136. package/iframe-window/index.mjs +1 -1
  137. package/image-cropper/index.mjs +12 -11
  138. package/image-preview/index.d.ts +1 -153
  139. package/image-preview/index.mjs +201 -2
  140. package/image-preview/style.css +1 -1
  141. package/image-viewer/index.mjs +1 -1
  142. package/index.css +1 -1
  143. package/index.mjs +101 -101
  144. package/input-number-range/index.mjs +7 -7
  145. package/keyboard/index.mjs +1 -1
  146. package/loading-view/index.mjs +1 -1
  147. package/name-avatar/index.mjs +1 -1
  148. package/nav-bar/index.mjs +3 -4
  149. package/package.json +5 -1
  150. package/page-index/index.mjs +14 -14
  151. package/page-index-top/index.mjs +12 -12
  152. package/pageable-table/index.mjs +1 -1
  153. package/pageable-table/style.css +1 -1
  154. package/photo-swipe/index.mjs +1 -1
  155. package/props/col.mjs +1 -1
  156. package/props/form-item.mjs +1 -1
  157. package/sign-panel/index.mjs +1 -1
  158. package/skeleton-panel/index.mjs +3 -3
  159. package/split-pane/index.mjs +1 -1
  160. package/sub-table/index.mjs +1 -1
  161. package/sub-table-plus/index.mjs +1 -1
  162. package/swiper/index.mjs +2 -2
  163. package/table-column/index.mjs +1 -1
  164. package/table-column-def/index.mjs +1 -1
  165. package/table-view/index.mjs +109 -110
  166. package/table-view/style.css +1 -1
  167. package/tag-render/index.mjs +21 -23
  168. package/text-ellipsis/index.d.ts +1 -1
  169. package/text-ellipsis/index.mjs +1 -1
  170. package/toolbar/index.mjs +1 -1
  171. package/toolbar-button/index.mjs +1 -1
  172. package/vue-cron/index.mjs +1 -1
  173. package/vue-tags-input/index.mjs +1 -1
  174. package/vue-tree-select/index.mjs +1 -1
  175. package/vue-video-player/index.d.ts +1 -1
  176. package/vue-video-player/index.mjs +1 -1
  177. package/watermark/index.mjs +1 -1
  178. package/web-types.json +1 -1
  179. package/x-input-tag/index.mjs +47 -50
  180. package/year-calendar/index.mjs +1 -1
  181. package/year-calendar/style.css +1 -1
  182. package/chunks/49634Q2N2.mjs +0 -936
  183. package/chunks/77cFhiAz.mjs +0 -13
  184. package/chunks/7JVbVOff2.mjs +0 -46
  185. package/chunks/B1ATN2my.mjs +0 -26
  186. package/chunks/B7O8aGqC2.mjs +0 -58
  187. package/chunks/BBPczt0U.mjs +0 -4
  188. package/chunks/BCwAowl1.mjs +0 -589
  189. package/chunks/BDVLN2ly.mjs +0 -105
  190. package/chunks/BEIlrURf.mjs +0 -251
  191. package/chunks/BEysX5TF2.mjs +0 -1038
  192. package/chunks/BHVyaqk0.mjs +0 -736
  193. package/chunks/BIj6pa8Z.mjs +0 -15
  194. package/chunks/BMWg0Wyj.mjs +0 -223
  195. package/chunks/BOsml5YC.mjs +0 -69
  196. package/chunks/BPwFiWYl2.mjs +0 -226
  197. package/chunks/BVIHqL6g.mjs +0 -17
  198. package/chunks/BVSQ6DfJ.mjs +0 -17
  199. package/chunks/BWqFKbFT.mjs +0 -1
  200. package/chunks/B__5L22p2.mjs +0 -346
  201. package/chunks/Bcpewc6H.mjs +0 -1279
  202. package/chunks/Bdeug17L.mjs +0 -42
  203. package/chunks/BffxPn8a.mjs +0 -34
  204. package/chunks/BgKQXQO_.mjs +0 -3093
  205. package/chunks/Bgw_3soo.mjs +0 -35
  206. package/chunks/BjCfQFUL.mjs +0 -54
  207. package/chunks/BjWs-r2V.mjs +0 -25
  208. package/chunks/BlB1fEo92.mjs +0 -8
  209. package/chunks/BmP9lQmT.mjs +0 -1
  210. package/chunks/BrYtAPbN2.mjs +0 -161
  211. package/chunks/BsKwchVA.mjs +0 -14
  212. package/chunks/Bxo1Of95.mjs +0 -479
  213. package/chunks/BzFYbCpR.mjs +0 -25
  214. package/chunks/C6puxasG.mjs +0 -34
  215. package/chunks/C7l9aZGE.mjs +0 -577
  216. package/chunks/CDRNaOEg2.mjs +0 -274
  217. package/chunks/CG7AYiWy.mjs +0 -1
  218. package/chunks/CLzc_j7_.mjs +0 -234
  219. package/chunks/CQSTyCVP.mjs +0 -6
  220. package/chunks/CQxz8uUc.mjs +0 -454
  221. package/chunks/CU8bKuD12.mjs +0 -237
  222. package/chunks/CUF58PQ6.mjs +0 -1
  223. package/chunks/CUMFv5zJ2.mjs +0 -136
  224. package/chunks/C_eGir-J.mjs +0 -17
  225. package/chunks/Cb6Zx6UC.mjs +0 -29
  226. package/chunks/Cb_S4x_i2.mjs +0 -1098
  227. package/chunks/CbgD7y-5.mjs +0 -5
  228. package/chunks/CbsGuLZz2.mjs +0 -105
  229. package/chunks/CcT5SsZk.mjs +0 -48
  230. package/chunks/CcnjxILx.mjs +0 -1
  231. package/chunks/ChkCT6Mm.mjs +0 -4
  232. package/chunks/CiFlMt6Z.mjs +0 -41
  233. package/chunks/CiOqOUkG.mjs +0 -1
  234. package/chunks/CkXf_DVJ2.mjs +0 -1
  235. package/chunks/CnCSm3LY2.mjs +0 -4
  236. package/chunks/CnqWFDqp2.mjs +0 -244
  237. package/chunks/Cq0oEWRi2.mjs +0 -384
  238. package/chunks/CtBIjjQc2.mjs +0 -58
  239. package/chunks/Ctd3_wOH2.mjs +0 -6
  240. package/chunks/CuoYjthQ.mjs +0 -643
  241. package/chunks/CwhXr2Qc.mjs +0 -1
  242. package/chunks/D-hj62se2.mjs +0 -525
  243. package/chunks/D3VpXXqv.mjs +0 -1331
  244. package/chunks/D3Xixh5v.mjs +0 -5
  245. package/chunks/D4oNQiIK.mjs +0 -461
  246. package/chunks/D7O9ov79.mjs +0 -447
  247. package/chunks/D8fid28s2.mjs +0 -42
  248. package/chunks/DJdhVUFO2.mjs +0 -2435
  249. package/chunks/DJo_1CEK2.mjs +0 -61
  250. package/chunks/DMBx2EQl.mjs +0 -107
  251. package/chunks/DOCwznnS.mjs +0 -62
  252. package/chunks/DStwh2ne.mjs +0 -281
  253. package/chunks/D_5z5Xeq2.mjs +0 -37
  254. package/chunks/Df9VO_Wn2.mjs +0 -2
  255. package/chunks/Dg9Q-Tbi2.mjs +0 -299
  256. package/chunks/Diyl8upM.mjs +0 -277
  257. package/chunks/DjIPzCCR.mjs +0 -2
  258. package/chunks/DnBzQ-xh.mjs +0 -4
  259. package/chunks/Dp195RgF.mjs +0 -2
  260. package/chunks/Dqu1Etz62.mjs +0 -52
  261. package/chunks/DrKq_frR.mjs +0 -98
  262. package/chunks/DrXfCf172.mjs +0 -440
  263. package/chunks/DsZznbt2.mjs +0 -208
  264. package/chunks/Dsd58O0g.mjs +0 -25
  265. package/chunks/DssopN-n2.mjs +0 -97
  266. package/chunks/Dtq1xYk8.mjs +0 -47
  267. package/chunks/FeuisuNY2.mjs +0 -88
  268. package/chunks/GEtlriHC.mjs +0 -188
  269. package/chunks/GsvG1yFW.mjs +0 -1919
  270. package/chunks/IheQdJ0z.mjs +0 -267
  271. package/chunks/KGmxNbpi.mjs +0 -21
  272. package/chunks/PNyFONog2.mjs +0 -69
  273. package/chunks/T70m4caR.mjs +0 -1095
  274. package/chunks/ZBsqmcIN2.mjs +0 -622
  275. package/chunks/akEzJ4kG.mjs +0 -18
  276. package/chunks/fX1GD0G5.mjs +0 -70
  277. package/chunks/gh52LMTG.mjs +0 -12
  278. package/chunks/hgAOQY9a.mjs +0 -406
  279. package/chunks/iu5J8EF_.mjs +0 -197
  280. package/chunks/lGc5ksPb.mjs +0 -279
  281. package/chunks/pZQfJv282.mjs +0 -4
  282. package/chunks/qrHhuZXg.mjs +0 -465
  283. package/chunks/r8gDbwly.mjs +0 -1
  284. package/chunks/vpwjmKdg2.mjs +0 -32
  285. package/css/style.css +0 -1
  286. package/css/style10.css +0 -1
  287. package/css/style11.css +0 -1
  288. package/css/style12.css +0 -1
  289. package/css/style13.css +0 -1
  290. package/css/style14.css +0 -1
  291. package/css/style15.css +0 -1
  292. package/css/style16.css +0 -1
  293. package/css/style17.css +0 -1
  294. package/css/style18.css +0 -1
  295. package/css/style19.css +0 -1
  296. package/css/style2.css +0 -1
  297. package/css/style20.css +0 -1
  298. package/css/style21.css +0 -1
  299. package/css/style22.css +0 -1
  300. package/css/style23.css +0 -1
  301. package/css/style24.css +0 -1
  302. package/css/style25.css +0 -1
  303. package/css/style26.css +0 -1
  304. package/css/style27.css +0 -1
  305. package/css/style28.css +0 -1
  306. package/css/style29.css +0 -1
  307. package/css/style3.css +0 -1
  308. package/css/style4.css +0 -1
  309. package/css/style5.css +0 -1
  310. package/css/style6.css +0 -1
  311. package/css/style7.css +0 -1
  312. package/css/style8.css +0 -1
  313. package/css/style9.css +0 -1
  314. package/form-date-picker/style.css +0 -1
  315. package/form-image/style.css +0 -1
  316. package/form-input-time/style.css +0 -1
  317. package/form-radio-group/style.css +0 -1
  318. package/form-rate/style.css +0 -1
  319. package/form-time-select/style.css +0 -1
  320. /package/chunks/{CZnBtJW02.mjs → BBvIPqcc.mjs} +0 -0
  321. /package/chunks/{iIozz7ce.mjs → BoCxKwBf.mjs} +0 -0
  322. /package/chunks/{BxRjXAwz.mjs → CE67pCwD.mjs} +0 -0
  323. /package/chunks/{DWhGFQkb2.mjs → CQeEP_Tl.mjs} +0 -0
  324. /package/chunks/{BQ0e8kIi.mjs → CaczibeD.mjs} +0 -0
  325. /package/chunks/{B_80qPvY.mjs → DZCryyFG.mjs} +0 -0
  326. /package/chunks/{q5iCsXNv.mjs → Dq63V0CC.mjs} +0 -0
  327. /package/chunks/{CRjUGi_-.mjs → OEBJ-trG.mjs} +0 -0
  328. /package/chunks/{GYddfy8T.mjs → fjtZc9Rq2.mjs} +0 -0
@@ -1,736 +0,0 @@
1
- import "./CjjJimnU.mjs";
2
- import { l as e, s as t, t as n } from "./DrKq_frR.mjs";
3
- import { t as r } from "./qrHhuZXg.mjs";
4
- import { C as i, F as a, t as o } from "./D4oNQiIK.mjs";
5
- import { n as s } from "./GEtlriHC.mjs";
6
- import { n as c, r as l, t as u } from "./GsvG1yFW.mjs";
7
- import { t as d } from "./C7l9aZGE.mjs";
8
- import { a as f } from "./B1ATN2my.mjs";
9
- import { m as p, t as m } from "./D-hj62se2.mjs";
10
- import { r as h, t as g } from "./49634Q2N2.mjs";
11
- import { t as _ } from "./T70m4caR.mjs";
12
- /* empty css */
13
- import "./CiOqOUkG.mjs";
14
- import { t as v } from "./BQ0e8kIi.mjs";
15
- import "./CwhXr2Qc.mjs";
16
- import { t as y } from "./BJNI7n9Z.mjs";
17
- import "./Dp195RgF.mjs";
18
- import { allProps as b, predicate as x } from "../props/tree.mjs";
19
- import { Fragment as S, computed as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, createTextVNode as O, createVNode as k, defineComponent as ee, mergeProps as A, normalizeClass as j, normalizeStyle as M, openBlock as N, ref as P, renderSlot as F, resolveDynamicComponent as I, toDisplayString as L, toHandlers as R, unref as z, vShow as B, withCtx as V, withDirectives as H, withModifiers as U } from "vue";
20
- import { computePosition as W, delay as te, fastClone as ne, findTreeChildren as re, isFunction as G, isNotEmpty as K, isPlainObject as q, isUndefined as J, isVerticalScrollbarVisible as Y, patch as X, scrollbarWidth as ie } from "@web-utils/core";
21
- import { cloneDeep as Z } from "@web-utils/integrations/lodash";
22
- import { addResizeListener as Q, removeResizeListener as $ } from "@web-utils/integrations/resize";
23
- //#endregion
24
- //#region node_modules/.pnpm/element-plus@2.13.7_typescr_0fa4751f8fa020301a8746973788e8b7/node_modules/element-plus/es/components/popconfirm/index.mjs
25
- var ae = n(/* @__PURE__ */ ee({
26
- name: "ElPopconfirm",
27
- __name: "popconfirm",
28
- props: e({
29
- title: String,
30
- confirmButtonText: String,
31
- cancelButtonText: String,
32
- confirmButtonType: {
33
- type: String,
34
- values: h,
35
- default: "primary"
36
- },
37
- cancelButtonType: {
38
- type: String,
39
- values: h,
40
- default: "text"
41
- },
42
- icon: {
43
- type: f,
44
- default: () => i
45
- },
46
- iconColor: {
47
- type: String,
48
- default: "#f90"
49
- },
50
- hideIcon: Boolean,
51
- hideAfter: {
52
- type: Number,
53
- default: 200
54
- },
55
- effect: {
56
- ...l.effect,
57
- default: "light"
58
- },
59
- teleported: l.teleported,
60
- persistent: l.persistent,
61
- width: {
62
- type: [String, Number],
63
- default: 150
64
- },
65
- virtualTriggering: c.virtualTriggering,
66
- virtualRef: c.virtualRef
67
- }),
68
- emits: {
69
- confirm: (e) => e instanceof MouseEvent,
70
- cancel: (e) => e instanceof MouseEvent
71
- },
72
- setup(e, { expose: n, emit: r }) {
73
- let i = e, c = r, { t: l } = s(), d = t("popconfirm"), f = P(), p = P(), m = C(() => {
74
- var e;
75
- return (e = z(f)) == null ? void 0 : e.popperRef;
76
- }), h = () => {
77
- var e, t;
78
- (e = p.value) == null || (t = e.focus) == null || t.call(e);
79
- }, _ = () => {
80
- var e, t;
81
- (e = f.value) == null || (t = e.onClose) == null || t.call(e);
82
- }, v = C(() => ({ width: a(i.width) })), y = (e) => {
83
- c("confirm", e), _();
84
- }, b = (e) => {
85
- c("cancel", e), _();
86
- }, x = C(() => i.confirmButtonText || l("el.popconfirm.confirmButtonText")), S = C(() => i.cancelButtonText || l("el.popconfirm.cancelButtonText"));
87
- return n({
88
- popperRef: m,
89
- hide: _
90
- }), (t, n) => (N(), w(z(u), A({
91
- ref_key: "tooltipRef",
92
- ref: f,
93
- trigger: "click",
94
- effect: e.effect
95
- }, t.$attrs, {
96
- "virtual-triggering": e.virtualTriggering,
97
- "virtual-ref": e.virtualRef,
98
- "popper-class": `${z(d).namespace.value}-popover`,
99
- "popper-style": v.value,
100
- teleported: e.teleported,
101
- "fallback-placements": [
102
- "bottom",
103
- "top",
104
- "right",
105
- "left"
106
- ],
107
- "hide-after": e.hideAfter,
108
- persistent: e.persistent,
109
- loop: "",
110
- onShow: h
111
- }), {
112
- content: V(() => [D("div", {
113
- ref_key: "rootRef",
114
- ref: p,
115
- tabindex: "-1",
116
- class: j(z(d).b())
117
- }, [D("div", { class: j(z(d).e("main")) }, [!e.hideIcon && e.icon ? (N(), w(z(o), {
118
- key: 0,
119
- class: j(z(d).e("icon")),
120
- style: M({ color: e.iconColor })
121
- }, {
122
- default: V(() => [(N(), w(I(e.icon)))]),
123
- _: 1
124
- }, 8, ["class", "style"])) : T("v-if", !0), O(" " + L(e.title), 1)], 2), D("div", { class: j(z(d).e("action")) }, [F(t.$slots, "actions", {
125
- confirm: y,
126
- cancel: b
127
- }, () => [k(z(g), {
128
- size: "small",
129
- type: e.cancelButtonType === "text" ? "" : e.cancelButtonType,
130
- text: e.cancelButtonType === "text",
131
- onClick: b
132
- }, {
133
- default: V(() => [O(L(S.value), 1)]),
134
- _: 1
135
- }, 8, ["type", "text"]), k(z(g), {
136
- size: "small",
137
- type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
138
- text: e.confirmButtonType === "text",
139
- onClick: y
140
- }, {
141
- default: V(() => [O(L(x.value), 1)]),
142
- _: 1
143
- }, 8, ["type", "text"])])], 2)], 2)]),
144
- default: V(() => [t.$slots.reference ? F(t.$slots, "reference", { key: 0 }) : T("v-if", !0)]),
145
- _: 3
146
- }, 16, [
147
- "effect",
148
- "virtual-triggering",
149
- "virtual-ref",
150
- "popper-class",
151
- "popper-style",
152
- "teleported",
153
- "hide-after",
154
- "persistent"
155
- ]));
156
- }
157
- })), oe = {
158
- name: "EditableTree",
159
- props: { ...b },
160
- emits: {
161
- "remove-new-node": null,
162
- "node-loaded": null,
163
- "root-node-loaded": null,
164
- "node-deleted": null,
165
- "node-updated": null,
166
- "node-added": null,
167
- "on-node-click": null,
168
- "add-root-node": null,
169
- "create-new-node": null
170
- },
171
- data() {
172
- return {
173
- loading: !1,
174
- showMenu: !1,
175
- empty: !0,
176
- expandedKeys: this.lazy ? [] : this.defaultExpandedKeys,
177
- treeData: [],
178
- curNode: {},
179
- curData: {},
180
- position: {},
181
- text: "",
182
- right: 4,
183
- treeKey: Date.now()
184
- };
185
- },
186
- computed: {
187
- defaultOptions() {
188
- return {
189
- confirmButtonText: "确定",
190
- cancelButtonText: "取消",
191
- closeOnClickModal: !1,
192
- modal: !0,
193
- inputErrorMessage: `${this.label}名不能为空!`,
194
- inputPlaceholder: `请输入${this.label}名...`,
195
- inputValidator: (e) => e != null && e.trim().length > 0
196
- };
197
- },
198
- innerTreeData() {
199
- var e;
200
- return (e = this.$attrs.data) != null && e.length ? this.$attrs.data : this.treeData;
201
- }
202
- },
203
- watch: { defaultExpandedKeys: {
204
- immediate: !0,
205
- handler(e) {
206
- this.expandedKeys = [...e];
207
- }
208
- } },
209
- setup(e) {
210
- let { autoBindProps: t, listeners: n } = p(e, {
211
- predicate: x,
212
- removeOn: !0
213
- });
214
- return {
215
- autoBindProps: t,
216
- listeners: n
217
- };
218
- },
219
- created() {
220
- this.tryFetch();
221
- },
222
- mounted() {
223
- Q(this.$refs.tree.$el, this.resize), Q(this.$refs.treeWrapper, this.resize);
224
- },
225
- beforeUnmount() {
226
- $(this.$refs.tree.$el, this.resize), $(this.$refs.treeWrapper, this.resize);
227
- },
228
- methods: {
229
- addExpandKey(e) {
230
- this.reserveExpandKey && this.expandedKeys.push(e[this.nodeKey]);
231
- },
232
- removeExpandKey(e) {
233
- this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((t) => t !== e[this.nodeKey]));
234
- },
235
- resize() {
236
- Y(this.$refs.treeWrapper) ? this.right = 4 + ie : this.right = 4;
237
- },
238
- async showContextMenu(e, t, n) {
239
- t.contextmenu === !1 || t.id === -1 || t.id === 0 || t.edit === !0 || this.readonly || this.contextMenu && (this.curNode = n, this.curData = t, this.showMenu = !0, this.$refs.tree.setCurrentKey(t.id), await this.$nextTick(), this.position = W(e, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
240
- },
241
- hideContextMenu() {
242
- this.showMenu = !1, window.removeEventListener("click", this.hideContextMenu);
243
- },
244
- async tryFetch() {
245
- if (this.lazy === !1 && this.fetchApi) {
246
- var e;
247
- let r;
248
- try {
249
- var t;
250
- r = await this.fetchApi(((t = this.rootNode) == null ? void 0 : t.id) ?? -1, {});
251
- } catch {
252
- return;
253
- }
254
- let i = r.data.data;
255
- q(i) && (i = [i]), i = i || [];
256
- let a = [];
257
- if (this.empty = i.length === 0, q(this.customRootNode)) {
258
- let e = Z(this.customRootNode);
259
- e[this.treeProps.children || "children"] = i, a = [e];
260
- } else if (G(this.customRootNode)) {
261
- let e = this.customRootNode(i);
262
- e[this.treeProps.children || "children"] = i, a = q(e) ? [e] : e;
263
- } else a = i;
264
- if ((e = this.defaultExpandedKeys) != null && e.length) this.expandedKeys = [...this.defaultExpandedKeys];
265
- else if (this.expandFirstNode) {
266
- var n;
267
- this.expandedKeys = [(n = a[0]) == null ? void 0 : n.id];
268
- }
269
- this.treeData = a, await this.$nextTick(), this.$emit("node-loaded", a);
270
- }
271
- },
272
- async loadNode(e, t) {
273
- if (e.level === 0) {
274
- var n, r;
275
- let o = (await this.fetchApi(((n = this.rootNode) == null ? void 0 : n.id) ?? -1, e)).data.data;
276
- if (this.empty = o.length === 0, q(this.customRootNode)) {
277
- let e = Z(this.customRootNode);
278
- e[this.treeProps.children || "children"] = o, o = [e], t(o);
279
- } else if (G(this.customRootNode)) {
280
- let e = this.customRootNode(o);
281
- e[this.treeProps.children || "children"] = o, o = q(e) ? [e] : e;
282
- } else t(o);
283
- if (await this.$nextTick(), this.$emit("root-node-loaded", o), (r = this.defaultExpandedKeys) != null && r.length) {
284
- var i;
285
- this.expandedKeys = [(i = o[0]) == null ? void 0 : i.id, ...this.defaultExpandedKeys];
286
- } else if (this.expandFirstNode) {
287
- var a;
288
- this.expandedKeys = [(a = o[0]) == null ? void 0 : a.id];
289
- }
290
- } else {
291
- if (e.leaf || e.data.isTempNode) return t([]);
292
- let n = (await this.fetchApi(e.data.id, e)).data.data;
293
- t(n), await this.$nextTick(), this.$emit("node-loaded", n);
294
- }
295
- },
296
- clear() {
297
- this.cancelEdit(), this.removeNewNode();
298
- },
299
- clearChecked() {
300
- this.$refs.tree.setCheckedKeys([]);
301
- },
302
- removeNewNode() {
303
- this.newChild && this.newChild.id === -1 && (this.$refs.tree.remove(this.newChild), this.$emit("remove-new-node"));
304
- },
305
- cancelEdit() {
306
- this.editData && (J(this.editData.edit) ? this.editData.edit = !0 : this.editData.edit = !1);
307
- },
308
- async editNode(e, t) {
309
- !this.contextMenu || this.contextMenuIcon || this.contextMenuInline ? (this.clear(), this.editData = t, this.text = t[this.treeProps.label], J(t.edit), t.edit = !0, await this.$nextTick(), this.$refs.labelTxt.focus()) : await r.prompt(`请输入新的${this.label}名:`, {
310
- ...this.defaultOptions,
311
- inputValue: t[this.treeProps.label],
312
- beforeClose: async (e, t, n) => {
313
- if (e === "confirm") {
314
- try {
315
- t.confirmButtonLoading = !0, t.confirmButtonText = "处理中...", this.text = t.inputValue, await this.onConfirm(this.curNode, this.curData), n();
316
- } catch {
317
- t.confirmButtonText = "确定";
318
- }
319
- t.confirmButtonLoading = !1;
320
- } else n();
321
- }
322
- }).catch((e) => e);
323
- },
324
- async appendRootNode() {
325
- 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 r.prompt(`请输入${this.label}名:`, {
326
- ...this.defaultOptions,
327
- beforeClose: async (e, t, n) => {
328
- if (e === "confirm") {
329
- try {
330
- this.createNewChild(-1), t.confirmButtonLoading = !0, t.confirmButtonText = "处理中...";
331
- let e = await this.saveApi(this.newNodeBuilder(t.inputValue, { id: -1 }));
332
- this.newChild[this.treeProps.label] = t.inputValue, this.newChild.edit = !1, m(this.newChild, e.data), this.$refs.tree.root.insertChild({ data: this.newChild }, void 0, !0), await this.locateView(), n();
333
- } catch {
334
- t.confirmButtonText = "确定";
335
- }
336
- t.confirmButtonLoading = !1;
337
- } else n();
338
- }
339
- }).catch((e) => e);
340
- },
341
- appendChildNode(e) {
342
- this.text = "";
343
- let t = e.expanded;
344
- e.expand(async () => {
345
- !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 r.prompt(`请输入${this.label}名:`, {
346
- ...this.defaultOptions,
347
- beforeClose: async (t, n, r) => {
348
- if (t === "confirm") {
349
- try {
350
- this.createNewChild(e.data.id), n.confirmButtonLoading = !0, n.confirmButtonText = "处理中...";
351
- let t = await this.saveApi(this.newNodeBuilder(n.inputValue, e.data));
352
- this.newChild[this.treeProps.label] = n.inputValue, this.newChild.edit = !1, m(this.newChild, t.data), this.$refs.tree.append(this.newChild, e), await this.locateView(), r();
353
- } catch {
354
- n.confirmButtonText = "确定";
355
- }
356
- n.confirmButtonLoading = !1;
357
- } else r();
358
- }
359
- });
360
- });
361
- },
362
- appendChildNodeWithData(e, t, n) {
363
- this.text = "";
364
- let r = e.expanded;
365
- e.expand(async () => {
366
- this.clear(), this.newChild = {
367
- id: -1,
368
- parentId: t,
369
- [this.treeProps.label]: n,
370
- edit: !1,
371
- isTempNode: !0,
372
- hasChildren: !1
373
- }, this.$refs.tree.append(this.newChild, e), await this.scrollIntoView(r);
374
- });
375
- },
376
- appendPeerNode(e) {
377
- e.parent && e.parent.level !== 0 ? this.appendChildNode(e.parent) : this.appendRootNode();
378
- },
379
- async addRootNode(e) {
380
- this.$refs.tree.remove(e), await this.$nextTick(), this.$refs.tree.root.insertChild({ data: e }, void 0, !0);
381
- },
382
- async addChildNode(e) {
383
- this.curNode && this.curNode.level !== 0 ? this.curNode.expand(async () => {
384
- this.$refs.tree.remove(e), await this.$nextTick(), this.$refs.tree.append(e, this.curNode);
385
- }) : await this.addRootNode(e);
386
- },
387
- async addPeerNode(e) {
388
- this.curNode && this.curNode.parent && this.curNode.parent.level !== 0 ? this.curNode.parent.expand(async () => {
389
- this.$refs.tree.remove(e), await this.$nextTick(), this.$refs.tree.append(e, this.curNode.parent);
390
- }) : await this.addRootNode(e);
391
- },
392
- updateNode(e) {
393
- let t = this.$refs.tree.getNode(e);
394
- t && X(t.data, e, !0);
395
- },
396
- setCurrentKey(e) {
397
- var t;
398
- (t = this.$refs.tree) == null || t.setCurrentKey(e);
399
- },
400
- createNewChild(e) {
401
- this.newChild = {
402
- id: -1,
403
- parentId: e,
404
- [this.treeProps.label]: "",
405
- edit: !0,
406
- isTempNode: !0,
407
- hasChildren: !1
408
- }, this.$emit("create-new-node", this.newChild);
409
- },
410
- async removeNodeModal(e) {
411
- await this.$confirm(`你确定要删除${this.label}[<span class="break-word" style="color: orange">${e.data[this.treeProps.label]}</span>]吗?`, "系统提示", {
412
- type: "warning",
413
- modal: !0,
414
- dangerouslyUseHTMLString: !0,
415
- iconClass: "el-icon-question",
416
- closeOnClickModal: !1,
417
- confirmButtonClass: "el-button--danger",
418
- cancelButtonClass: "el-button--primary is-plain",
419
- beforeClose: async (t, n, r) => {
420
- if (t === "confirm") {
421
- try {
422
- n.confirmButtonLoading = !0, n.confirmButtonText = "删除...";
423
- let t = e.parent, i = await this.deleteApi(e.data.id);
424
- i.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", t, e.data), r()) : this.$message.error(i.message);
425
- } catch {}
426
- n.confirmButtonText = "确定", n.confirmButtonLoading = !1;
427
- } else r();
428
- }
429
- }).catch((e) => e);
430
- },
431
- async removeNode(e) {
432
- try {
433
- let t = e.parent;
434
- if (this.deleteApi) {
435
- let n = await this.deleteApi(e.data.id);
436
- n.code === 0 ? (this.$message.success("删除成功!"), this.$refs.tree.remove(e), this.$emit("node-deleted", t, e.data)) : this.$message.error(n.message);
437
- } else this.$refs.tree.remove(e);
438
- } catch {}
439
- },
440
- async onConfirm(e, t) {
441
- if (t[this.treeProps.label] === this.text || !K(this.text)) {
442
- this.clear();
443
- return;
444
- }
445
- J(t.loading), t.loading = !0;
446
- try {
447
- if (this.loading = !0, t.id === -1) {
448
- let n = await this.saveApi(this.newNodeBuilder(this.text, e.parent.data || { id: -1 })), r = ne(t);
449
- m(t, {
450
- ...n.data,
451
- isTempNode: !1
452
- }), this.$emit("node-added", t, r, e), this.registerNode(e);
453
- } else await this.updateApi({
454
- ...t,
455
- [this.treeProps.label]: this.text
456
- });
457
- t[this.treeProps.label] = this.text, t.edit = !1, this.$emit("node-updated", t, e), this.text = "";
458
- } catch {}
459
- t.loading = !1, this.loading = !1;
460
- },
461
- onCancel(e, t) {
462
- t.id === -1 ? this.$refs.tree.remove(e) : t.edit = !1, this.text = "";
463
- },
464
- nodeClick(e, t, n) {
465
- this.hideContextMenu(), (J(e.loading) || !e.loading) && (this.curNode = t, this.curData = e, this.$emit("on-node-click", e, t, n));
466
- },
467
- getCurrentNode() {
468
- return this.$refs.tree.getCurrentNode();
469
- },
470
- async locateView() {
471
- await this.$nextTick();
472
- let e = this.$el.querySelector(`[data-id="${this.newChild.id}"]`);
473
- e && e.scrollIntoView();
474
- },
475
- async scrollIntoView(e) {
476
- var t;
477
- await this.$nextTick(), e || await te(300), (t = this.$refs) == null || (t = t.labelTxt) == null || t.focus();
478
- },
479
- inputKeyup(e, t, n) {
480
- e.keyCode === 13 && this.onConfirm(t, n), e.keyCode === 27 && this.clear();
481
- },
482
- inputBlur(e, t, n) {
483
- this.confirmButton || this.onConfirm(t, n);
484
- },
485
- getCheckedKeys() {
486
- return this.$refs.tree.getCheckedKeys();
487
- },
488
- setCheckedKeys(e) {
489
- this.$refs.tree.setCheckedKeys(e);
490
- },
491
- getCheckedNodes() {
492
- return this.$refs.tree.getCheckedNodes();
493
- },
494
- setCheckedNodes(e) {
495
- this.$refs.tree.setCheckedNodes(e);
496
- },
497
- getNode(e) {
498
- return this.$refs.tree.getNode(e);
499
- },
500
- getRootNode() {
501
- return this.$refs.tree.root;
502
- },
503
- findTreeNode(e) {
504
- return re(this.$refs.tree.root.childNodes, (t) => t.data === e || t.data.id === e, "childNodes");
505
- },
506
- registerNode(e) {
507
- e.store.registerNode(e), delete e.store.nodesMap[-1];
508
- },
509
- async reloadTree() {
510
- this.lazy ? this.treeKey = Date.now() : await this.tryFetch();
511
- }
512
- }
513
- }, se = { class: "editable-tree" }, ce = {
514
- ref: "treeWrapper",
515
- class: "et-tree-wrapper"
516
- }, le = {
517
- key: 0,
518
- style: { "padding-left": "24px" }
519
- }, ue = ["data-id"], de = {
520
- class: "node-label flex-row flex-item ellipsis-1",
521
- style: { overflow: "hidden" }
522
- }, fe = {
523
- class: "flex-item-relative",
524
- style: { height: "21px" }
525
- }, pe = ["title"], me = {
526
- key: 0,
527
- class: "handle-actions"
528
- }, he = {
529
- key: 1,
530
- class: "handle-actions",
531
- style: { display: "inline-block" }
532
- }, ge = ["data-id"], _e = { class: "menu-list" };
533
- function ve(e, t, n, r, i, a) {
534
- let o = y, s = ae, c = d, l = _;
535
- return N(), E("div", se, [!e.readonly && e.addRootNodeButtonStyle === "top-right" ? (N(), w(o, {
536
- key: 0,
537
- type: "primary",
538
- style: M([{
539
- position: "absolute",
540
- top: "4px",
541
- "z-index": "1"
542
- }, { right: `${i.right}px` }]),
543
- icon: "el-icon-plus",
544
- circle: "",
545
- plain: "",
546
- onClick: t[0] || (t[0] = U((t) => e.$emit("add-root-node"), ["stop"]))
547
- }, null, 8, ["style"])) : T("v-if", !0), D("div", ce, [
548
- !e.readonly && e.addRootNodeButtonStyle === "top" ? (N(), E("div", le, [k(o, {
549
- disabled: i.loading,
550
- type: "text",
551
- onClick: a.appendRootNode
552
- }, {
553
- default: V(() => [t[8] || (t[8] = D("i", { class: "el-icon-lx-add" }, null, -1)), O(" " + L(e.addRootNodeLabel ? e.addRootNodeLabel : `添加${e.label}`), 1)]),
554
- _: 1
555
- }, 8, ["disabled", "onClick"])])) : T("v-if", !0),
556
- (N(), w(l, A(r.autoBindProps, {
557
- key: i.treeKey,
558
- ref: "tree",
559
- "default-expand-all": e.defaultExpandAll,
560
- class: "flex-item",
561
- "default-expanded-keys": i.expandedKeys,
562
- "expand-on-click-node": !1,
563
- "highlight-current": "",
564
- load: a.loadNode,
565
- data: a.innerTreeData,
566
- props: e.treeProps,
567
- lazy: e.lazy,
568
- "node-key": e.nodeKey
569
- }, R(r.listeners), {
570
- onNodeClick: a.nodeClick,
571
- onNodeContextmenu: a.showContextMenu,
572
- onNodeExpand: a.addExpandKey,
573
- onNodeCollapse: a.removeExpandKey
574
- }), {
575
- default: V(({ node: n, data: r }) => [F(e.$slots, "default", {
576
- node: n,
577
- data: r
578
- }, () => [T("非编辑模式"), r.edit ? (N(), E(S, { key: 1 }, [T("编辑模式"), D("span", {
579
- "data-id": r.id,
580
- class: "custom-tree-node flex-row flex-item",
581
- style: { overflow: "hidden" }
582
- }, [
583
- e.icon ? (N(), E("i", {
584
- key: 0,
585
- class: j([r.loading ? "el-icon-loading" : "el-icon-edit-outline", "node-icon flex-not-shrink"])
586
- }, null, 2)) : T("v-if", !0),
587
- k(c, {
588
- ref: "labelTxt",
589
- modelValue: i.text,
590
- "onUpdate:modelValue": t[2] || (t[2] = (e) => i.text = e),
591
- class: "node-input flex-item",
592
- placeholder: a.defaultOptions.inputPlaceholder,
593
- onKeyup: (e) => a.inputKeyup(e, n, r),
594
- onBlur: (e) => a.inputBlur(e, n, r),
595
- onClick: t[3] || (t[3] = U(() => {}, ["stop"]))
596
- }, null, 8, [
597
- "modelValue",
598
- "placeholder",
599
- "onKeyup",
600
- "onBlur"
601
- ]),
602
- e.confirmButton ? (N(), E(S, { key: 1 }, [H(k(o, {
603
- class: "flex-not-shrink",
604
- type: "text",
605
- onClick: U((e) => a.onConfirm(n, r), ["stop"])
606
- }, {
607
- default: V(() => [...t[13] || (t[13] = [O(" 确定 ", -1)])]),
608
- _: 1
609
- }, 8, ["onClick"]), [[B, !r.loading]]), H(k(o, {
610
- class: "flex-not-shrink",
611
- type: "text",
612
- onClick: U((e) => a.onCancel(n, r), ["stop"])
613
- }, {
614
- default: V(() => [...t[14] || (t[14] = [O(" 取消 ", -1)])]),
615
- _: 1
616
- }, 8, ["onClick"]), [[B, !r.loading]])], 64)) : T("v-if", !0)
617
- ], 8, ge)], 64)) : (N(), E("span", {
618
- key: 0,
619
- "data-id": r.id,
620
- class: "custom-tree-node"
621
- }, [
622
- D("span", de, [
623
- e.icon ? (N(), E("i", {
624
- key: 0,
625
- class: j([r.loading ? "el-icon-loading" : e.icon(r, n), "node-icon"])
626
- }, null, 2)) : T("v-if", !0),
627
- D("span", fe, [D("span", {
628
- class: "ellipsis-1 absolute-box et-tree-label",
629
- title: n.label
630
- }, [F(e.$slots, "label", {
631
- data: r,
632
- node: n
633
- }, () => [O(L(n.label), 1)])], 8, pe)]),
634
- F(e.$slots, "label-suffix", {
635
- node: n,
636
- data: r
637
- })
638
- ]),
639
- !e.contextMenu && !e.readonly ? H((N(), E("span", me, [
640
- k(o, {
641
- type: "text",
642
- onClick: U((e) => a.appendChildNode(n, r), ["stop"])
643
- }, {
644
- default: V(() => [...t[9] || (t[9] = [O("添加", -1)])]),
645
- _: 1
646
- }, 8, ["onClick"]),
647
- k(o, {
648
- type: "text",
649
- onClick: U((e) => a.editNode(n, r), ["stop"])
650
- }, {
651
- default: V(() => [...t[10] || (t[10] = [O("修改", -1)])]),
652
- _: 1
653
- }, 8, ["onClick"]),
654
- k(s, {
655
- class: "pop-confirm",
656
- "icon-color": "red",
657
- title: "你确定要删除吗?",
658
- onConfirm: (e) => a.removeNode(n, r)
659
- }, {
660
- reference: V(() => [H(k(o, {
661
- style: { "margin-left": "4px" },
662
- type: "text",
663
- onClick: t[1] || (t[1] = U(() => {}, ["stop"]))
664
- }, {
665
- default: V(() => [...t[11] || (t[11] = [O(" 删除 ", -1)])]),
666
- _: 1
667
- }, 512), [[B, n.isLeaf]])]),
668
- _: 2
669
- }, 1032, ["onConfirm"])
670
- ], 512)), [[B, !r.loading && !i.loading]]) : T("v-if", !0),
671
- e.contextMenuIcon && e.contextMenu && !e.readonly ? H((N(), E("span", he, [k(o, {
672
- style: { padding: "6px 10px 0" },
673
- type: "text",
674
- onClick: U((e) => a.showContextMenu(e, r, n), ["stop"])
675
- }, {
676
- default: V(() => [...t[12] || (t[12] = [O(" . . . ", -1)])]),
677
- _: 1
678
- }, 8, ["onClick"])], 512)), [[B, !r.loading && !i.loading]]) : T("v-if", !0)
679
- ], 8, ue))])]),
680
- _: 3
681
- }, 16, [
682
- "default-expand-all",
683
- "default-expanded-keys",
684
- "load",
685
- "data",
686
- "props",
687
- "lazy",
688
- "node-key",
689
- "onNodeClick",
690
- "onNodeContextmenu",
691
- "onNodeExpand",
692
- "onNodeCollapse"
693
- ])),
694
- e.contextMenu && !e.readonly ? H((N(), E("div", {
695
- key: 1,
696
- ref: "contextMenu",
697
- style: M(i.position),
698
- class: "menu"
699
- }, [D("ul", _e, [F(e.$slots, "context-menu", {
700
- curNode: i.curNode,
701
- curData: i.curData
702
- }, () => [
703
- H(D("li", {
704
- class: "menu-item",
705
- onClick: t[4] || (t[4] = (e) => a.appendPeerNode(i.curNode, i.curData))
706
- }, [t[15] || (t[15] = D("i", {
707
- class: "menu-item-icon el-icon-lx-add",
708
- style: { color: "#228b22" }
709
- }, null, -1)), O(" " + L(e.menuLabel.appendPeer), 1)], 512), [[B, i.curData.id > -1]]),
710
- D("li", {
711
- class: "menu-item",
712
- onClick: t[5] || (t[5] = (e) => a.appendChildNode(i.curNode, i.curData))
713
- }, [t[16] || (t[16] = D("i", {
714
- class: "menu-item-icon el-icon-lx-add",
715
- style: { color: "#228b22" }
716
- }, null, -1)), O(" " + L(e.menuLabel.appendChild), 1)]),
717
- H(D("li", {
718
- class: "menu-item",
719
- onClick: t[6] || (t[6] = (e) => a.editNode(i.curNode, i.curData))
720
- }, [t[17] || (t[17] = D("i", {
721
- class: "menu-item-icon el-icon-edit-outline",
722
- style: { color: "#ffa500" }
723
- }, null, -1)), O(" " + L(e.menuLabel.editNode), 1)], 512), [[B, i.curData.id > -1]]),
724
- H(D("li", {
725
- class: "menu-item",
726
- onClick: t[7] || (t[7] = (e) => a.removeNodeModal(i.curNode, i.curData))
727
- }, [t[18] || (t[18] = D("i", {
728
- class: "menu-item-icon el-icon-delete",
729
- style: { color: "#f00" }
730
- }, null, -1)), O(" " + L(e.menuLabel.removeNode), 1)], 512), [[B, i.curNode.isLeaf]])
731
- ])])], 4)), [[B, i.showMenu]]) : T("v-if", !0)
732
- ], 512)]);
733
- }
734
- var ye = /* @__PURE__ */ v(oe, [["render", ve]]);
735
- //#endregion
736
- export { ye as t };