@pubinfo/module-rbac 2.0.0-rc.1 → 2.0.0-rc.3

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 (354) hide show
  1. package/dist/ComponentSelect-B1ZyenXP.js +3686 -0
  2. package/dist/ComponentSelect-DlVJI5an.js +2 -0
  3. package/dist/ComponentSelect.css +1 -0
  4. package/dist/DynamicRoutesForm-Cu3WhRpA.js +4 -0
  5. package/dist/{DynamicRoutesForm-DmQMP8-p.js → DynamicRoutesForm-qjbrykW4.js} +95 -95
  6. package/dist/HCheckList-Cze_TkQp.js +2 -0
  7. package/dist/HoverCard-B79q5sly.js +43 -0
  8. package/dist/HoverCard-U5WTpvFy.js +2 -0
  9. package/dist/{ImportExport-Yt6dABIv.js → ImportExport-Clbc8xaw.js} +65 -65
  10. package/dist/ImportExport-CtEZTU87.js +4 -0
  11. package/dist/MetaForm-BWy4Lpr8.js +5 -0
  12. package/dist/MetaForm-DpH9an5A.js +300 -0
  13. package/dist/MetaForm.css +1 -0
  14. package/dist/OrgAndPosition-3lCm4Fyb.js +2 -0
  15. package/dist/ResourceEdit-0_cYB0iu.js +338 -0
  16. package/dist/ResourceEdit-CYPzEbqn.js +10 -0
  17. package/dist/{ResourceRelation-DJDFQYFT.js → ResourceRelation-CZ8hGgOm.js} +7 -7
  18. package/dist/ResourceRelation-DMWa09ae.js +3 -0
  19. package/dist/{ResourceRelation-cfGS-erP.js → ResourceRelation-DkKdZ3TD.js} +3 -3
  20. package/dist/ResourceRelation.css +1 -0
  21. package/dist/ResourceRelation2.css +1 -0
  22. package/dist/{ResourceSelector-B4AXXCxI.js → ResourceSelector-ConJ30Jd.js} +48 -48
  23. package/dist/ResourceSelector.css +1 -0
  24. package/dist/{RoleRelation-BlWDNAM1.js → RoleRelation-B1D1NM_L.js} +1 -1
  25. package/dist/RoleRelation-DySyilcs.js +2 -0
  26. package/dist/RoleSelector-DOt30OLy.js +279 -0
  27. package/dist/TenantEdit-D8-Pt7sf.js +6 -0
  28. package/dist/{TenantEdit-6rMUS9EP.js → TenantEdit-DNJzo8SS.js} +19 -19
  29. package/dist/{UserAuthorization-Cx9oYms2.js → UserAuthorization-DPHUk69M.js} +7 -7
  30. package/dist/UserAuthorization-DuioGghR.js +4 -0
  31. package/dist/UserAuthorization.css +1 -0
  32. package/dist/UserEdit-6HYbgtOh.js +4 -0
  33. package/dist/{UserEdit-CqH6hxTZ.js → UserEdit-C6eNXSCu.js} +24 -24
  34. package/dist/add-child-BqjLtFNF.js +2 -0
  35. package/dist/animation_item-C3pkH-cB.js +2 -0
  36. package/dist/authority-BCFCPQkb.js +2 -0
  37. package/dist/authorize-BykMzt1r.js +2 -0
  38. package/dist/{blackWhiteList-B-EAyXzG.js → blackWhiteList-DQALdBZf.js} +11 -11
  39. package/dist/blackWhiteList.css +1 -0
  40. package/dist/blacklist-disable-COoLZMSA.js +2 -0
  41. package/dist/blacklist-enable-LZep1trj.js +2 -0
  42. package/dist/breadcrumb_setting-D3UjJYhA.js +111 -0
  43. package/dist/breadcrumb_setting.css +1 -0
  44. package/dist/browser-chrome-D0rex7Ir.js +2 -0
  45. package/dist/browser-edge-KCb_AIL5.js +2 -0
  46. package/dist/browser-ie-C1znjJM-.js +2 -0
  47. package/dist/browser-other-C4er8PkV.js +2 -0
  48. package/dist/browser-safari-BPRC1TV-.js +2 -0
  49. package/dist/browserType-BGl2j5RW.js +2 -0
  50. package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +1 -1
  51. package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +1 -1
  52. package/dist/components/ResourceSelector/index.vue.d.ts +1 -1
  53. package/dist/composables/useWebSocketManager.d.ts +8 -0
  54. package/dist/createAndEditDataPermission-CAaxueTy.js +8 -0
  55. package/dist/{createAndEditDataPermission-BFmD3zpY.js → createAndEditDataPermission-DnAcKvaE.js} +56 -56
  56. package/dist/createAndEditDataPermission.css +1 -0
  57. package/dist/{data-permission-Dz4eCdAg.js → data-permission-CLnnLoPt.js} +9 -9
  58. package/dist/data-permission.css +1 -0
  59. package/dist/{dictionary-C8UVX_8l.js → dictionary-BFM0Mx0P.js} +3 -3
  60. package/dist/{drawerBlackWhiteList-opDsd2_O.js → drawerBlackWhiteList-BYACpO3D.js} +9 -9
  61. package/dist/drawerBlackWhiteList-C3xS7Kxx.js +3 -0
  62. package/dist/{drawerDictionary-CzT9KJGw.js → drawerDictionary-BUBLrbTi.js} +13 -13
  63. package/dist/drawerDictionary-Bk0BgL7i.js +4 -0
  64. package/dist/{drawerDictionaryItem-LBeuvrE8.js → drawerDictionaryItem-CfOPleN6.js} +14 -14
  65. package/dist/drawerDictionaryItem-Dy2T56AH.js +4 -0
  66. package/dist/{drawerGroup-B_pYqrpy.js → drawerGroup-Bly3CWfM.js} +10 -10
  67. package/dist/drawerGroup-ZyzAWXOl.js +3 -0
  68. package/dist/{drawerOrganization-BeDsW0ah.js → drawerOrganization-BhO5-PP5.js} +27 -27
  69. package/dist/drawerOrganization-HSVB8JzO.js +3 -0
  70. package/dist/{drawerPosition-DRacJCCQ.js → drawerPosition-CM0NBfoR.js} +15 -15
  71. package/dist/drawerPosition-vsuG4JYe.js +3 -0
  72. package/dist/drawerRegion-BXZ751ge.js +3 -0
  73. package/dist/{drawerRegion-BM__zqtq.js → drawerRegion-CGySAL6D.js} +17 -17
  74. package/dist/{drawerRole-DhU_4L0Z.js → drawerRole-BE0utb7R.js} +9 -9
  75. package/dist/drawerRole-BVeaz3Yb.js +5 -0
  76. package/dist/drawerRole-BdoMYLYW.js +215 -0
  77. package/dist/drawerRole-BeUNs7cF.js +6 -0
  78. package/dist/drawerRole-DNsK5a6O.js +3 -0
  79. package/dist/{drawerRole-BOf6UXMc.js → drawerRole-DS7fbx1h.js} +10 -10
  80. package/dist/edit-C9HH0bNg.js +2 -0
  81. package/dist/{group-C0rajn0e.js → group-B1gGoTD5.js} +11 -11
  82. package/dist/group.css +1 -0
  83. package/dist/icard-FW0Ro50-.js +2 -0
  84. package/dist/icon_animation-DuNUKCIP.js +2 -0
  85. package/dist/icon_breadcrumb-DrPNYW5B.js +2 -0
  86. package/dist/icon_copyright-Di3Yr0PZ.js +2 -0
  87. package/dist/icon_jt-C4rQLl9Y.js +2 -0
  88. package/dist/icon_layout-5L9E7uN2.js +2 -0
  89. package/dist/icon_mainpage-DMKqRgmE.js +2 -0
  90. package/dist/icon_menu-Cp7-Zght.js +2 -0
  91. package/dist/icon_page_size-Dc0zqT2W.js +2 -0
  92. package/dist/icon_position_type-DH2qxQQE.js +2 -0
  93. package/dist/icon_safe_manage-DXYWl1y-.js +2 -0
  94. package/dist/icon_screen_scale-DwC6qqx2.js +2 -0
  95. package/dist/icon_system_manage-BYTldLly.js +2 -0
  96. package/dist/icon_tabbar-CxffARwI.js +2 -0
  97. package/dist/icon_toolbar-CsxnTrNJ.js +2 -0
  98. package/dist/icon_topbar-DS-oEZFA.js +2 -0
  99. package/dist/icon_watermark-DDXsHlfQ.js +2 -0
  100. package/dist/index.css +1 -0
  101. package/dist/index.d.ts +3 -0
  102. package/dist/index.js +2264 -2041
  103. package/dist/{itemlist-CZBPz_rC.js → itemlist-uCHnA_We.js} +3 -3
  104. package/dist/{layout_setting-oQd8BfKx.js → layout_setting-DMvxwL31.js} +20 -20
  105. package/dist/layout_setting.css +1 -0
  106. package/dist/log-center-BFjZ4IE1.js +2 -0
  107. package/dist/{loginHistoryDetail-Abn9eS5-.js → loginHistoryDetail-BAYuSqvw.js} +3 -3
  108. package/dist/loginHistoryDetail-DiuNa6Sv.js +4 -0
  109. package/dist/loginHistoryDetail.css +1 -0
  110. package/dist/{login_history-Btv9KB0x.js → login_history-BexfCN-1.js} +8 -8
  111. package/dist/login_history.css +1 -0
  112. package/dist/menu_setting-BXR3EAXD.js +158 -0
  113. package/dist/menu_setting.css +1 -0
  114. package/dist/not-data-Bw8FlpyB.js +2 -0
  115. package/dist/not-data-OpiacaSk.js +2 -0
  116. package/dist/{operateHistoryDetail-Br_M3mhI.js → operateHistoryDetail-DiuqMTkN.js} +3 -3
  117. package/dist/operateHistoryDetail-r30ZBNqw.js +4 -0
  118. package/dist/operateHistoryDetail.css +1 -0
  119. package/dist/{operate_history-D7jq2IH-.js → operate_history-hXxS3atI.js} +8 -8
  120. package/dist/operate_history.css +1 -0
  121. package/dist/org-main-D5Isevbc.js +2 -0
  122. package/dist/org-unmain-BHBqSuCz.js +2 -0
  123. package/dist/{organization-CeOyltjo.js → organization-cvYm9P9w.js} +2648 -2648
  124. package/dist/organization.css +1 -0
  125. package/dist/other_setting-DjVQevBW.js +220 -0
  126. package/dist/other_setting.css +1 -0
  127. package/dist/page_animation_setting-DgHHmFEc.js +117 -0
  128. package/dist/page_animation_setting.css +1 -0
  129. package/dist/{page_w_setting-Dr2tu_oS.js → page_w_setting-B_im6vBo.js} +20 -20
  130. package/dist/page_w_setting.css +1 -0
  131. package/dist/{position-Bodjtnh9.js → position-BkpbHXYP.js} +2 -2
  132. package/dist/{region-B9xObK4Z.js → region-DVkbjI9t.js} +6 -6
  133. package/dist/remove-DKMMsJNq.js +2 -0
  134. package/dist/{resource-DhkRTloI.js → resource-CrhX7VRK.js} +13 -11
  135. package/dist/resource-app-DZwdNG6F.js +2 -0
  136. package/dist/resource-btn-DPX0oM2L.js +2 -0
  137. package/dist/resource-dynamic-Cb_vjMjt.js +2 -0
  138. package/dist/resource-index-ah4NpEob.js +2 -0
  139. package/dist/resource-menu-CzWI03EU.js +2 -0
  140. package/dist/resource-micro-Ca0NS7j_.js +2 -0
  141. package/dist/resource-nonmenu-Deitjo_5.js +2 -0
  142. package/dist/{role-DoBrQ1zG.js → role-PjmrOdFd.js} +6 -6
  143. package/dist/{role_group-BMNZ1M1A.js → role_group-Dlx-6BZF.js} +2 -2
  144. package/dist/routeSystem-Dg0b6mAl.js +2 -0
  145. package/dist/{safe_setting-J6GWqrZx.js → safe_setting-DpWUCv2p.js} +2 -2
  146. package/dist/safe_setting.css +1 -0
  147. package/dist/setItem-9ZBl0BlF.js +5 -0
  148. package/dist/setItem-BenNySNl.js +77 -0
  149. package/dist/setItem.css +1 -0
  150. package/dist/setting-manage-B3vaM0w1.js +2 -0
  151. package/dist/stores/view.d.ts +56 -0
  152. package/dist/tabbar_setting-9UKDc1Ev.js +142 -0
  153. package/dist/tabbar_setting.css +1 -0
  154. package/dist/{tenant-pPYq3xtM.js → tenant-BGtOP_wo.js} +5 -5
  155. package/dist/theme-check-mark-BK7E8lqd.js +2 -0
  156. package/dist/theme-title-aqbHq846.js +2 -0
  157. package/dist/{theme_setting-DMyPJp3M.js → theme_setting-BBLaZ4NS.js} +9 -9
  158. package/dist/theme_setting.css +1 -0
  159. package/dist/{toolbar_setting-ChcZxAJJ.js → toolbar_setting-OemNp6pO.js} +37 -37
  160. package/dist/toolbar_setting.css +1 -0
  161. package/dist/{useAppAndResource-DWQG9bqY.js → useAppAndResource-CeMCjg2v.js} +1 -1
  162. package/dist/{user-BJL1Sw0q.js → user-JCiGXodF.js} +12 -12
  163. package/dist/user.css +1 -0
  164. package/dist/utils/routeSystem.d.ts +55 -0
  165. package/dist/view-C6Eo1zRL.js +2 -0
  166. package/dist/views/blackWhiteList/index.vue.d.ts +2 -2
  167. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +5 -5
  168. package/dist/views/data-permission/index.vue.d.ts +7 -7
  169. package/dist/views/dictionary/index.vue.d.ts +2 -2
  170. package/dist/views/dictionary/itemlist.vue.d.ts +2 -2
  171. package/dist/views/group/index.vue.d.ts +2 -2
  172. package/dist/views/log_center/login_history.vue.d.ts +2 -2
  173. package/dist/views/log_center/operate_history.vue.d.ts +2 -2
  174. package/dist/views/position/index.vue.d.ts +2 -2
  175. package/dist/views/region/index.vue.d.ts +2 -2
  176. package/dist/views/resource/components/ComponentSelect.vue.d.ts +3 -1
  177. package/dist/views/resource/components/HoverCard.vue.d.ts +21 -0
  178. package/dist/views/resource/index.vue.d.ts +2 -2
  179. package/dist/views/resource/model.d.ts +3 -1
  180. package/dist/views/role/components/ResourceRelation.vue.d.ts +2 -2
  181. package/dist/views/role/components/drawerRole.vue.d.ts +2 -2
  182. package/dist/views/role/index.vue.d.ts +6 -6
  183. package/dist/views/role_group/index.vue.d.ts +2 -2
  184. package/dist/views/tenant/components/TenantEdit.vue.d.ts +2 -2
  185. package/dist/views/tenant/index.vue.d.ts +4 -4
  186. package/dist/views/user/index.vue.d.ts +2 -2
  187. package/dist/watermark_setting-C1VFRfbW.js +199 -0
  188. package/dist/watermark_setting.css +1 -0
  189. package/dist/zddata-fjEtQ3lZ.js +2 -0
  190. package/dist/zy_checked-DTsDCC94.js +2 -0
  191. package/dist/zy_default-BaIuMKw-.js +2 -0
  192. package/package.json +11 -9
  193. package/src/assets/icons/add-child.svg +1 -1
  194. package/src/assets/icons/authority.svg +1 -1
  195. package/src/assets/icons/authorize.svg +1 -1
  196. package/src/assets/icons/blacklist-disable.svg +1 -1
  197. package/src/assets/icons/blacklist-enable.svg +1 -1
  198. package/src/assets/icons/browser-chrome.svg +1 -1
  199. package/src/assets/icons/browser-edge.svg +1 -1
  200. package/src/assets/icons/browser-ie.svg +1 -1
  201. package/src/assets/icons/browser-other.svg +1 -1
  202. package/src/assets/icons/browser-safari.svg +1 -1
  203. package/src/assets/icons/edit.svg +1 -1
  204. package/src/assets/icons/icard.svg +1 -1
  205. package/src/assets/icons/icon_animation.svg +1 -1
  206. package/src/assets/icons/icon_breadcrumb.svg +1 -1
  207. package/src/assets/icons/icon_copyright.svg +1 -1
  208. package/src/assets/icons/icon_jt.svg +1 -1
  209. package/src/assets/icons/icon_layout.svg +1 -1
  210. package/src/assets/icons/icon_mainpage.svg +1 -1
  211. package/src/assets/icons/icon_menu.svg +1 -1
  212. package/src/assets/icons/icon_page_size.svg +1 -1
  213. package/src/assets/icons/icon_position_type.svg +1 -1
  214. package/src/assets/icons/icon_safe_manage.svg +1 -1
  215. package/src/assets/icons/icon_screen_scale.svg +2 -2
  216. package/src/assets/icons/icon_system_manage.svg +1 -1
  217. package/src/assets/icons/icon_tabbar.svg +1 -1
  218. package/src/assets/icons/icon_toolbar.svg +1 -1
  219. package/src/assets/icons/icon_topbar.svg +1 -1
  220. package/src/assets/icons/icon_watermark.svg +1 -1
  221. package/src/assets/icons/log-center.svg +1 -1
  222. package/src/assets/icons/not-data.svg +1 -1
  223. package/src/assets/icons/org-main.svg +1 -1
  224. package/src/assets/icons/org-unmain.svg +1 -1
  225. package/src/assets/icons/remove.svg +1 -1
  226. package/src/assets/icons/resource-app.svg +1 -1
  227. package/src/assets/icons/resource-btn.svg +1 -1
  228. package/src/assets/icons/resource-dynamic.svg +2 -2
  229. package/src/assets/icons/resource-index.svg +1 -1
  230. package/src/assets/icons/resource-menu.svg +1 -1
  231. package/src/assets/icons/resource-micro.svg +2 -2
  232. package/src/assets/icons/resource-nonmenu.svg +1 -1
  233. package/src/assets/icons/setting-manage.svg +1 -1
  234. package/src/assets/icons/theme-check-mark.svg +1 -1
  235. package/src/assets/icons/theme-title.svg +1 -1
  236. package/src/assets/icons/view.svg +1 -1
  237. package/src/assets/icons/zddata.svg +1 -1
  238. package/src/assets/icons/zy_checked.svg +1 -1
  239. package/src/assets/icons/zy_default.svg +1 -1
  240. package/src/composables/useWebSocketManager.ts +104 -0
  241. package/src/index.ts +22 -0
  242. package/src/stores/view.ts +292 -0
  243. package/src/utils/routeSystem.ts +53 -0
  244. package/src/views/region/index.vue +1 -1
  245. package/src/views/resource/components/ComponentSelect.vue +99 -181
  246. package/src/views/resource/components/HoverCard.vue +62 -0
  247. package/src/views/resource/components/MetaForm.vue +129 -67
  248. package/src/views/resource/components/ResourceEdit.vue +33 -4
  249. package/src/views/resource/hooks/useMetaForm.ts +23 -0
  250. package/src/views/resource/model.ts +5 -1
  251. package/src/views/watermark_setting/index.vue +2 -2
  252. package/dist/ComponentSelect-AWuDE4De.js +0 -2
  253. package/dist/ComponentSelect-CFoCrAFh.js +0 -483
  254. package/dist/DynamicRoutesForm-xXTdh5EX.js +0 -4
  255. package/dist/HCheckList-u43x0KiD.js +0 -2
  256. package/dist/ImportExport-BbZkZEW_.js +0 -4
  257. package/dist/MetaForm-BB80P4w6.js +0 -284
  258. package/dist/MetaForm-D_na1CP8.js +0 -4
  259. package/dist/OrgAndPosition-CDCim7yM.js +0 -2
  260. package/dist/ResourceEdit-CVwNJMVm.js +0 -309
  261. package/dist/ResourceEdit-D1e8tLAA.js +0 -8
  262. package/dist/ResourceRelation-DWhWzKQJ.js +0 -3
  263. package/dist/RoleRelation-CAMzPMFz.js +0 -2
  264. package/dist/RoleSelector-Bqv2p_7X.js +0 -279
  265. package/dist/TenantEdit-BhpSW4w7.js +0 -6
  266. package/dist/UserAuthorization-D5rSSagE.js +0 -4
  267. package/dist/UserEdit-CqrRx717.js +0 -4
  268. package/dist/add-child-CJM7MvB2.js +0 -2
  269. package/dist/animation_item-Wmcl4yBo.js +0 -2
  270. package/dist/authority-BofK2fFE.js +0 -2
  271. package/dist/authorize-Ck1i_5K5.js +0 -2
  272. package/dist/blacklist-disable-BgMERGDX.js +0 -2
  273. package/dist/blacklist-enable-D8ds6NgH.js +0 -2
  274. package/dist/breadcrumb_setting-Bv12pA15.js +0 -111
  275. package/dist/browser-chrome-BVvmyPYW.js +0 -2
  276. package/dist/browser-edge-Bc36eH7f.js +0 -2
  277. package/dist/browser-ie-BiDFft9C.js +0 -2
  278. package/dist/browser-other-BzyOvDmB.js +0 -2
  279. package/dist/browser-safari-CBxgFrI_.js +0 -2
  280. package/dist/browserType-pMY0VZ_3.js +0 -2
  281. package/dist/createAndEditDataPermission-Ll6GWW-p.js +0 -8
  282. package/dist/drawerBlackWhiteList-taaV8A5D.js +0 -3
  283. package/dist/drawerDictionary-D0Bi75vl.js +0 -4
  284. package/dist/drawerDictionaryItem-BqQojUNh.js +0 -4
  285. package/dist/drawerGroup-BI0pYuIO.js +0 -3
  286. package/dist/drawerOrganization-RbLK6k_c.js +0 -3
  287. package/dist/drawerPosition-CKZCt-Yc.js +0 -3
  288. package/dist/drawerRegion-CaXvxWEn.js +0 -3
  289. package/dist/drawerRole-27ggtdnJ.js +0 -6
  290. package/dist/drawerRole-CQURGn5D.js +0 -215
  291. package/dist/drawerRole-D9Dt3l7O.js +0 -5
  292. package/dist/drawerRole-DPC9SVDe.js +0 -3
  293. package/dist/edit-DF7Qsxtl.js +0 -2
  294. package/dist/icard-CtletXtq.js +0 -2
  295. package/dist/icon_animation-Do8Rw-K9.js +0 -2
  296. package/dist/icon_breadcrumb-CmZgmswj.js +0 -2
  297. package/dist/icon_copyright--7CIXSE1.js +0 -2
  298. package/dist/icon_jt--G-Amuu4.js +0 -2
  299. package/dist/icon_layout-BkQems5J.js +0 -2
  300. package/dist/icon_mainpage-98dHnXRL.js +0 -2
  301. package/dist/icon_menu-8foYPA9U.js +0 -2
  302. package/dist/icon_page_size-CPjiZpP2.js +0 -2
  303. package/dist/icon_position_type-Do71e9Ov.js +0 -2
  304. package/dist/icon_safe_manage-DiBn-uSS.js +0 -2
  305. package/dist/icon_screen_scale-Ct8iHVKy.js +0 -2
  306. package/dist/icon_system_manage-CzBNNisy.js +0 -2
  307. package/dist/icon_tabbar-BajHaWfA.js +0 -2
  308. package/dist/icon_toolbar-DHKFZD2w.js +0 -2
  309. package/dist/icon_topbar-C4mu7up7.js +0 -2
  310. package/dist/icon_watermark-2Wtjrft3.js +0 -2
  311. package/dist/log-center-qtOWNEaD.js +0 -2
  312. package/dist/loginHistoryDetail-DDEuFbYB.js +0 -4
  313. package/dist/menu_setting-Cju5OkSE.js +0 -158
  314. package/dist/not-data-BA50qHBT.js +0 -2
  315. package/dist/not-data-BzaRFolb.js +0 -2
  316. package/dist/operateHistoryDetail-CLsHDBp7.js +0 -4
  317. package/dist/org-main-D0M4-Mu2.js +0 -2
  318. package/dist/org-unmain-Bh9hzLgK.js +0 -2
  319. package/dist/other_setting-rbUoVood.js +0 -220
  320. package/dist/page_animation_setting-Diclx4mg.js +0 -117
  321. package/dist/remove-B3pgrGrf.js +0 -2
  322. package/dist/resource-app-BKgfDs09.js +0 -2
  323. package/dist/resource-btn-BXLyUStb.js +0 -2
  324. package/dist/resource-dynamic-Dx3RhbQk.js +0 -2
  325. package/dist/resource-index-C2COvmY-.js +0 -2
  326. package/dist/resource-menu-C_Q6AEFw.js +0 -2
  327. package/dist/resource-micro-D_OBvoET.js +0 -2
  328. package/dist/resource-nonmenu-CCpeV9Km.js +0 -2
  329. package/dist/setItem-CcNK_f8V.js +0 -77
  330. package/dist/setItem-CqHPfTBZ.js +0 -5
  331. package/dist/setting-manage-Di7-Ks18.js +0 -2
  332. package/dist/style.css +0 -2
  333. package/dist/tabbar_setting-Di3OcDig.js +0 -142
  334. package/dist/theme-check-mark-DhhsmM5v.js +0 -2
  335. package/dist/theme-title-DEVFVYNh.js +0 -2
  336. package/dist/view-FR2dRATN.js +0 -2
  337. package/dist/watermark_setting-tqYUcPzF.js +0 -199
  338. package/dist/zddata-D9x-CcqP.js +0 -2
  339. package/dist/zy_checked-B0r0BaR-.js +0 -2
  340. package/dist/zy_default-BHbIn4if.js +0 -2
  341. /package/dist/{HCheckList-DDP7S_nc.js → HCheckList-CmS0Zgjk.js} +0 -0
  342. /package/dist/{OrgAndPosition-BK5MTlOO.js → OrgAndPosition-DYxNkasL.js} +0 -0
  343. /package/dist/{_plugin-vue_export-helper-Cmy-mbsL.js → _plugin-vue_export-helper-DziIhCOI.js} +0 -0
  344. /package/dist/{animation_item-Bf_Y_nyf.js → animation_item-Cg-CB3zX.js} +0 -0
  345. /package/dist/{browserType-BJeH2o0t.js → browserType-E4RCiZfN.js} +0 -0
  346. /package/dist/{configData-BoeH9I4s.js → configData-DQOHeFW2.js} +0 -0
  347. /package/dist/{dayjs.min-KffHrkDe.js → dayjs.min-DcxwBe2I.js} +0 -0
  348. /package/dist/{enum-e5LlvaOv.js → enum-B1DCzyaW.js} +0 -0
  349. /package/dist/{enum-BZtNAeJC.js → enum-BWzxzuim.js} +0 -0
  350. /package/dist/{enum-CtIne-Ul.js → enum-CYW8g64p.js} +0 -0
  351. /package/dist/{enum-BMY6bmPA.js → enum-D0U38jb6.js} +0 -0
  352. /package/dist/{enum-DfCD4cL8.js → enum-VH4_jOj5.js} +0 -0
  353. /package/dist/{log-CQfCPTsC.js → log-hgUXTuhy.js} +0 -0
  354. /package/dist/{stores-DXQ1Ibt6.js → stores-D6JJmBEU.js} +0 -0
@@ -0,0 +1,292 @@
1
+ import { acceptHMRUpdate, defineStore } from 'pinia';
2
+ import { getAllRouteModules, readProjectModules } from 'pubinfo';
3
+
4
+ // WebSocket 消息类型定义
5
+ export interface WebSocketMessage {
6
+ type: 'custom'
7
+ event: 'pubinfo-resolver:update'
8
+ data: {
9
+ action: 'add' | 'unlink'
10
+ file: string
11
+ timestamp: number
12
+ }
13
+ }
14
+
15
+ // 路由树节点接口
16
+ export interface RouteTreeNode {
17
+ title: string
18
+ key: string
19
+ root?: boolean
20
+ module?: boolean
21
+ children?: RouteTreeNode[]
22
+ isLeaf?: boolean
23
+ value?: string
24
+ scope?: string
25
+ }
26
+
27
+ // 模块信息接口
28
+ interface ModuleInfo {
29
+ id: string
30
+ pages: Record<string, string>
31
+ }
32
+
33
+ export const useViewStore = defineStore('view', () => {
34
+ // 主项目页面路径数据
35
+ const projectPages = ref<Record<string, string>>({});
36
+
37
+ // 模块页面路径数据
38
+ const modulePages = ref<Map<string, Record<string, string>>>(new Map()); // 路由树数据
39
+ const routeTree = ref<RouteTreeNode[]>([]);
40
+
41
+ // 最后更新时间
42
+ const lastUpdateTime = ref<number>(0);
43
+
44
+ // WebSocket 连接状态
45
+ const wsConnected = ref<boolean>(false);
46
+
47
+ /**
48
+ * 初始化路由树数据
49
+ */
50
+ function initializeRouteData() {
51
+ // 获取主项目的 pages - 只存储路径
52
+ const projectStructure = readProjectModules();
53
+ const rawProjectPages = projectStructure?.pages || {};
54
+ projectPages.value = Object.keys(rawProjectPages).reduce((acc, key) => {
55
+ acc[key] = key; // 存储路径本身
56
+ return acc;
57
+ }, {} as Record<string, string>);
58
+
59
+ // 获取所有模块的 pages - 只存储路径
60
+ const routeModuleMap = getAllRouteModules();
61
+ const modulePageMap = new Map<string, Record<string, string>>();
62
+ for (const [id, moduleMap] of routeModuleMap) {
63
+ const pathMap = Object.keys(moduleMap).reduce((acc, key) => {
64
+ acc[key] = key; // 存储路径本身
65
+ return acc;
66
+ }, {} as Record<string, string>);
67
+ modulePageMap.set(id, pathMap);
68
+ }
69
+ modulePages.value = modulePageMap;
70
+
71
+ // 构建路由树
72
+ buildRouteTree();
73
+ }
74
+
75
+ /**
76
+ * 构建路由树结构
77
+ */
78
+ function buildRouteTree() {
79
+ const treeNodes: RouteTreeNode[] = [];
80
+
81
+ // 构建本地项目节点
82
+ if (Object.keys(projectPages.value).length > 0) {
83
+ const localPaths = Object.keys(projectPages.value);
84
+
85
+ treeNodes.push(
86
+ buildTreeNode('本地', 'local', localPaths),
87
+ );
88
+ }
89
+
90
+ // 构建模块节点
91
+ for (const [id, moduleMap] of modulePages.value) {
92
+ if (Object.keys(moduleMap).length > 0) {
93
+ treeNodes.push(
94
+ buildTreeNode(id, `module:${id}`, Object.keys(moduleMap), id),
95
+ );
96
+ }
97
+ }
98
+
99
+ routeTree.value = treeNodes;
100
+ }
101
+
102
+ /**
103
+ * 从扁平路径数组构建树节点
104
+ */
105
+ function buildTreeNode(
106
+ label: string,
107
+ keyPrefix: string,
108
+ paths: string[],
109
+ scope?: string,
110
+ ): RouteTreeNode {
111
+ const root: RouteTreeNode = {
112
+ title: label,
113
+ key: keyPrefix,
114
+ root: true,
115
+ module: keyPrefix !== 'local',
116
+ children: [],
117
+ };
118
+
119
+ const findOrCreate = (parent: RouteTreeNode, title: string, key: string) => {
120
+ if (!parent.children) {
121
+ parent.children = [];
122
+ }
123
+ let node = parent.children.find(n => n.title === title && !n.isLeaf);
124
+ if (!node) {
125
+ node = { title, key, children: [] };
126
+ parent.children.push(node);
127
+ }
128
+ return node;
129
+ };
130
+
131
+ for (const p of paths) {
132
+ const segs = p.split('/').filter(Boolean);
133
+ let current = root;
134
+ let acc = keyPrefix;
135
+
136
+ for (let i = 0; i < segs.length; i++) {
137
+ const seg = segs[i];
138
+ acc = acc ? `${acc}/${seg}` : seg;
139
+ const isLast = i === segs.length - 1;
140
+
141
+ if (isLast) {
142
+ // 叶子节点
143
+ current.children = current.children || [];
144
+ current.children.push({
145
+ title: seg,
146
+ key: acc,
147
+ isLeaf: true,
148
+ value: p,
149
+ scope,
150
+ });
151
+ }
152
+ else {
153
+ current = findOrCreate(current, seg, acc);
154
+ }
155
+ }
156
+ }
157
+
158
+ return root;
159
+ }
160
+
161
+ /**
162
+ * 处理 WebSocket 文件变化事件
163
+ */
164
+ function handleFileChange(message: WebSocketMessage) {
165
+ const { action, file, timestamp } = message.data;
166
+
167
+ // 更新时间戳
168
+ lastUpdateTime.value = timestamp;
169
+
170
+ // 根据操作类型处理
171
+ if (action === 'add') {
172
+ handleFileAdd(file);
173
+ }
174
+ else if (action === 'unlink') {
175
+ handleFileRemove(file);
176
+ }
177
+
178
+ // 重新构建路由树
179
+ buildRouteTree();
180
+ }
181
+
182
+ /**
183
+ * 处理文件添加
184
+ */
185
+ function handleFileAdd(filePath: string) {
186
+ // 检查是否是 views 目录下的 .vue 文件
187
+ const relativePath = filePath.replace(/^.*\/src\//, 'src/');
188
+
189
+ if (relativePath.startsWith('src/views/') && relativePath.endsWith('.vue')) {
190
+ // 添加到主项目页面数据
191
+ projectPages.value = {
192
+ ...projectPages.value,
193
+ [relativePath]: relativePath,
194
+ };
195
+ }
196
+ }
197
+
198
+ /**
199
+ * 处理文件删除
200
+ */
201
+ function handleFileRemove(filePath: string) {
202
+ // 检查是否是 views 目录下的 .vue 文件
203
+ const relativePath = filePath.replace(/^.*\/src\//, 'src/');
204
+ if (relativePath.startsWith('src/views/') && relativePath.endsWith('.vue')) {
205
+ // 从主项目页面数据中移除
206
+ const newProjectPages = { ...projectPages.value };
207
+ delete newProjectPages[relativePath];
208
+ projectPages.value = newProjectPages;
209
+ }
210
+ }
211
+
212
+ /**
213
+ * 设置 WebSocket 连接状态
214
+ */
215
+ function setWebSocketConnected(connected: boolean) {
216
+ wsConnected.value = connected;
217
+ }
218
+
219
+ /**
220
+ * 获取路由树数据(用于组件)
221
+ */
222
+ function getRouteTreeData() {
223
+ return routeTree.value;
224
+ }
225
+
226
+ /**
227
+ * 刷新路由树数据
228
+ */
229
+ function refreshRouteTree() {
230
+ initializeRouteData();
231
+ }
232
+
233
+ /**
234
+ * 根据搜索条件过滤树数据
235
+ */
236
+ function filterRouteTree(searchQuery: string): RouteTreeNode[] {
237
+ if (!searchQuery.trim()) {
238
+ return routeTree.value;
239
+ }
240
+
241
+ const q = searchQuery.trim().toLowerCase();
242
+
243
+ const filterNodes = (nodes: RouteTreeNode[]): RouteTreeNode[] => {
244
+ const result: RouteTreeNode[] = [];
245
+
246
+ for (const node of nodes) {
247
+ const title = node.title.toLowerCase();
248
+ const value = (node.value || '').toLowerCase();
249
+ const key = node.key.toLowerCase();
250
+ const selfMatch = title.includes(q) || value.includes(q) || key.includes(q);
251
+
252
+ let filteredChildren: RouteTreeNode[] | undefined;
253
+ if (node.children && node.children.length > 0) {
254
+ filteredChildren = filterNodes(node.children);
255
+ }
256
+
257
+ if (selfMatch || (filteredChildren && filteredChildren.length > 0)) {
258
+ const cloned = { ...node };
259
+ if (filteredChildren) {
260
+ cloned.children = filteredChildren;
261
+ }
262
+ result.push(cloned);
263
+ }
264
+ }
265
+
266
+ return result;
267
+ };
268
+
269
+ return filterNodes(routeTree.value);
270
+ }
271
+
272
+ return {
273
+ // 状态
274
+ projectPages: readonly(projectPages),
275
+ modulePages: readonly(modulePages),
276
+ routeTree: readonly(routeTree),
277
+ lastUpdateTime: readonly(lastUpdateTime),
278
+ wsConnected: readonly(wsConnected),
279
+
280
+ // 方法
281
+ initializeRouteData,
282
+ handleFileChange,
283
+ setWebSocketConnected,
284
+ getRouteTreeData,
285
+ refreshRouteTree,
286
+ filterRouteTree,
287
+ };
288
+ });
289
+
290
+ if (import.meta.hot) {
291
+ import.meta.hot.accept(acceptHMRUpdate(useViewStore, import.meta.hot));
292
+ }
@@ -0,0 +1,53 @@
1
+ import { useWebSocketManager } from '@/composables/useWebSocketManager';
2
+ import { useViewStore } from '@/stores/view';
3
+
4
+ /**
5
+ * 应用启动时的路由数据初始化
6
+ */
7
+ export function initializeRouteSystem() {
8
+ const viewStore = useViewStore();
9
+ const wsManager = useWebSocketManager();
10
+
11
+ try {
12
+ // 初始化路由数据
13
+ viewStore.initializeRouteData();
14
+
15
+ // 初始化 WebSocket 管理器
16
+ wsManager.initializeWebSocket();
17
+
18
+ return {
19
+ viewStore,
20
+ wsManager,
21
+ };
22
+ }
23
+ catch (error) {
24
+ console.error('[RBAC] 路由系统初始化失败:', error);
25
+ throw error;
26
+ }
27
+ }
28
+
29
+ /**
30
+ * 应用关闭时的清理逻辑
31
+ */
32
+ export function cleanupRouteSystem() {
33
+ try {
34
+ const wsManager = useWebSocketManager();
35
+ wsManager.cleanupWebSocket();
36
+ }
37
+ catch (error) {
38
+ console.error('[RBAC] 路由系统清理失败:', error);
39
+ }
40
+ }
41
+
42
+ /**
43
+ * 手动刷新路由数据
44
+ */
45
+ export function refreshRouteSystem() {
46
+ try {
47
+ const viewStore = useViewStore();
48
+ viewStore.refreshRouteTree();
49
+ }
50
+ catch (error) {
51
+ console.error('[RBAC] 路由系统数据刷新失败:', error);
52
+ }
53
+ }
@@ -116,7 +116,7 @@ async function request() {
116
116
  const res = await getRegionGetListByParentId({
117
117
  ...query.value,
118
118
  });
119
- if (Object.keys(chilData.value).length > 0) {
119
+ if (chilData.value && Object.keys(chilData.value).length > 0) {
120
120
  const length = res.data!.length;
121
121
  if (length > 0) {
122
122
  chilData.value.children = res.data?.map((e: API.PubRegion) => {
@@ -1,8 +1,9 @@
1
1
  <script setup lang="ts">
2
2
  import type { TreeProps } from 'ant-design-vue';
3
3
  import { CaretDownOutlined } from '@ant-design/icons-vue';
4
+ import * as popover from '@destyler/popover';
5
+ import { normalizeProps, useMachine } from '@destyler/vue';
4
6
  import { Empty } from 'ant-design-vue';
5
- import { getAllRouteModules, readProjectModules } from 'pubinfo';
6
7
  import ComponentsIcones from '@/components/DirectoryIcones/ComponentsIcones.vue';
7
8
  import FolderIcones from '@/components/DirectoryIcones/FolderIcones.vue';
8
9
  import ModuleIcones from '@/components/DirectoryIcones/ModuleIcones.vue';
@@ -10,6 +11,7 @@ import PackagesIcones from '@/components/DirectoryIcones/PackagesIcones.vue';
10
11
  import SrcIcones from '@/components/DirectoryIcones/SrcIcones.vue';
11
12
  import ViewIcones from '@/components/DirectoryIcones/ViewIcones.vue';
12
13
  import VueIcones from '@/components/DirectoryIcones/VueIcones.vue';
14
+ import { useViewStore } from '@/stores/view';
13
15
 
14
16
  defineOptions({
15
17
  name: 'ComponentSelect',
@@ -17,6 +19,9 @@ defineOptions({
17
19
 
18
20
  const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
19
21
 
22
+ // 使用 Pinia store
23
+ const viewStore = useViewStore();
24
+
20
25
  const moduleValue = defineModel<string>({
21
26
  default: '',
22
27
  });
@@ -25,6 +30,14 @@ const scope = defineModel<string>('scope', {
25
30
  default: '',
26
31
  });
27
32
 
33
+ const searchInputEl = useTemplateRef<HTMLInputElement>('searchInputRef');
34
+
35
+ const [state, send] = useMachine(popover.machine({
36
+ id: useId(),
37
+ initialFocusEl: () => searchInputEl.value,
38
+ }));
39
+ const api = computed(() => popover.connect(state.value, send, normalizeProps));
40
+
28
41
  const visibleRef: Ref<boolean> = ref<boolean>(false);
29
42
  // 搜索关键字
30
43
  const searchQuery = ref('');
@@ -115,131 +128,21 @@ watch(visibleRef, (open) => {
115
128
  }
116
129
  });
117
130
 
118
- // 自定义树形结构
119
- interface ComponentTreeNode {
120
- title: string
121
- key: string
122
- // 是否为根节点(如:'local'/'module:<id>')
123
- root?: boolean
124
- module?: boolean
125
- children?: ComponentTreeNode[]
126
- isLeaf?: boolean
127
- // 额外数据,选择时可用
128
- value?: string
129
- scope?: string
130
- }
131
-
132
- /**
133
- * 从扁平路径数组构建“目录树”节点
134
- * @param label 根节点标题(如:'本地'/'模块名')
135
- * @param keyPrefix 根节点 key(如:'local'/'module:<id>')
136
- * @param paths 叶子路径(views 相对路径)
137
- * @param scope 作用域(模块 id),本地为 undefined
138
- */
139
- function buildTree(label: string, keyPrefix: string, paths: string[], scope?: string): ComponentTreeNode {
140
- const root: ComponentTreeNode = { title: label, key: keyPrefix, root: true, module: keyPrefix !== 'local', children: [] };
141
-
142
- // 便捷查找当前层的子节点
143
- const findOrCreate = (parent: ComponentTreeNode, title: string, key: string) => {
144
- if (!parent.children) {
145
- parent.children = [];
146
- }
147
- let node = parent.children.find(n => n.title === title && !n.isLeaf);
148
- if (!node) {
149
- node = { title, key, children: [] };
150
- parent.children.push(node);
151
- }
152
- return node;
153
- };
154
-
155
- for (const p of paths) {
156
- const segs = p.split('/').filter(Boolean);
157
- let current = root;
158
- let acc = keyPrefix;
159
- for (let i = 0; i < segs.length; i++) {
160
- const seg = segs[i];
161
- acc = acc ? `${acc}/${seg}` : seg;
162
- const isLast = i === segs.length - 1;
163
- if (isLast) {
164
- // 叶子结点携带 value 与 scope 信息
165
- current.children = current.children || [];
166
- current.children.push({
167
- title: seg,
168
- key: acc,
169
- isLeaf: true,
170
- value: p,
171
- scope,
172
- });
173
- }
174
- else {
175
- current = findOrCreate(current, seg, acc);
176
- }
177
- }
178
- }
179
-
180
- return root;
181
- }
182
-
183
- // 计算:树数据,根为“本地”和各模块名,叶子为 views 下的路径
184
- const componentTreeOptions = computed<TreeProps['treeData']>(() => {
185
- // 获取主项目的 pages
186
- const projectStructure = readProjectModules();
187
- const mainPages = projectStructure?.pages || {};
188
-
189
- // 获取所有模块的 pages
190
- const routeModuleMap = getAllRouteModules();
191
-
192
- const treeNodes: ComponentTreeNode[] = [];
193
-
194
- // 本地节点
195
- treeNodes.push(
196
- buildTree('本地', 'local', Object.keys(mainPages)),
197
- );
198
-
199
- // 模块节点
200
- for (const [id, moduleMap] of routeModuleMap) {
201
- treeNodes.push(
202
- buildTree(id, `module:${id}`, Object.keys(moduleMap), id),
203
- );
131
+ // 弹层再次打开时,若之前被手动折叠,重新展开到选中层级
132
+ watch(visibleRef, (open) => {
133
+ if (open) {
134
+ expandToSelected();
204
135
  }
205
-
206
- return treeNodes as unknown as TreeProps['treeData'];
207
136
  });
208
137
 
209
- // 根据搜索关键字过滤树数据,保留匹配节点及其祖先
138
+ // 从 store 获取树数据并支持搜索过滤
210
139
  const displayedTreeData = computed<TreeProps['treeData']>(() => {
211
- const q = searchQuery.value.trim().toLowerCase();
212
- const source = componentTreeOptions.value as any[];
140
+ const q = searchQuery.value.trim();
213
141
  if (!q) {
214
- return source as unknown as TreeProps['treeData'];
142
+ return viewStore.getRouteTreeData() as unknown as TreeProps['treeData'];
215
143
  }
216
144
 
217
- const filterNodes = (nodes: any[]): any[] => {
218
- const res: any[] = [];
219
- for (const n of nodes || []) {
220
- const title = String(n?.title ?? '').toLowerCase();
221
- const value = String(n?.value ?? '').toLowerCase();
222
- const keyStr = String(n?.key ?? '').toLowerCase();
223
- const selfMatch = title.includes(q) || value.includes(q) || keyStr.includes(q);
224
- let childrenFiltered: any[] | undefined;
225
- if (Array.isArray(n?.children) && n.children.length) {
226
- childrenFiltered = filterNodes(n.children);
227
- }
228
- if (selfMatch || (childrenFiltered && childrenFiltered.length)) {
229
- const cloned = { ...n };
230
- if (childrenFiltered) {
231
- cloned.children = childrenFiltered;
232
- }
233
- else if (cloned.children) {
234
- delete cloned.children;
235
- }
236
- res.push(cloned);
237
- }
238
- }
239
- return res;
240
- };
241
-
242
- return filterNodes(source) as unknown as TreeProps['treeData'];
145
+ return viewStore.filterRouteTree(q) as unknown as TreeProps['treeData'];
243
146
  });
244
147
 
245
148
  // 收集非叶子节点 key,用于搜索时全部展开
@@ -287,72 +190,87 @@ function onSelect(keys: (string | number)[], e: any) {
287
190
  </script>
288
191
 
289
192
  <template>
290
- <a-popover
291
- v-model:open="visibleRef"
292
- :arrow="false"
293
- trigger="click"
294
- placement="bottom"
295
- >
296
- <a-input
297
- v-model:value="moduleValue"
298
- :addon-before="scope || '本地'"
299
- placeholder="请输入或选择组件路径(views下的路径)"
300
- />
301
- <template #content>
302
- <div class="w-156 mb-2">
303
- <a-form-item-rest>
304
- <a-input
305
- v-model:value="searchQuery"
306
- allow-clear
307
- size="small"
308
- placeholder="搜索组件或路径"
309
- />
310
- </a-form-item-rest>
311
- </div>
312
- <template v-if="displayedTreeData && displayedTreeData.length">
313
- <a-directory-tree
314
- v-model:expanded-keys="expandedKeysRef"
315
- class="w-156 h-100 overflow-y-auto directory-tree-root"
316
- :selected-keys="selectedKeys"
317
- :tree-data="displayedTreeData"
318
- :show-icon="true"
319
- :show-line="true"
320
- :virtual="true"
321
- expand-action="click"
322
- @expand="onExpand"
323
- @select="onSelect"
193
+ <div class="mt-0">
194
+ <div v-bind="api.getTriggerProps()">
195
+ <a-input
196
+ v-model:value="moduleValue"
197
+ :addon-before="scope || '本地'"
198
+ placeholder="请输入或选择组件路径(views下的路径)"
199
+ />
200
+ </div>
201
+ <!-- 始终挂载 Teleport,内部用 Transition 控制出现/消失动画 -->
202
+ <Teleport to="body">
203
+ <div
204
+ v-if="api.open"
205
+ v-bind="api.getPositionerProps()"
206
+ class="z-1050"
207
+ >
208
+ <div
209
+ v-bind="api.getContentProps()"
210
+ class="z-1050 w-162 rounded-md border border-solid p-4
211
+ border-[--g-border-color] shadow-md outline-none
212
+ bg-#ffffff dark:bg-#141414 text-dark dark:text-light
213
+ data-[state=open]:animate-in data-[state=closed]:animate-out
214
+ data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0
215
+ data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
324
216
  >
325
- <template #switcherIcon="{ switcherCls }">
326
- <CaretDownOutlined :class="switcherCls" />
327
- </template>
328
- <!-- 自定义展开/折叠图标:根节点(local/module:<id>)用包图标,目录与叶子分别用你提供的图标 -->
329
- <template #icon="{ expanded, dataRef }">
330
- <span
331
- class="inline-flex items-center text-inherit not-italic leading-[0] text-center
332
- normal-case [vertical-align:-0.125em] [text-rendering:optimizeLegibility] svg:size-4"
217
+ <div class="w-152 mb-2">
218
+ <a-form-item-rest>
219
+ <a-input
220
+ ref="searchInputRef"
221
+ v-model:value="searchQuery"
222
+ allow-clear
223
+ size="small"
224
+ placeholder="搜索组件或路径"
225
+ />
226
+ </a-form-item-rest>
227
+ </div>
228
+ <template v-if="displayedTreeData && displayedTreeData.length">
229
+ <a-directory-tree
230
+ v-model:expanded-keys="expandedKeysRef"
231
+ class="w-152 h-100 overflow-y-auto directory-tree-root"
232
+ :selected-keys="selectedKeys"
233
+ :tree-data="displayedTreeData"
234
+ :show-icon="true"
235
+ :show-line="true"
236
+ :virtual="true"
237
+ expand-action="click"
238
+ @expand="onExpand"
239
+ @select="onSelect"
333
240
  >
334
- <!-- 根:无 '/' 的 key 表示 -->
335
- <PackagesIcones v-if="dataRef?.root && !dataRef?.module" :expanded="expanded" />
336
- <ModuleIcones v-else-if="dataRef?.root && dataRef?.module" :expanded="expanded" />
337
- <!-- 叶子:Vue 文件图标 -->
338
- <VueIcones v-else-if="dataRef?.isLeaf" />
339
- <!-- 特殊目录 -->
340
- <ComponentsIcones v-else-if="['components', 'component'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
341
- <ViewIcones v-else-if="['views', 'view', 'pages', 'page'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
342
- <SrcIcones v-else-if="['src'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
343
- <!-- 其他目录 -->
344
- <FolderIcones v-else :expanded="expanded" />
345
- </span>
241
+ <template #switcherIcon="{ switcherCls }">
242
+ <CaretDownOutlined :class="switcherCls" />
243
+ </template>
244
+ <!-- 自定义展开/折叠图标:根节点(local/module:<id>)用包图标,目录与叶子分别用你提供的图标 -->
245
+ <template #icon="{ expanded, dataRef }">
246
+ <span
247
+ class="inline-flex items-center text-inherit not-italic leading-[0] text-center
248
+ normal-case [vertical-align:-0.125em] [text-rendering:optimizeLegibility] svg:size-4"
249
+ >
250
+ <!-- 根:无 '/' 的 key 表示 -->
251
+ <PackagesIcones v-if="dataRef?.root && !dataRef?.module" :expanded="expanded" />
252
+ <ModuleIcones v-else-if="dataRef?.root && dataRef?.module" :expanded="expanded" />
253
+ <!-- 叶子:Vue 文件图标 -->
254
+ <VueIcones v-else-if="dataRef?.isLeaf" />
255
+ <!-- 特殊目录 -->
256
+ <ComponentsIcones v-else-if="['components', 'component'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
257
+ <ViewIcones v-else-if="['views', 'view', 'pages', 'page'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
258
+ <SrcIcones v-else-if="['src'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
259
+ <!-- 其他目录 -->
260
+ <FolderIcones v-else :expanded="expanded" />
261
+ </span>
262
+ </template>
263
+ </a-directory-tree>
264
+ </template>
265
+ <template v-else>
266
+ <div class="flex items-center justify-center h-[220px]">
267
+ <a-empty :image="simpleImage" description="没有找到匹配的组件" />
268
+ </div>
346
269
  </template>
347
- </a-directory-tree>
348
- </template>
349
- <template v-else>
350
- <div class="flex items-center justify-center h-[220px]">
351
- <a-empty :image="simpleImage" description="没有找到匹配的组件" />
352
270
  </div>
353
- </template>
354
- </template>
355
- </a-popover>
271
+ </div>
272
+ </Teleport>
273
+ </div>
356
274
  </template>
357
275
 
358
276
  <style>