xto-fronted 0.4.86 → 0.4.88

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 (319) hide show
  1. package/dist/assets/404-C9Uh6Uu-.css +1 -0
  2. package/dist/assets/404-zjGLLssH.js +1 -0
  3. package/dist/assets/index-B5xc4gQB.css +1 -0
  4. package/dist/assets/index-BDgOY6Rp.js +1 -0
  5. package/dist/assets/index-BIoRANs0.js +1 -0
  6. package/dist/assets/index-Bz0BgZQ1.js +1 -0
  7. package/dist/assets/index-CAdztNsv.css +1 -0
  8. package/dist/assets/index-CCXrcISf.css +1 -0
  9. package/dist/assets/{index-eQ-JQMk3.css → index-CfpZmcpk.css} +1 -1
  10. package/dist/assets/index-CwJSA85U.js +1 -0
  11. package/dist/assets/index-CwRA10ac.js +1 -0
  12. package/dist/assets/index-D8NDxq9d.js +1 -0
  13. package/dist/assets/index-DEB6-Iv_.js +2 -0
  14. package/dist/assets/index-DM4Ezclc.css +1 -0
  15. package/dist/assets/index-DYv7nImj.css +1 -0
  16. package/dist/assets/index-t-2Y0KhA.css +1 -0
  17. package/dist/assets/vendor-CUVPinTg.js +13 -0
  18. package/dist/assets/{vue-vendor-05sbU7Th.js → vue-vendor-DeJXJVbN.js} +7 -7
  19. package/dist/assets/{xto-base-BSTP-Yn2.js → xto-base-PwLGsxxb.js} +1 -1
  20. package/dist/assets/{xto-core-cL8BAdce.js → xto-core-CtL4zKiV.js} +1 -1
  21. package/dist/assets/{xto-data-Cw0dv5K5.js → xto-data-bCXQa7fT.js} +1 -1
  22. package/dist/assets/{xto-feedback-CTk0sMCW.js → xto-feedback-CPydp0kn.js} +1 -1
  23. package/dist/assets/{xto-form-C5i2lk3C.js → xto-form-bywohdAf.js} +1 -1
  24. package/dist/assets/{xto-navigation-DHsTg0WG.js → xto-navigation-Bbdpine9.js} +1 -1
  25. package/dist/composables/useI18n.d.ts +30 -0
  26. package/dist/index-BRvi9qW-.js +515 -0
  27. package/dist/index-Bmf0YbVq.js +189 -0
  28. package/dist/index-C2-a5KSQ.js +4233 -0
  29. package/dist/index-D25KzR0I.js +479 -0
  30. package/dist/index-DEYOivza.js +641 -0
  31. package/dist/index.d.ts +5 -0
  32. package/dist/index.es.js +64 -61
  33. package/dist/index.html +9 -9
  34. package/dist/index.umd.js +8 -1
  35. package/dist/stores/index.d.ts +1 -0
  36. package/dist/stores/locale.d.ts +42 -0
  37. package/dist/style.css +1 -1
  38. package/package.json +7 -3
  39. package/src/App.vue +48 -19
  40. package/src/assets/styles/_root.scss +183 -139
  41. package/src/assets/styles/_variables.scss +70 -45
  42. package/src/assets/styles/index.scss +267 -42
  43. package/src/components/Layout/Sidebar.vue +43 -2
  44. package/src/components/Layout/TopMenu.vue +37 -12
  45. package/src/components/Layout/index.vue +1 -0
  46. package/src/composables/useI18n.ts +44 -0
  47. package/src/index.ts +15 -1
  48. package/src/stores/index.ts +2 -1
  49. package/src/stores/locale.ts +67 -0
  50. package/src/types/json-bigint.d.ts +18 -0
  51. package/src/types/xto.d.ts +24 -0
  52. package/src/utils/request.ts +18 -1
  53. package/src/views/dashboard/index.vue +545 -283
  54. package/src/views/error/403.vue +215 -20
  55. package/src/views/error/404.vue +217 -20
  56. package/src/views/login/index.vue +483 -91
  57. package/src/views/system/menu/index.vue +690 -381
  58. package/src/views/system/role/index.vue +583 -304
  59. package/src/views/system/user/index.vue +655 -326
  60. package/dist/assets/404-BNfk6aVM.js +0 -1
  61. package/dist/assets/404-ByYjFnhI.js +0 -1
  62. package/dist/assets/404-CH5_LdtS.css +0 -1
  63. package/dist/assets/404-sqW80Hc-.css +0 -1
  64. package/dist/assets/index-BBhC8PX4.js +0 -1
  65. package/dist/assets/index-BOEFG4lP.css +0 -1
  66. package/dist/assets/index-BSa4SMHI.js +0 -1
  67. package/dist/assets/index-BihVoviB.js +0 -1
  68. package/dist/assets/index-Bmux4tGG.js +0 -1
  69. package/dist/assets/index-BrvR0Fn_.css +0 -1
  70. package/dist/assets/index-C4ZCZoPp.js +0 -1
  71. package/dist/assets/index-CMgRqiaT.js +0 -1
  72. package/dist/assets/index-CUh_s55Z.css +0 -1
  73. package/dist/assets/index-CV768Wu1.js +0 -1
  74. package/dist/assets/index-D0OnMilp.js +0 -1
  75. package/dist/assets/index-D9wlAuR_.js +0 -1
  76. package/dist/assets/index-DPkO-STg.js +0 -1
  77. package/dist/assets/index-DawJb02s.css +0 -1
  78. package/dist/assets/index-DcFOybjo.js +0 -1
  79. package/dist/assets/index-DiHSZ6SJ.js +0 -2
  80. package/dist/assets/index-GDP-IkXE.css +0 -1
  81. package/dist/assets/index-Gx75raue.js +0 -2
  82. package/dist/assets/index-JsZ6rkQj.js +0 -1
  83. package/dist/assets/index-PfV8pzQz.css +0 -1
  84. package/dist/assets/index-Swfu6yvD.css +0 -1
  85. package/dist/assets/vendor-42ANG6Sg.js +0 -6
  86. package/dist/assets/vite-Dw-pgLOX.js +0 -1
  87. package/dist/assets/vue-vendor-Br-l7wbK.js +0 -29
  88. package/dist/assets/xto-base-C-IBqjVs.js +0 -1
  89. package/dist/assets/xto-base-C6eqMPdO.css +0 -1
  90. package/dist/assets/xto-core-DZK7Cyg0.js +0 -1
  91. package/dist/assets/xto-data-BFpiDgJi.js +0 -1
  92. package/dist/assets/xto-data-CnAQAQH2.css +0 -1
  93. package/dist/assets/xto-feedback-B2M02fn3.js +0 -1
  94. package/dist/assets/xto-feedback-ByaS-C7_.css +0 -1
  95. package/dist/assets/xto-form-CrsyAjyr.css +0 -1
  96. package/dist/assets/xto-form-NRjKKNcY.js +0 -1
  97. package/dist/assets/xto-layout-D1stVnJI.css +0 -1
  98. package/dist/assets/xto-navigation-BuRQVoD8.css +0 -1
  99. package/dist/assets/xto-navigation-qLRTxo68.js +0 -1
  100. package/dist/index-0h_oG71z.js +0 -345
  101. package/dist/index-1EEezXR3.js +0 -142
  102. package/dist/index-1EkaJDoD.js +0 -142
  103. package/dist/index-1VN-SSaj.js +0 -2873
  104. package/dist/index-23nX2t9j.js +0 -142
  105. package/dist/index-2RwL0s53.js +0 -142
  106. package/dist/index-2tvOdd6w.js +0 -372
  107. package/dist/index-3zeoNaqT.js +0 -345
  108. package/dist/index-8oCLh51t.js +0 -475
  109. package/dist/index-AF5JN8Up.js +0 -142
  110. package/dist/index-B02xiP9g.js +0 -372
  111. package/dist/index-B05xso4D.js +0 -345
  112. package/dist/index-B1VS4tRU.js +0 -475
  113. package/dist/index-B3_VQZ-d.js +0 -372
  114. package/dist/index-B3kL6i_g.js +0 -345
  115. package/dist/index-B4Wny0vt.js +0 -345
  116. package/dist/index-B5RdBQ-f.js +0 -475
  117. package/dist/index-B5rbuoWS.js +0 -2835
  118. package/dist/index-BAFpPlnI.js +0 -475
  119. package/dist/index-BAJakzRz.js +0 -142
  120. package/dist/index-BAOHlfVd.js +0 -142
  121. package/dist/index-BAzJWzWG.js +0 -2852
  122. package/dist/index-BEIxh_R3.js +0 -2982
  123. package/dist/index-BEWrRNps.js +0 -475
  124. package/dist/index-BFtKVmzo.js +0 -142
  125. package/dist/index-BHPrW1wN.js +0 -142
  126. package/dist/index-BHQIqN1E.js +0 -372
  127. package/dist/index-BHZ_y8lp.js +0 -2067
  128. package/dist/index-BHvnTk5Z.js +0 -475
  129. package/dist/index-BIf7CYCW.js +0 -475
  130. package/dist/index-BK1Y1z9_.js +0 -142
  131. package/dist/index-BK8qDl14.js +0 -372
  132. package/dist/index-BKnta6nv.js +0 -372
  133. package/dist/index-BLIem13z.js +0 -345
  134. package/dist/index-BNBv_FCu.js +0 -142
  135. package/dist/index-BNwtCm83.js +0 -345
  136. package/dist/index-BOEMA7WH.js +0 -345
  137. package/dist/index-BOwDukt-.js +0 -2346
  138. package/dist/index-BR9WVjrV.js +0 -2851
  139. package/dist/index-BRMkw154.js +0 -475
  140. package/dist/index-BRQBannD.js +0 -345
  141. package/dist/index-BShKtLTm.js +0 -475
  142. package/dist/index-BVpqTdd2.js +0 -3132
  143. package/dist/index-BWGQANAN.js +0 -2851
  144. package/dist/index-BZKw7U60.js +0 -475
  145. package/dist/index-BadGWG4q.js +0 -475
  146. package/dist/index-BbeWpCd3.js +0 -345
  147. package/dist/index-BeUYNx5P.js +0 -475
  148. package/dist/index-BgiGtxRr.js +0 -142
  149. package/dist/index-BhKJLk9M.js +0 -2824
  150. package/dist/index-BijsKQ3r.js +0 -475
  151. package/dist/index-BjEfspqP.js +0 -475
  152. package/dist/index-BjEnT8WQ.js +0 -372
  153. package/dist/index-BpOcz1m4.js +0 -142
  154. package/dist/index-BrRdLbLB.js +0 -142
  155. package/dist/index-BsHOXfCq.js +0 -372
  156. package/dist/index-Bt5ocakb.js +0 -475
  157. package/dist/index-BtE24Mt4.js +0 -142
  158. package/dist/index-BvcBQjw6.js +0 -2836
  159. package/dist/index-C0krZRWf.js +0 -2859
  160. package/dist/index-C1cKUqmA.js +0 -372
  161. package/dist/index-C3ANmIDM.js +0 -475
  162. package/dist/index-C5JrEkwD.js +0 -345
  163. package/dist/index-C5m4qNMQ.js +0 -2851
  164. package/dist/index-C69vu_ot.js +0 -3147
  165. package/dist/index-C6Um6eFy.js +0 -475
  166. package/dist/index-C75ePQYC.js +0 -372
  167. package/dist/index-C7wKLGhC.js +0 -142
  168. package/dist/index-C8DBDnxx.js +0 -2836
  169. package/dist/index-CAnqlIjX.js +0 -475
  170. package/dist/index-CB36fztK.js +0 -345
  171. package/dist/index-CBKo6Enz.js +0 -345
  172. package/dist/index-CBcuyFIa.js +0 -2326
  173. package/dist/index-CCxIu4ex.js +0 -372
  174. package/dist/index-CD1ZEMzL.js +0 -2836
  175. package/dist/index-CDx-6tvY.js +0 -345
  176. package/dist/index-CGrvOpdb.js +0 -372
  177. package/dist/index-CHJWNf3f.js +0 -475
  178. package/dist/index-CIb06BxE.js +0 -372
  179. package/dist/index-CLiJcB9v.js +0 -142
  180. package/dist/index-CNS6Ohfw.js +0 -2853
  181. package/dist/index-COkjB5Jm.js +0 -142
  182. package/dist/index-CS5h1O5W.js +0 -345
  183. package/dist/index-CT0deRSL.js +0 -372
  184. package/dist/index-CTQQBaf4.js +0 -345
  185. package/dist/index-CUAC0ZFB.js +0 -475
  186. package/dist/index-CVMV9Tfg.js +0 -142
  187. package/dist/index-CWOx59Vc.js +0 -142
  188. package/dist/index-CWdSR99B.js +0 -372
  189. package/dist/index-CWvOcS8Y.js +0 -345
  190. package/dist/index-C_8yJlf1.js +0 -475
  191. package/dist/index-C_MzXmh2.js +0 -2830
  192. package/dist/index-Cb7HXiBR.js +0 -372
  193. package/dist/index-CbA8oUvZ.js +0 -142
  194. package/dist/index-CbEIzXG9.js +0 -475
  195. package/dist/index-Cb_m0zz1.js +0 -475
  196. package/dist/index-Cc6HgGzc.js +0 -142
  197. package/dist/index-CcWdW9Mj.js +0 -372
  198. package/dist/index-CdAqkP8L.js +0 -345
  199. package/dist/index-CeVUHSt9.js +0 -2847
  200. package/dist/index-CejRpy0a.js +0 -475
  201. package/dist/index-Cg5wO_jJ.js +0 -372
  202. package/dist/index-CgZM1vHq.js +0 -372
  203. package/dist/index-CgofFg1D.js +0 -372
  204. package/dist/index-ChheXGDK.js +0 -372
  205. package/dist/index-ChuFHoI0.js +0 -372
  206. package/dist/index-CiOJZ6_b.js +0 -372
  207. package/dist/index-ClCWmz_7.js +0 -2844
  208. package/dist/index-CmajGrKA.js +0 -142
  209. package/dist/index-Cn_4o3fi.js +0 -345
  210. package/dist/index-CoJBI1vE.js +0 -345
  211. package/dist/index-CqLLaQ-P.js +0 -372
  212. package/dist/index-CsRhLwmR.js +0 -475
  213. package/dist/index-CttJvDTG.js +0 -475
  214. package/dist/index-Cu3m9UeX.js +0 -345
  215. package/dist/index-CyQbOMHa.js +0 -2859
  216. package/dist/index-D-NcbLKL.js +0 -345
  217. package/dist/index-D0gstkiI.js +0 -2836
  218. package/dist/index-D0krzDtx.js +0 -475
  219. package/dist/index-D1moFd4V.js +0 -372
  220. package/dist/index-D2Hs4bZj.js +0 -345
  221. package/dist/index-D4QhrTZs.js +0 -475
  222. package/dist/index-D6CC02F-.js +0 -372
  223. package/dist/index-D6s7Za5s.js +0 -142
  224. package/dist/index-D7i5bck2.js +0 -3132
  225. package/dist/index-D8YBeNfn.js +0 -345
  226. package/dist/index-D93bv6lU.js +0 -372
  227. package/dist/index-DAX_bFj5.js +0 -142
  228. package/dist/index-DBii9cjr.js +0 -475
  229. package/dist/index-DBzpSkNi.js +0 -345
  230. package/dist/index-DCuKNBck.js +0 -3153
  231. package/dist/index-DE3uKf0K.js +0 -142
  232. package/dist/index-DGAqp0QX.js +0 -372
  233. package/dist/index-DGh_w_v1.js +0 -475
  234. package/dist/index-DItKvJyI.js +0 -475
  235. package/dist/index-DKAyB0fv.js +0 -345
  236. package/dist/index-DKN4xsXi.js +0 -2851
  237. package/dist/index-DN_iIn8V.js +0 -345
  238. package/dist/index-DONIBpuJ.js +0 -345
  239. package/dist/index-DPDK8Ht4.js +0 -2851
  240. package/dist/index-DPr3ldST.js +0 -2354
  241. package/dist/index-DS1wfdxM.js +0 -142
  242. package/dist/index-DUW5cCh8.js +0 -372
  243. package/dist/index-DUv28uVd.js +0 -142
  244. package/dist/index-DVS-5SZn.js +0 -475
  245. package/dist/index-DWI51JAp.js +0 -372
  246. package/dist/index-DWVmEexu.js +0 -475
  247. package/dist/index-DXf9wUqQ.js +0 -142
  248. package/dist/index-DXmB-sjP.js +0 -345
  249. package/dist/index-DY_e_Dxv.js +0 -372
  250. package/dist/index-DZar-us7.js +0 -142
  251. package/dist/index-D_nwqVrw.js +0 -2847
  252. package/dist/index-DbEeir7h.js +0 -2834
  253. package/dist/index-Dbf5ypbh.js +0 -142
  254. package/dist/index-DcSK-2pt.js +0 -345
  255. package/dist/index-DclK-Mc7.js +0 -2864
  256. package/dist/index-DcnzaxVi.js +0 -142
  257. package/dist/index-Dd8PlF0M.js +0 -2857
  258. package/dist/index-DdkVT39s.js +0 -345
  259. package/dist/index-DeLbU1t-.js +0 -345
  260. package/dist/index-DfV_J8Te.js +0 -345
  261. package/dist/index-DgPnNd8U.js +0 -475
  262. package/dist/index-Dg_JLa7s.js +0 -345
  263. package/dist/index-Di2VPQjn.js +0 -345
  264. package/dist/index-DibHUbqc.js +0 -372
  265. package/dist/index-DjCVSrpw.js +0 -475
  266. package/dist/index-Djdb936p.js +0 -142
  267. package/dist/index-DmFL_GSt.js +0 -142
  268. package/dist/index-DmP4X2k0.js +0 -372
  269. package/dist/index-DmtmRd1r.js +0 -372
  270. package/dist/index-Dn8MA3kh.js +0 -475
  271. package/dist/index-Do7uXDSi.js +0 -2071
  272. package/dist/index-Dpv1M9Hu.js +0 -372
  273. package/dist/index-DqUuZC8f.js +0 -372
  274. package/dist/index-DtEXQIjn.js +0 -372
  275. package/dist/index-Dtw-qZ0V.js +0 -372
  276. package/dist/index-Dv3hIz8H.js +0 -345
  277. package/dist/index-Dv9jnaWp.js +0 -345
  278. package/dist/index-Dw8KZwGJ.js +0 -2354
  279. package/dist/index-DwJILh-Q.js +0 -3149
  280. package/dist/index-DwzGV3B9.js +0 -142
  281. package/dist/index-DyybaRkK.js +0 -345
  282. package/dist/index-DzerABZq.js +0 -372
  283. package/dist/index-F53NVkhc.js +0 -142
  284. package/dist/index-Fl0_k4XF.js +0 -475
  285. package/dist/index-HMYRCPrs.js +0 -2326
  286. package/dist/index-I49wpmT-.js +0 -372
  287. package/dist/index-IPv1O8Zq.js +0 -345
  288. package/dist/index-JLqnaery.js +0 -372
  289. package/dist/index-JRCQ1CYj.js +0 -142
  290. package/dist/index-L86-iO8O.js +0 -345
  291. package/dist/index-Q56EoFor.js +0 -142
  292. package/dist/index-QxKMr6p0.js +0 -2829
  293. package/dist/index-THRvW9Xm.js +0 -2856
  294. package/dist/index-WIUmTlfL.js +0 -345
  295. package/dist/index-WRrsK0pR.js +0 -475
  296. package/dist/index-Wq652QGf.js +0 -2836
  297. package/dist/index-YnSLCdjP.js +0 -475
  298. package/dist/index-Ynf0lvBE.js +0 -142
  299. package/dist/index-_OtTmb9i.js +0 -142
  300. package/dist/index-_oqoy_3D.js +0 -142
  301. package/dist/index-cl4Y-BWw.js +0 -475
  302. package/dist/index-d_eHJkDW.js +0 -475
  303. package/dist/index-dnmEyUWB.js +0 -372
  304. package/dist/index-dz6CwD6A.js +0 -142
  305. package/dist/index-g4rkaRry.js +0 -475
  306. package/dist/index-g9bRMdAX.js +0 -142
  307. package/dist/index-h4z4-a2p.js +0 -2852
  308. package/dist/index-h7BhcQYM.js +0 -475
  309. package/dist/index-hI3qofTF.js +0 -345
  310. package/dist/index-iyQQumAA.js +0 -372
  311. package/dist/index-js_OhKON.js +0 -345
  312. package/dist/index-kgb4MdHr.js +0 -475
  313. package/dist/index-logKl0VM.js +0 -3144
  314. package/dist/index-lrFMrOlR.js +0 -3132
  315. package/dist/index-mEHxtQWj.js +0 -372
  316. package/dist/index-mNm1BV3n.js +0 -2857
  317. package/dist/index-oOzAFXfr.js +0 -142
  318. package/dist/index-s3vGq0ro.js +0 -345
  319. package/dist/index-wt7AbUqc.js +0 -2342
@@ -1,2829 +0,0 @@
1
- import { ref as k, computed as w, watch as Qe, defineComponent as Q, openBlock as i, createElementBlock as v, normalizeClass as O, createElementVNode as e, withDirectives as Ze, toDisplayString as C, unref as a, vShow as mt, createVNode as f, withCtx as I, Fragment as F, renderList as Y, createBlock as V, createTextVNode as ve, createCommentVNode as j, onMounted as ze, onUnmounted as Ae, withModifiers as Ie, Transition as Te, withKeys as et, vModelText as pt, normalizeStyle as ke, resolveComponent as vt, reactive as Re } from "vue";
2
- import { useRoute as ue, useRouter as te, createRouter as Oe, createWebHistory as Ve } from "vue-router";
3
- import { defineStore as Ee } from "pinia";
4
- import { Menu as Fe, SubMenu as tt, MenuItem as we, Tabs as ht, TabPane as _t } from "@xto/navigation";
5
- import { Icon as S, Button as Ue } from "@xto/base";
6
- import { Drawer as Be, Message as ee } from "@xto/feedback";
7
- import { Form as ft, FormItem as xe, Input as Xe, Checkbox as gt } from "@xto/form";
8
- import yt from "axios";
9
- const ge = "xto_", st = (t) => ({
10
- get(s) {
11
- const o = t.getItem(ge + s);
12
- if (!o) return null;
13
- try {
14
- return JSON.parse(o);
15
- } catch {
16
- return o;
17
- }
18
- },
19
- set(s, o) {
20
- if (o == null) {
21
- t.removeItem(ge + s);
22
- return;
23
- }
24
- const r = typeof o == "string" ? o : JSON.stringify(o);
25
- t.setItem(ge + s, r);
26
- },
27
- remove(s) {
28
- t.removeItem(ge + s);
29
- },
30
- clear() {
31
- Object.keys(t).forEach((o) => {
32
- o.startsWith(ge) && t.removeItem(o);
33
- });
34
- }
35
- }), Ce = st(window.localStorage), $e = st(window.sessionStorage), b = {
36
- get: Ce.get,
37
- set: Ce.set,
38
- remove: Ce.remove,
39
- clear: Ce.clear
40
- }, jn = {
41
- get: $e.get,
42
- set: $e.set,
43
- remove: $e.remove,
44
- clear: $e.clear
45
- }, se = Ee("app", () => {
46
- const t = k(b.get("appName") || "XTO App"), s = k(b.get("indexPath") || "/dashboard"), o = k(b.get("isDark") || !1), r = k(b.get("theme") || "light"), l = k(b.get("layout") || "sidebar"), d = k(b.get("isCollapsed") || !1), L = k(b.get("showTabs") ?? !0), _ = k(b.get("showFooter") ?? !0), g = k(b.get("showBreadcrumb") ?? !0), p = k(b.get("primaryColor") || "#409eff"), h = k([]), u = k(b.get("activeTopMenuPath") || ""), y = w(() => o.value ? "dark" : "light"), D = (M) => {
47
- t.value = M, b.set("appName", M);
48
- }, T = (M) => {
49
- s.value = M, b.set("indexPath", M);
50
- }, z = () => {
51
- o.value = !o.value, r.value = o.value ? "dark" : "light", A();
52
- }, R = (M) => {
53
- r.value = M, o.value = M === "dark", A();
54
- }, A = () => {
55
- const M = document.documentElement;
56
- o.value ? M.classList.add("dark") : M.classList.remove("dark"), b.set("isDark", o.value), b.set("theme", r.value);
57
- }, B = () => {
58
- d.value = !d.value, b.set("isCollapsed", d.value);
59
- }, q = (M) => {
60
- l.value = M, b.set("layout", M), M !== "mix" && (u.value = "", b.remove("activeTopMenuPath"));
61
- }, U = (M) => {
62
- u.value = M, b.set("activeTopMenuPath", M);
63
- }, W = () => {
64
- L.value = !L.value, b.set("showTabs", L.value);
65
- }, N = () => {
66
- _.value = !_.value, b.set("showFooter", _.value);
67
- }, K = () => {
68
- g.value = !g.value, b.set("showBreadcrumb", g.value);
69
- }, oe = (M) => {
70
- p.value = M, document.documentElement.style.setProperty("--color-primary", M), b.set("primaryColor", M);
71
- }, H = (M) => {
72
- h.value.includes(M) || h.value.push(M);
73
- }, ne = (M) => {
74
- const Z = h.value.indexOf(M);
75
- Z > -1 && h.value.splice(Z, 1);
76
- }, ae = () => {
77
- h.value = [];
78
- }, le = () => {
79
- A(), p.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", p.value);
80
- };
81
- return Qe(o, A), {
82
- appName: t,
83
- indexPath: s,
84
- isDark: o,
85
- theme: r,
86
- layout: l,
87
- isCollapsed: d,
88
- showTabs: L,
89
- showFooter: _,
90
- showBreadcrumb: g,
91
- primaryColor: p,
92
- cachedViews: h,
93
- activeTopMenuPath: u,
94
- themeClass: y,
95
- setAppName: D,
96
- setIndexPath: T,
97
- toggleTheme: z,
98
- toggleCollapse: B,
99
- setTheme: R,
100
- setLayout: q,
101
- setActiveTopMenuPath: U,
102
- toggleTabs: W,
103
- toggleFooter: N,
104
- toggleBreadcrumb: K,
105
- setPrimaryColor: oe,
106
- addCachedView: H,
107
- removeCachedView: ne,
108
- clearCachedViews: ae,
109
- initTheme: le
110
- };
111
- }), Pe = "menu_list", kt = {
112
- menuCode: "home",
113
- menuName: "首页",
114
- menuUrl: "/dashboard",
115
- icon: "home",
116
- closable: !1,
117
- isDefault: !1,
118
- isOut: !1
119
- }, ce = Ee("menu", () => {
120
- const t = k(b.get(Pe) || []), s = w(() => t.value.length > 0);
121
- return {
122
- menuList: t,
123
- hasMenu: s,
124
- setMenuList: (l) => {
125
- t.value = [kt, ...l], b.set(Pe, t.value);
126
- },
127
- clearMenu: () => {
128
- t.value = [], b.remove(Pe);
129
- }
130
- };
131
- }), ot = "/vite.svg", De = "user_info", G = Ee("user", () => {
132
- const t = k(b.get(De)), s = w(() => !!t.value), o = w(() => {
133
- var u;
134
- return ((u = t.value) == null ? void 0 : u.userId) || "";
135
- }), r = w(() => {
136
- var u;
137
- return ((u = t.value) == null ? void 0 : u.userName) || "";
138
- }), l = w(() => {
139
- var u;
140
- return ((u = t.value) == null ? void 0 : u.departmentName) || "";
141
- }), d = w(() => {
142
- var u;
143
- return ((u = t.value) == null ? void 0 : u.email) || "";
144
- }), L = w(() => {
145
- var u;
146
- return ((u = t.value) == null ? void 0 : u.mobilePhone) || "";
147
- }), _ = w(() => {
148
- var u;
149
- return ((u = t.value) == null ? void 0 : u.positionName) || "";
150
- }), g = w(() => {
151
- var u;
152
- return ((u = t.value) == null ? void 0 : u.avatar) || "";
153
- });
154
- return {
155
- userInfo: t,
156
- isLoggedIn: s,
157
- userId: o,
158
- userName: r,
159
- departmentName: l,
160
- email: d,
161
- mobilePhone: L,
162
- positionName: _,
163
- avatar: g,
164
- setUserInfo: (u) => {
165
- t.value = u, b.set(De, u);
166
- },
167
- clearUserInfo: () => {
168
- t.value = null, b.remove(De);
169
- }
170
- };
171
- }), Ke = "token", je = "token_type", qe = "refresh_token", Ye = "expires_time", We = "refresh_time", He = "code", Ne = () => b.get(Ke), wt = (t) => {
172
- b.set(Ke, t);
173
- }, bt = () => b.get(je), xt = (t) => {
174
- b.set(je, t);
175
- }, qn = () => b.get(qe), Ct = (t) => {
176
- b.set(qe, t);
177
- }, $t = () => b.get(Ye), Tt = (t) => {
178
- b.set(Ye, t);
179
- }, Yn = () => b.get(We), Lt = (t) => {
180
- b.set(We, t);
181
- }, Wn = () => b.get(He), Mt = (t) => {
182
- b.set(He, t);
183
- }, nt = (t) => {
184
- wt(t.access_token), xt(t.token_type || "Bearer"), Ct(t.refresh_token), Tt(t.expires_time), Lt(t.refresh_time), t.code && Mt(t.code);
185
- }, at = () => {
186
- b.remove(Ke), b.remove(je), b.remove(qe), b.remove(Ye), b.remove(We), b.remove(He);
187
- }, St = () => {
188
- const t = $t();
189
- return t ? Date.now() > t : !0;
190
- }, lt = () => !!Ne() && !St(), be = Ee("auth", () => {
191
- const t = k(Ne()), s = w(() => lt()), o = k(""), r = k(""), l = k(""), d = k("/login");
192
- return {
193
- token: t,
194
- isLoggedIn: s,
195
- baseUrl: o,
196
- appId: r,
197
- clientId: l,
198
- loginPath: d,
199
- login: (y) => {
200
- t.value = y.access_token, nt(y);
201
- },
202
- logout: () => {
203
- t.value = null, at();
204
- },
205
- setBaseUrl: (y) => {
206
- o.value = y;
207
- },
208
- setAppId: (y) => {
209
- r.value = y;
210
- },
211
- setClientId: (y) => {
212
- l.value = y;
213
- },
214
- setLoginPath: (y) => {
215
- d.value = y;
216
- }
217
- };
218
- }), It = { class: "sidebar__logo" }, Et = { class: "sidebar__menu-icon" }, Ut = {
219
- key: 1,
220
- class: "sidebar__menu-char"
221
- }, Nt = { class: "sidebar__menu-icon" }, Pt = {
222
- key: 1,
223
- class: "sidebar__menu-char"
224
- }, Dt = { class: "sidebar__menu-icon" }, zt = {
225
- key: 1,
226
- class: "sidebar__menu-char"
227
- }, At = {
228
- key: 0,
229
- class: "sidebar__user"
230
- }, Rt = { class: "sidebar__user-info" }, Ot = { class: "sidebar__user-name" }, Vt = { class: "sidebar__user-role" }, Ft = /* @__PURE__ */ Q({
231
- __name: "Sidebar",
232
- props: {
233
- menuList: { default: () => [] }
234
- },
235
- setup(t) {
236
- const s = t, o = ue(), r = te(), l = ce(), d = G(), L = be(), _ = se(), g = w(() => s.menuList.length > 0 ? s.menuList : l.menuList), p = w(() => _.isCollapsed), h = w(() => o.path), u = w(() => _.isDark ? "#1d1e1f" : "#fff"), y = w(() => _.isDark ? "#cfd3dc" : "#303133"), D = w(() => "#409eff"), T = (U) => {
237
- U && U !== o.path && r.push(U);
238
- }, z = () => {
239
- L.logout(), d.clearUserInfo(), l.clearMenu(), r.push("/login");
240
- }, R = /* @__PURE__ */ new Set([
241
- "arrow-up",
242
- "arrow-down",
243
- "arrow-left",
244
- "arrow-right",
245
- "caret-down",
246
- "caret-right",
247
- "plus",
248
- "minus",
249
- "close",
250
- "check",
251
- "edit",
252
- "delete",
253
- "copy",
254
- "download",
255
- "upload",
256
- "refresh",
257
- "search",
258
- "filter",
259
- "more",
260
- "setting",
261
- "share",
262
- "loading",
263
- "info",
264
- "success",
265
- "warning",
266
- "error",
267
- "question",
268
- "user",
269
- "user-add",
270
- "user-group",
271
- "logout",
272
- "login",
273
- "file",
274
- "folder",
275
- "folder-open",
276
- "document",
277
- "image",
278
- "video",
279
- "music",
280
- "camera",
281
- "mail",
282
- "phone",
283
- "chat",
284
- "bell",
285
- "message",
286
- "eye",
287
- "eye-off",
288
- "calendar",
289
- "clock",
290
- "history",
291
- "timer",
292
- "location",
293
- "map",
294
- "globe",
295
- "star",
296
- "heart",
297
- "thumb-up",
298
- "link",
299
- "external-link",
300
- "lock",
301
- "unlock",
302
- "key",
303
- "home",
304
- "menu",
305
- "menu-fold",
306
- "menu-unfold",
307
- "sidebar-fold",
308
- "sidebar-expand",
309
- "sidebar-left",
310
- "dashboard",
311
- "chart",
312
- "chart-pie",
313
- "chart-line",
314
- "report",
315
- "analytics",
316
- "system",
317
- "permission",
318
- "role",
319
- "user-manage",
320
- "log",
321
- "notification",
322
- "app",
323
- "list",
324
- "grid",
325
- "fullscreen",
326
- "fullscreen-exit",
327
- "zoom-in",
328
- "zoom-out",
329
- "print",
330
- "bookmark",
331
- "tag",
332
- "code",
333
- "terminal",
334
- "database",
335
- "server",
336
- "cloud",
337
- "gift",
338
- "moon",
339
- "sun",
340
- "theme",
341
- "skin"
342
- ]), A = (U) => {
343
- if (!U || U === "") return "";
344
- if (U.startsWith("tineco-icon-")) {
345
- const N = U.replace("tineco-icon-", "");
346
- return {
347
- home: "home",
348
- dashboard: "dashboard",
349
- system: "system",
350
- user: "user",
351
- role: "role",
352
- menu: "list",
353
- setting: "setting",
354
- file: "file",
355
- folder: "folder",
356
- chart: "chart",
357
- report: "report",
358
- analytics: "analytics"
359
- }[N] || N;
360
- }
361
- return {
362
- dashboard: "dashboard",
363
- system: "system",
364
- user: "user",
365
- role: "role",
366
- menu: "list",
367
- setting: "setting",
368
- home: "home",
369
- chart: "chart",
370
- report: "report",
371
- analytics: "analytics",
372
- permission: "permission",
373
- log: "log",
374
- notification: "notification",
375
- app: "app",
376
- list: "list",
377
- grid: "grid"
378
- }[U] || U;
379
- }, B = (U) => U ? U.charAt(0) : "", q = (U) => R.has(U);
380
- return (U, W) => (i(), v("div", {
381
- class: O(["sidebar", { "sidebar--collapsed": p.value }])
382
- }, [
383
- e("div", It, [
384
- W[0] || (W[0] = e("img", {
385
- src: ot,
386
- alt: "Logo",
387
- class: "sidebar__logo-img"
388
- }, null, -1)),
389
- Ze(e("span", { class: "sidebar__logo-text" }, C(a(_).appName), 513), [
390
- [mt, !p.value]
391
- ])
392
- ]),
393
- f(a(Fe), {
394
- "default-active": h.value,
395
- mode: "vertical",
396
- collapse: p.value,
397
- "collapse-transition": !1,
398
- "background-color": u.value,
399
- "text-color": y.value,
400
- "active-text-color": D.value,
401
- class: "sidebar__menu",
402
- onSelect: T
403
- }, {
404
- default: I(() => [
405
- (i(!0), v(F, null, Y(g.value, (N) => (i(), v(F, {
406
- key: N.menuUrl
407
- }, [
408
- N.children && N.children.length > 0 ? (i(), V(a(tt), {
409
- key: 0,
410
- index: N.menuUrl
411
- }, {
412
- title: I(() => [
413
- e("span", Et, [
414
- q(A(N.icon)) ? (i(), V(a(S), {
415
- key: 0,
416
- name: A(N.icon),
417
- size: 16
418
- }, null, 8, ["name"])) : (i(), v("span", Ut, C(B(N.menuName)), 1))
419
- ]),
420
- e("span", null, C(N.menuName), 1)
421
- ]),
422
- default: I(() => [
423
- (i(!0), v(F, null, Y(N.children, (K) => (i(), V(a(we), {
424
- key: K.menuUrl,
425
- index: K.menuUrl
426
- }, {
427
- default: I(() => [
428
- e("span", Nt, [
429
- q(A(K.icon)) ? (i(), V(a(S), {
430
- key: 0,
431
- name: A(K.icon),
432
- size: 16
433
- }, null, 8, ["name"])) : (i(), v("span", Pt, C(B(K.menuName)), 1))
434
- ]),
435
- e("span", null, C(K.menuName), 1)
436
- ]),
437
- _: 2
438
- }, 1032, ["index"]))), 128))
439
- ]),
440
- _: 2
441
- }, 1032, ["index"])) : (i(), V(a(we), {
442
- key: 1,
443
- index: N.menuUrl
444
- }, {
445
- default: I(() => [
446
- e("span", Dt, [
447
- q(A(N.icon)) ? (i(), V(a(S), {
448
- key: 0,
449
- name: A(N.icon),
450
- size: 16
451
- }, null, 8, ["name"])) : (i(), v("span", zt, C(B(N.menuName)), 1))
452
- ]),
453
- e("span", null, C(N.menuName), 1)
454
- ]),
455
- _: 2
456
- }, 1032, ["index"]))
457
- ], 64))), 128))
458
- ]),
459
- _: 1
460
- }, 8, ["default-active", "collapse", "background-color", "text-color", "active-text-color"]),
461
- p.value ? j("", !0) : (i(), v("div", At, [
462
- e("div", Rt, [
463
- e("span", Ot, C(a(d).userName), 1),
464
- e("span", Vt, C(a(d).departmentName), 1)
465
- ]),
466
- f(a(Ue), {
467
- type: "text",
468
- size: "small",
469
- onClick: z
470
- }, {
471
- default: I(() => [...W[1] || (W[1] = [
472
- ve("退出", -1)
473
- ])]),
474
- _: 1
475
- })
476
- ]))
477
- ], 2));
478
- }
479
- }), X = (t, s) => {
480
- const o = t.__vccOpts || t;
481
- for (const [r, l] of s)
482
- o[r] = l;
483
- return o;
484
- }, Je = /* @__PURE__ */ X(Ft, [["__scopeId", "data-v-480fc818"]]), Bt = { class: "header" }, Kt = { class: "header__left" }, jt = {
485
- key: 0,
486
- class: "header__breadcrumb"
487
- }, qt = {
488
- key: 0,
489
- class: "breadcrumb-separator"
490
- }, Yt = { class: "header__right" }, Wt = ["title"], Ht = { class: "header__avatar" }, Gt = { class: "header__user-name" }, Xt = {
491
- key: 0,
492
- class: "header__dropdown"
493
- }, Jt = { class: "header__dropdown-header" }, Qt = { class: "header__dropdown-avatar" }, Zt = { class: "header__dropdown-info" }, es = { class: "header__dropdown-name" }, ts = { class: "header__dropdown-role" }, ss = { class: "header__dropdown-menu" }, os = { class: "search-container" }, ns = { class: "search-input-wrapper" }, as = {
494
- key: 0,
495
- class: "search-results"
496
- }, ls = ["onClick"], rs = { class: "search-result-info" }, is = { class: "search-result-title" }, us = {
497
- key: 0,
498
- class: "search-result-parent"
499
- }, cs = {
500
- key: 1,
501
- class: "search-empty"
502
- }, ds = { class: "settings-drawer" }, ms = { class: "settings-section" }, ps = { class: "settings-layout-options" }, vs = ["onClick"], hs = { class: "layout-option__preview" }, _s = {
503
- key: 0,
504
- class: "layout-preview-sidebar"
505
- }, fs = {
506
- key: 1,
507
- class: "layout-preview-top"
508
- }, gs = {
509
- key: 2,
510
- class: "layout-preview-mix"
511
- }, ys = { class: "layout-option__label" }, ks = { class: "settings-section" }, ws = { class: "settings-color-options" }, bs = ["title", "onClick"], xs = { class: "settings-section" }, Cs = { class: "settings-switch-list" }, $s = { class: "settings-switch-item" }, Ts = { class: "settings-switch-item" }, Ls = /* @__PURE__ */ Q({
512
- __name: "Header",
513
- setup(t) {
514
- const s = ue(), o = te(), r = se(), l = G(), d = be(), L = ce(), _ = k(!1), g = k(!1), p = k(null), h = k(!1), u = k(!1), y = k(""), D = k(null), T = k(!1), z = [
515
- { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
516
- { value: "top", label: "顶部菜单", icon: "menu" },
517
- { value: "mix", label: "混合菜单", icon: "grid" }
518
- ], R = [
519
- { value: "#409eff", label: "默认蓝" },
520
- { value: "#1890ff", label: "科技蓝" },
521
- { value: "#52c41a", label: "极光绿" },
522
- { value: "#faad14", label: "日落橙" },
523
- { value: "#f5222d", label: "薄暮红" },
524
- { value: "#722ed1", label: "酱紫" }
525
- ], A = w(() => s.matched.filter((n) => n.meta && n.meta.title).map((n) => ({
526
- title: n.meta.title,
527
- path: n.path
528
- }))), B = (m, n = "") => {
529
- const x = [];
530
- return m.forEach(($) => {
531
- $.children && $.children.length > 0 ? x.push(...B($.children, $.title)) : x.push({ ...$, parentTitle: n });
532
- }), x;
533
- }, q = w(() => y.value.trim() ? B(L.menuList).filter(
534
- (n) => n.title.toLowerCase().includes(y.value.toLowerCase())
535
- ) : []), U = w(() => r.layout), W = () => {
536
- r.toggleCollapse();
537
- }, N = () => {
538
- r.toggleTheme();
539
- }, K = () => {
540
- g.value = !0;
541
- }, oe = (m) => {
542
- r.setLayout(m), g.value = !1;
543
- }, H = (m) => {
544
- T.value = m;
545
- const n = document.documentElement;
546
- m ? n.classList.add("grey-mode") : n.classList.remove("grey-mode");
547
- }, ne = () => {
548
- H(!T.value), g.value = !1;
549
- }, ae = () => {
550
- r.toggleTheme(), g.value = !1;
551
- }, le = () => {
552
- document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
553
- }, M = () => {
554
- h.value = !!document.fullscreenElement;
555
- }, Z = () => {
556
- _.value = !_.value;
557
- }, J = () => {
558
- _.value = !1;
559
- }, de = () => {
560
- u.value = !0;
561
- }, re = () => {
562
- u.value = !1, y.value = "";
563
- }, me = (m) => {
564
- o.push(m), re();
565
- }, he = (m) => {
566
- r.setPrimaryColor(m), g.value = !1;
567
- }, _e = () => {
568
- J(), o.push("/profile");
569
- }, fe = () => {
570
- J(), o.push("/change-password");
571
- }, ie = () => {
572
- J(), d.logout(), l.clearUserInfo(), L.clearMenu(), o.push("/login");
573
- }, E = (m) => {
574
- p.value && !p.value.contains(m.target) && J(), D.value && !D.value.contains(m.target) && re();
575
- }, c = (m) => {
576
- m.key === "Escape" && (re(), J()), (m.ctrlKey || m.metaKey) && m.key === "k" && (m.preventDefault(), de());
577
- };
578
- return ze(() => {
579
- document.addEventListener("click", E), document.addEventListener("fullscreenchange", M), document.addEventListener("keydown", c), r.initTheme(), T.value = document.documentElement.classList.contains("grey-mode");
580
- }), Ae(() => {
581
- document.removeEventListener("click", E), document.removeEventListener("fullscreenchange", M), document.removeEventListener("keydown", c);
582
- }), (m, n) => {
583
- var x;
584
- return i(), v("div", Bt, [
585
- e("div", Kt, [
586
- e("div", {
587
- class: "header__collapse",
588
- onClick: W
589
- }, [
590
- f(a(S), {
591
- name: a(r).isCollapsed ? "menu-unfold" : "menu-fold",
592
- size: 18
593
- }, null, 8, ["name"])
594
- ]),
595
- a(r).showBreadcrumb ? (i(), v("div", jt, [
596
- (i(!0), v(F, null, Y(A.value, ($, pe) => (i(), v("span", {
597
- key: $.path
598
- }, [
599
- pe > 0 ? (i(), v("span", qt, "/")) : j("", !0),
600
- e("span", {
601
- class: O({ "is-current": pe === A.value.length - 1 })
602
- }, C($.title), 3)
603
- ]))), 128))
604
- ])) : j("", !0)
605
- ]),
606
- e("div", Yt, [
607
- e("div", {
608
- class: "header__action",
609
- onClick: de,
610
- title: "搜索 (Ctrl+K)"
611
- }, [
612
- f(a(S), {
613
- name: "search",
614
- size: 16
615
- })
616
- ]),
617
- e("div", {
618
- class: "header__action",
619
- onClick: le,
620
- title: h.value ? "退出全屏" : "全屏"
621
- }, [
622
- f(a(S), {
623
- name: h.value ? "fullscreen-exit" : "fullscreen",
624
- size: 16
625
- }, null, 8, ["name"])
626
- ], 8, Wt),
627
- e("div", {
628
- class: "header__action",
629
- onClick: K,
630
- title: "换肤设置"
631
- }, [
632
- f(a(S), {
633
- name: "skin",
634
- size: 16
635
- })
636
- ]),
637
- e("div", {
638
- class: "header__action",
639
- onClick: N,
640
- title: "切换主题"
641
- }, [
642
- f(a(S), {
643
- name: a(r).isDark ? "sun" : "moon",
644
- size: 16
645
- }, null, 8, ["name"])
646
- ]),
647
- e("div", {
648
- class: "header__user",
649
- ref_key: "dropdownRef",
650
- ref: p
651
- }, [
652
- e("div", {
653
- class: "header__user-trigger",
654
- onClick: Ie(Z, ["stop"])
655
- }, [
656
- e("div", Ht, [
657
- e("span", null, C(((x = a(l).userName) == null ? void 0 : x.charAt(0)) || "U"), 1)
658
- ]),
659
- e("span", Gt, C(a(l).userName), 1),
660
- e("span", {
661
- class: O(["header__user-arrow", { "is-active": _.value }])
662
- }, "▼", 2)
663
- ]),
664
- f(Te, { name: "dropdown" }, {
665
- default: I(() => {
666
- var $;
667
- return [
668
- _.value ? (i(), v("div", Xt, [
669
- e("div", Jt, [
670
- e("div", Qt, [
671
- e("span", null, C((($ = a(l).userName) == null ? void 0 : $.charAt(0)) || "U"), 1)
672
- ]),
673
- e("div", Zt, [
674
- e("div", es, C(a(l).userName), 1),
675
- e("div", ts, C(a(l).departmentName), 1)
676
- ])
677
- ]),
678
- n[7] || (n[7] = e("div", { class: "header__dropdown-divider" }, null, -1)),
679
- e("div", ss, [
680
- e("div", {
681
- class: "header__dropdown-item",
682
- onClick: _e
683
- }, [
684
- f(a(S), {
685
- name: "user",
686
- size: 16
687
- }),
688
- n[3] || (n[3] = e("span", null, "个人信息", -1))
689
- ]),
690
- e("div", {
691
- class: "header__dropdown-item",
692
- onClick: fe
693
- }, [
694
- f(a(S), {
695
- name: "lock",
696
- size: 16
697
- }),
698
- n[4] || (n[4] = e("span", null, "修改密码", -1))
699
- ]),
700
- n[6] || (n[6] = e("div", { class: "header__dropdown-divider" }, null, -1)),
701
- e("div", {
702
- class: "header__dropdown-item header__dropdown-item--danger",
703
- onClick: ie
704
- }, [
705
- f(a(S), {
706
- name: "logout",
707
- size: 16
708
- }),
709
- n[5] || (n[5] = e("span", null, "退出登录", -1))
710
- ])
711
- ])
712
- ])) : j("", !0)
713
- ];
714
- }),
715
- _: 1
716
- })
717
- ], 512)
718
- ]),
719
- f(Te, { name: "search" }, {
720
- default: I(() => [
721
- u.value ? (i(), v("div", {
722
- key: 0,
723
- class: "header__search-modal",
724
- ref_key: "searchRef",
725
- ref: D
726
- }, [
727
- e("div", os, [
728
- e("div", ns, [
729
- f(a(S), {
730
- class: "search-icon",
731
- name: "search",
732
- size: 20
733
- }),
734
- Ze(e("input", {
735
- "onUpdate:modelValue": n[0] || (n[0] = ($) => y.value = $),
736
- type: "text",
737
- class: "search-input",
738
- placeholder: "搜索菜单...",
739
- autofocus: "",
740
- onKeyup: n[1] || (n[1] = et(($) => q.value[0] && me(q.value[0].path), ["enter"]))
741
- }, null, 544), [
742
- [pt, y.value]
743
- ]),
744
- n[8] || (n[8] = e("span", { class: "search-shortcut" }, "ESC 关闭", -1))
745
- ]),
746
- q.value.length > 0 ? (i(), v("div", as, [
747
- (i(!0), v(F, null, Y(q.value, ($, pe) => (i(), v("div", {
748
- key: $.path,
749
- class: O(["search-result-item", { "is-first": pe === 0 }]),
750
- onClick: (Dn) => me($.path)
751
- }, [
752
- f(a(S), {
753
- class: "search-result-icon",
754
- name: $.icon || "file",
755
- size: 20
756
- }, null, 8, ["name"]),
757
- e("div", rs, [
758
- e("span", is, C($.title), 1),
759
- $.parentTitle ? (i(), v("span", us, C($.parentTitle), 1)) : j("", !0)
760
- ])
761
- ], 10, ls))), 128))
762
- ])) : y.value ? (i(), v("div", cs, " 未找到匹配的菜单 ")) : j("", !0)
763
- ])
764
- ], 512)) : j("", !0)
765
- ]),
766
- _: 1
767
- }),
768
- f(a(Be), {
769
- modelValue: g.value,
770
- "onUpdate:modelValue": n[2] || (n[2] = ($) => g.value = $),
771
- title: "换肤设置",
772
- direction: "rtl",
773
- size: "320px"
774
- }, {
775
- default: I(() => [
776
- e("div", ds, [
777
- e("div", ms, [
778
- n[12] || (n[12] = e("div", { class: "settings-title" }, "布局模式", -1)),
779
- e("div", ps, [
780
- (i(), v(F, null, Y(z, ($) => e("div", {
781
- key: $.value,
782
- class: O(["layout-option", { "is-active": U.value === $.value }]),
783
- onClick: (pe) => oe($.value)
784
- }, [
785
- e("div", hs, [
786
- $.value === "sidebar" ? (i(), v("div", _s, [...n[9] || (n[9] = [
787
- e("div", { class: "preview-aside" }, null, -1),
788
- e("div", { class: "preview-main" }, [
789
- e("div", { class: "preview-header" }),
790
- e("div", { class: "preview-content" })
791
- ], -1)
792
- ])])) : $.value === "top" ? (i(), v("div", fs, [...n[10] || (n[10] = [
793
- e("div", { class: "preview-header-full" }, null, -1),
794
- e("div", { class: "preview-content-full" }, null, -1)
795
- ])])) : (i(), v("div", gs, [...n[11] || (n[11] = [
796
- e("div", { class: "preview-header-mix" }, [
797
- e("div", { class: "preview-mix-left" })
798
- ], -1),
799
- e("div", { class: "preview-mix-body" }, [
800
- e("div", { class: "preview-mix-aside" }),
801
- e("div", { class: "preview-mix-content" })
802
- ], -1)
803
- ])]))
804
- ]),
805
- e("span", ys, C($.label), 1)
806
- ], 10, vs)), 64))
807
- ])
808
- ]),
809
- e("div", ks, [
810
- n[13] || (n[13] = e("div", { class: "settings-title" }, "主题色", -1)),
811
- e("div", ws, [
812
- (i(), v(F, null, Y(R, ($) => e("div", {
813
- key: $.value,
814
- class: O(["color-option", { "is-active": a(r).primaryColor === $.value }]),
815
- style: ke({ backgroundColor: $.value }),
816
- title: $.label,
817
- onClick: (pe) => he($.value)
818
- }, [
819
- a(r).primaryColor === $.value ? (i(), V(a(S), {
820
- key: 0,
821
- name: "check",
822
- size: 12,
823
- color: "#fff"
824
- })) : j("", !0)
825
- ], 14, bs)), 64))
826
- ])
827
- ]),
828
- e("div", xs, [
829
- n[18] || (n[18] = e("div", { class: "settings-title" }, "功能设置", -1)),
830
- e("div", Cs, [
831
- e("div", $s, [
832
- n[15] || (n[15] = e("span", null, "灰色模式", -1)),
833
- e("div", {
834
- class: O(["switch-wrapper", { "is-checked": T.value }]),
835
- onClick: ne
836
- }, [...n[14] || (n[14] = [
837
- e("span", { class: "switch-core" }, null, -1)
838
- ])], 2)
839
- ]),
840
- e("div", Ts, [
841
- n[17] || (n[17] = e("span", null, "暗黑模式", -1)),
842
- e("div", {
843
- class: O(["switch-wrapper", { "is-checked": a(r).isDark }]),
844
- onClick: ae
845
- }, [...n[16] || (n[16] = [
846
- e("span", { class: "switch-core" }, null, -1)
847
- ])], 2)
848
- ])
849
- ])
850
- ])
851
- ])
852
- ]),
853
- _: 1
854
- }, 8, ["modelValue"])
855
- ]);
856
- };
857
- }
858
- }), Ms = /* @__PURE__ */ X(Ls, [["__scopeId", "data-v-702ab2d7"]]), Ss = { class: "top-menu" }, Is = { class: "top-menu__menu-icon" }, Es = {
859
- key: 1,
860
- class: "top-menu__menu-char"
861
- }, Us = { class: "top-menu__menu-icon" }, Ns = {
862
- key: 1,
863
- class: "top-menu__menu-char"
864
- }, Ps = { class: "top-menu__menu-icon" }, Ds = {
865
- key: 1,
866
- class: "top-menu__menu-char"
867
- }, zs = { class: "top-menu__actions" }, As = ["title"], Rs = { class: "top-menu__avatar" }, Os = { class: "top-menu__user-name" }, Vs = {
868
- key: 0,
869
- class: "top-menu__dropdown"
870
- }, Fs = { class: "top-menu__dropdown-header" }, Bs = { class: "top-menu__dropdown-avatar" }, Ks = { class: "top-menu__dropdown-info" }, js = { class: "top-menu__dropdown-name" }, qs = { class: "top-menu__dropdown-role" }, Ys = { class: "top-menu__dropdown-menu" }, Ws = { class: "settings-drawer" }, Hs = { class: "settings-section" }, Gs = { class: "settings-layout-options" }, Xs = ["onClick"], Js = { class: "layout-option__preview" }, Qs = {
871
- key: 0,
872
- class: "layout-preview-sidebar"
873
- }, Zs = {
874
- key: 1,
875
- class: "layout-preview-top"
876
- }, eo = {
877
- key: 2,
878
- class: "layout-preview-mix"
879
- }, to = { class: "layout-option__label" }, so = { class: "settings-section" }, oo = { class: "settings-color-options" }, no = ["title", "onClick"], ao = { class: "settings-section" }, lo = { class: "settings-switch-list" }, ro = { class: "settings-switch-item" }, io = { class: "settings-switch-item" }, uo = /* @__PURE__ */ Q({
880
- __name: "TopMenu",
881
- setup(t) {
882
- const s = ue(), o = te(), r = ce(), l = se(), d = G(), L = be(), _ = w(() => s.path), g = w(() => l.isDark ? "#1d1e1f" : "#fff"), p = w(() => l.isDark ? "#cfd3dc" : "#303133"), h = w(() => "#409eff"), u = k(!1), y = k(null), D = k(!1), T = k(!1), z = k(!1), R = (E) => {
883
- E && E !== s.path && o.push(E);
884
- }, A = /* @__PURE__ */ new Set([
885
- "arrow-up",
886
- "arrow-down",
887
- "arrow-left",
888
- "arrow-right",
889
- "caret-down",
890
- "caret-right",
891
- "plus",
892
- "minus",
893
- "close",
894
- "check",
895
- "edit",
896
- "delete",
897
- "copy",
898
- "download",
899
- "upload",
900
- "refresh",
901
- "search",
902
- "filter",
903
- "more",
904
- "setting",
905
- "share",
906
- "loading",
907
- "info",
908
- "success",
909
- "warning",
910
- "error",
911
- "question",
912
- "user",
913
- "user-add",
914
- "user-group",
915
- "logout",
916
- "login",
917
- "file",
918
- "folder",
919
- "folder-open",
920
- "document",
921
- "image",
922
- "video",
923
- "music",
924
- "camera",
925
- "mail",
926
- "phone",
927
- "chat",
928
- "bell",
929
- "message",
930
- "eye",
931
- "eye-off",
932
- "calendar",
933
- "clock",
934
- "history",
935
- "timer",
936
- "location",
937
- "map",
938
- "globe",
939
- "star",
940
- "heart",
941
- "thumb-up",
942
- "link",
943
- "external-link",
944
- "lock",
945
- "unlock",
946
- "key",
947
- "home",
948
- "menu",
949
- "menu-fold",
950
- "menu-unfold",
951
- "sidebar-fold",
952
- "sidebar-expand",
953
- "sidebar-left",
954
- "dashboard",
955
- "chart",
956
- "chart-pie",
957
- "chart-line",
958
- "report",
959
- "analytics",
960
- "system",
961
- "permission",
962
- "role",
963
- "user-manage",
964
- "log",
965
- "notification",
966
- "app",
967
- "list",
968
- "grid",
969
- "fullscreen",
970
- "fullscreen-exit",
971
- "zoom-in",
972
- "zoom-out",
973
- "print",
974
- "bookmark",
975
- "tag",
976
- "code",
977
- "terminal",
978
- "database",
979
- "server",
980
- "cloud",
981
- "gift",
982
- "moon",
983
- "sun",
984
- "theme",
985
- "skin"
986
- ]), B = (E) => {
987
- if (!E || E === "") return "";
988
- if (E.startsWith("tineco-icon-")) {
989
- const m = E.replace("tineco-icon-", "");
990
- return {
991
- home: "home",
992
- dashboard: "dashboard",
993
- system: "system",
994
- user: "user",
995
- role: "role",
996
- menu: "list",
997
- setting: "setting",
998
- file: "file",
999
- folder: "folder",
1000
- chart: "chart",
1001
- report: "report",
1002
- analytics: "analytics"
1003
- }[m] || m;
1004
- }
1005
- return {
1006
- dashboard: "dashboard",
1007
- system: "system",
1008
- user: "user",
1009
- role: "role",
1010
- menu: "list",
1011
- setting: "setting",
1012
- home: "home",
1013
- chart: "chart",
1014
- report: "report",
1015
- analytics: "analytics",
1016
- permission: "permission",
1017
- log: "log",
1018
- notification: "notification",
1019
- app: "app",
1020
- list: "list",
1021
- grid: "grid"
1022
- }[E] || E;
1023
- }, q = (E) => E ? E.charAt(0) : "", U = (E) => A.has(E), W = () => {
1024
- l.toggleTheme(), T.value = !1;
1025
- }, N = () => {
1026
- document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1027
- }, K = () => {
1028
- D.value = !!document.fullscreenElement;
1029
- }, oe = () => {
1030
- u.value = !u.value;
1031
- }, H = () => {
1032
- u.value = !1;
1033
- }, ne = () => {
1034
- T.value = !0;
1035
- }, ae = (E) => {
1036
- z.value = E;
1037
- const c = document.documentElement;
1038
- E ? c.classList.add("grey-mode") : c.classList.remove("grey-mode");
1039
- }, le = () => {
1040
- ae(!z.value), T.value = !1;
1041
- }, M = () => {
1042
- l.toggleTheme(), T.value = !1;
1043
- }, Z = [
1044
- { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1045
- { value: "top", label: "顶部菜单", icon: "menu" },
1046
- { value: "mix", label: "混合菜单", icon: "grid" }
1047
- ], J = w(() => l.layout), de = (E) => {
1048
- l.setLayout(E), T.value = !1;
1049
- }, re = [
1050
- { value: "#409eff", label: "默认蓝" },
1051
- { value: "#1890ff", label: "科技蓝" },
1052
- { value: "#52c41a", label: "极光绿" },
1053
- { value: "#faad14", label: "日落橙" },
1054
- { value: "#f5222d", label: "薄暮红" },
1055
- { value: "#722ed1", label: "酱紫" }
1056
- ], me = (E) => {
1057
- l.setPrimaryColor(E), T.value = !1;
1058
- }, he = () => {
1059
- H(), o.push("/profile");
1060
- }, _e = () => {
1061
- H(), o.push("/change-password");
1062
- }, fe = () => {
1063
- H(), L.logout(), d.clearUserInfo(), r.clearMenu(), o.push("/login");
1064
- }, ie = (E) => {
1065
- y.value && !y.value.contains(E.target) && H();
1066
- };
1067
- return ze(() => {
1068
- document.addEventListener("click", ie), document.addEventListener("fullscreenchange", K), z.value = document.documentElement.classList.contains("grey-mode");
1069
- }), Ae(() => {
1070
- document.removeEventListener("click", ie), document.removeEventListener("fullscreenchange", K);
1071
- }), (E, c) => {
1072
- var m;
1073
- return i(), v("div", Ss, [
1074
- f(a(Fe), {
1075
- "default-active": _.value,
1076
- mode: "horizontal",
1077
- "background-color": g.value,
1078
- "text-color": p.value,
1079
- "active-text-color": h.value,
1080
- class: "top-menu__menu",
1081
- onSelect: R
1082
- }, {
1083
- default: I(() => [
1084
- (i(!0), v(F, null, Y(a(r).menuList, (n) => (i(), v(F, {
1085
- key: n.menuUrl
1086
- }, [
1087
- n.children && n.children.length > 0 ? (i(), V(a(tt), {
1088
- key: 0,
1089
- index: n.menuUrl
1090
- }, {
1091
- title: I(() => [
1092
- e("span", Is, [
1093
- U(B(n.icon)) ? (i(), V(a(S), {
1094
- key: 0,
1095
- name: B(n.icon),
1096
- size: 16
1097
- }, null, 8, ["name"])) : (i(), v("span", Es, C(q(n.menuName)), 1))
1098
- ]),
1099
- e("span", null, C(n.menuName), 1)
1100
- ]),
1101
- default: I(() => [
1102
- (i(!0), v(F, null, Y(n.children, (x) => (i(), V(a(we), {
1103
- key: x.menuUrl,
1104
- index: x.menuUrl
1105
- }, {
1106
- default: I(() => [
1107
- e("span", Us, [
1108
- U(B(x.icon)) ? (i(), V(a(S), {
1109
- key: 0,
1110
- name: B(x.icon),
1111
- size: 16
1112
- }, null, 8, ["name"])) : (i(), v("span", Ns, C(q(x.menuName)), 1))
1113
- ]),
1114
- e("span", null, C(x.menuName), 1)
1115
- ]),
1116
- _: 2
1117
- }, 1032, ["index"]))), 128))
1118
- ]),
1119
- _: 2
1120
- }, 1032, ["index"])) : (i(), V(a(we), {
1121
- key: 1,
1122
- index: n.menuUrl
1123
- }, {
1124
- default: I(() => [
1125
- e("span", Ps, [
1126
- U(B(n.icon)) ? (i(), V(a(S), {
1127
- key: 0,
1128
- name: B(n.icon),
1129
- size: 16
1130
- }, null, 8, ["name"])) : (i(), v("span", Ds, C(q(n.menuName)), 1))
1131
- ]),
1132
- e("span", null, C(n.menuName), 1)
1133
- ]),
1134
- _: 2
1135
- }, 1032, ["index"]))
1136
- ], 64))), 128))
1137
- ]),
1138
- _: 1
1139
- }, 8, ["default-active", "background-color", "text-color", "active-text-color"]),
1140
- e("div", zs, [
1141
- e("div", {
1142
- class: "top-menu__action",
1143
- onClick: N,
1144
- title: D.value ? "退出全屏" : "全屏"
1145
- }, [
1146
- f(a(S), {
1147
- name: D.value ? "fullscreen-exit" : "fullscreen",
1148
- size: 16
1149
- }, null, 8, ["name"])
1150
- ], 8, As),
1151
- e("div", {
1152
- class: "top-menu__action",
1153
- onClick: ne,
1154
- title: "换肤设置"
1155
- }, [
1156
- f(a(S), {
1157
- name: "skin",
1158
- size: 16
1159
- })
1160
- ]),
1161
- e("div", {
1162
- class: "top-menu__action",
1163
- onClick: W,
1164
- title: "切换主题"
1165
- }, [
1166
- f(a(S), {
1167
- name: a(l).isDark ? "sun" : "moon",
1168
- size: 16
1169
- }, null, 8, ["name"])
1170
- ]),
1171
- e("div", {
1172
- class: "top-menu__user",
1173
- ref_key: "dropdownRef",
1174
- ref: y
1175
- }, [
1176
- e("div", {
1177
- class: "top-menu__user-trigger",
1178
- onClick: Ie(oe, ["stop"])
1179
- }, [
1180
- e("div", Rs, [
1181
- e("span", null, C(((m = a(d).userName) == null ? void 0 : m.charAt(0)) || "U"), 1)
1182
- ]),
1183
- e("span", Os, C(a(d).userName), 1),
1184
- e("span", {
1185
- class: O(["top-menu__user-arrow", { "is-active": u.value }])
1186
- }, "▼", 2)
1187
- ]),
1188
- f(Te, { name: "dropdown" }, {
1189
- default: I(() => {
1190
- var n;
1191
- return [
1192
- u.value ? (i(), v("div", Vs, [
1193
- e("div", Fs, [
1194
- e("div", Bs, [
1195
- e("span", null, C(((n = a(d).userName) == null ? void 0 : n.charAt(0)) || "U"), 1)
1196
- ]),
1197
- e("div", Ks, [
1198
- e("div", js, C(a(d).userName), 1),
1199
- e("div", qs, C(a(d).departmentName), 1)
1200
- ])
1201
- ]),
1202
- c[5] || (c[5] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1203
- e("div", Ys, [
1204
- e("div", {
1205
- class: "top-menu__dropdown-item",
1206
- onClick: he
1207
- }, [
1208
- f(a(S), {
1209
- name: "user",
1210
- size: 16
1211
- }),
1212
- c[1] || (c[1] = e("span", null, "个人信息", -1))
1213
- ]),
1214
- e("div", {
1215
- class: "top-menu__dropdown-item",
1216
- onClick: _e
1217
- }, [
1218
- f(a(S), {
1219
- name: "lock",
1220
- size: 16
1221
- }),
1222
- c[2] || (c[2] = e("span", null, "修改密码", -1))
1223
- ]),
1224
- c[4] || (c[4] = e("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1225
- e("div", {
1226
- class: "top-menu__dropdown-item top-menu__dropdown-item--danger",
1227
- onClick: fe
1228
- }, [
1229
- f(a(S), {
1230
- name: "logout",
1231
- size: 16
1232
- }),
1233
- c[3] || (c[3] = e("span", null, "退出登录", -1))
1234
- ])
1235
- ])
1236
- ])) : j("", !0)
1237
- ];
1238
- }),
1239
- _: 1
1240
- })
1241
- ], 512)
1242
- ]),
1243
- f(a(Be), {
1244
- modelValue: T.value,
1245
- "onUpdate:modelValue": c[0] || (c[0] = (n) => T.value = n),
1246
- title: "换肤设置",
1247
- direction: "rtl",
1248
- size: "320px"
1249
- }, {
1250
- default: I(() => [
1251
- e("div", Ws, [
1252
- e("div", Hs, [
1253
- c[9] || (c[9] = e("div", { class: "settings-title" }, "布局模式", -1)),
1254
- e("div", Gs, [
1255
- (i(), v(F, null, Y(Z, (n) => e("div", {
1256
- key: n.value,
1257
- class: O(["layout-option", { "is-active": J.value === n.value }]),
1258
- onClick: (x) => de(n.value)
1259
- }, [
1260
- e("div", Js, [
1261
- n.value === "sidebar" ? (i(), v("div", Qs, [...c[6] || (c[6] = [
1262
- e("div", { class: "preview-aside" }, null, -1),
1263
- e("div", { class: "preview-main" }, [
1264
- e("div", { class: "preview-header" }),
1265
- e("div", { class: "preview-content" })
1266
- ], -1)
1267
- ])])) : n.value === "top" ? (i(), v("div", Zs, [...c[7] || (c[7] = [
1268
- e("div", { class: "preview-header-full" }, null, -1),
1269
- e("div", { class: "preview-content-full" }, null, -1)
1270
- ])])) : (i(), v("div", eo, [...c[8] || (c[8] = [
1271
- e("div", { class: "preview-header-mix" }, [
1272
- e("div", { class: "preview-mix-left" })
1273
- ], -1),
1274
- e("div", { class: "preview-mix-body" }, [
1275
- e("div", { class: "preview-mix-aside" }),
1276
- e("div", { class: "preview-mix-content" })
1277
- ], -1)
1278
- ])]))
1279
- ]),
1280
- e("span", to, C(n.label), 1)
1281
- ], 10, Xs)), 64))
1282
- ])
1283
- ]),
1284
- e("div", so, [
1285
- c[10] || (c[10] = e("div", { class: "settings-title" }, "主题色", -1)),
1286
- e("div", oo, [
1287
- (i(), v(F, null, Y(re, (n) => e("div", {
1288
- key: n.value,
1289
- class: O(["color-option", { "is-active": a(l).primaryColor === n.value }]),
1290
- style: ke({ backgroundColor: n.value }),
1291
- title: n.label,
1292
- onClick: (x) => me(n.value)
1293
- }, [
1294
- a(l).primaryColor === n.value ? (i(), V(a(S), {
1295
- key: 0,
1296
- name: "check",
1297
- size: 12,
1298
- color: "#fff"
1299
- })) : j("", !0)
1300
- ], 14, no)), 64))
1301
- ])
1302
- ]),
1303
- e("div", ao, [
1304
- c[15] || (c[15] = e("div", { class: "settings-title" }, "功能设置", -1)),
1305
- e("div", lo, [
1306
- e("div", ro, [
1307
- c[12] || (c[12] = e("span", null, "灰色模式", -1)),
1308
- e("div", {
1309
- class: O(["switch-wrapper", { "is-checked": z.value }]),
1310
- onClick: le
1311
- }, [...c[11] || (c[11] = [
1312
- e("span", { class: "switch-core" }, null, -1)
1313
- ])], 2)
1314
- ]),
1315
- e("div", io, [
1316
- c[14] || (c[14] = e("span", null, "暗黑模式", -1)),
1317
- e("div", {
1318
- class: O(["switch-wrapper", { "is-checked": a(l).isDark }]),
1319
- onClick: M
1320
- }, [...c[13] || (c[13] = [
1321
- e("span", { class: "switch-core" }, null, -1)
1322
- ])], 2)
1323
- ])
1324
- ])
1325
- ])
1326
- ])
1327
- ]),
1328
- _: 1
1329
- }, 8, ["modelValue"])
1330
- ]);
1331
- };
1332
- }
1333
- }), co = /* @__PURE__ */ X(uo, [["__scopeId", "data-v-4f7f3ce1"]]), mo = { class: "mix-top-menu" }, po = { class: "mix-top-menu__logo" }, vo = { class: "mix-top-menu__logo-text" }, ho = { class: "mix-top-menu__menu-icon" }, _o = {
1334
- key: 1,
1335
- class: "mix-top-menu__menu-char"
1336
- }, fo = { class: "mix-top-menu__actions" }, go = ["title"], yo = { class: "mix-top-menu__avatar" }, ko = { class: "mix-top-menu__user-name" }, wo = {
1337
- key: 0,
1338
- class: "mix-top-menu__dropdown"
1339
- }, bo = { class: "mix-top-menu__dropdown-header" }, xo = { class: "mix-top-menu__dropdown-avatar" }, Co = { class: "mix-top-menu__dropdown-info" }, $o = { class: "mix-top-menu__dropdown-name" }, To = { class: "mix-top-menu__dropdown-role" }, Lo = { class: "mix-top-menu__dropdown-menu" }, Mo = { class: "settings-drawer" }, So = { class: "settings-section" }, Io = { class: "settings-layout-options" }, Eo = ["onClick"], Uo = { class: "layout-option__preview" }, No = {
1340
- key: 0,
1341
- class: "layout-preview-sidebar"
1342
- }, Po = {
1343
- key: 1,
1344
- class: "layout-preview-top"
1345
- }, Do = {
1346
- key: 2,
1347
- class: "layout-preview-mix"
1348
- }, zo = { class: "layout-option__label" }, Ao = { class: "settings-section" }, Ro = { class: "settings-color-options" }, Oo = ["title", "onClick"], Vo = { class: "settings-section" }, Fo = { class: "settings-switch-list" }, Bo = { class: "settings-switch-item" }, Ko = { class: "settings-switch-item" }, jo = /* @__PURE__ */ Q({
1349
- __name: "MixTopMenu",
1350
- setup(t) {
1351
- const s = ue(), o = te(), r = ce(), l = se(), d = G(), L = be(), _ = w(() => l.activeTopMenuPath), g = w(() => l.isDark ? "#1d1e1f" : "#fff"), p = w(() => l.isDark ? "#cfd3dc" : "#303133"), h = w(() => "#409eff"), u = k(!1), y = k(null), D = k(!1), T = k(!1), z = k(!1), R = /* @__PURE__ */ new Set([
1352
- "arrow-up",
1353
- "arrow-down",
1354
- "arrow-left",
1355
- "arrow-right",
1356
- "caret-down",
1357
- "caret-right",
1358
- "plus",
1359
- "minus",
1360
- "close",
1361
- "check",
1362
- "edit",
1363
- "delete",
1364
- "copy",
1365
- "download",
1366
- "upload",
1367
- "refresh",
1368
- "search",
1369
- "filter",
1370
- "more",
1371
- "setting",
1372
- "share",
1373
- "loading",
1374
- "info",
1375
- "success",
1376
- "warning",
1377
- "error",
1378
- "question",
1379
- "user",
1380
- "user-add",
1381
- "user-group",
1382
- "logout",
1383
- "login",
1384
- "file",
1385
- "folder",
1386
- "folder-open",
1387
- "document",
1388
- "image",
1389
- "video",
1390
- "music",
1391
- "camera",
1392
- "mail",
1393
- "phone",
1394
- "chat",
1395
- "bell",
1396
- "message",
1397
- "eye",
1398
- "eye-off",
1399
- "calendar",
1400
- "clock",
1401
- "history",
1402
- "timer",
1403
- "location",
1404
- "map",
1405
- "globe",
1406
- "star",
1407
- "heart",
1408
- "thumb-up",
1409
- "link",
1410
- "external-link",
1411
- "lock",
1412
- "unlock",
1413
- "key",
1414
- "home",
1415
- "menu",
1416
- "menu-fold",
1417
- "menu-unfold",
1418
- "sidebar-fold",
1419
- "sidebar-expand",
1420
- "sidebar-left",
1421
- "dashboard",
1422
- "chart",
1423
- "chart-pie",
1424
- "chart-line",
1425
- "report",
1426
- "analytics",
1427
- "system",
1428
- "permission",
1429
- "role",
1430
- "user-manage",
1431
- "log",
1432
- "notification",
1433
- "app",
1434
- "list",
1435
- "grid",
1436
- "fullscreen",
1437
- "fullscreen-exit",
1438
- "zoom-in",
1439
- "zoom-out",
1440
- "print",
1441
- "bookmark",
1442
- "tag",
1443
- "code",
1444
- "terminal",
1445
- "database",
1446
- "server",
1447
- "cloud",
1448
- "gift",
1449
- "moon",
1450
- "sun",
1451
- "theme",
1452
- "skin"
1453
- ]), A = (c) => {
1454
- if (!c || c === "") return "";
1455
- if (c.startsWith("tineco-icon-")) {
1456
- const n = c.replace("tineco-icon-", "");
1457
- return {
1458
- home: "home",
1459
- dashboard: "dashboard",
1460
- system: "system",
1461
- user: "user",
1462
- role: "role",
1463
- menu: "list",
1464
- setting: "setting",
1465
- file: "file",
1466
- folder: "folder",
1467
- chart: "chart",
1468
- report: "report",
1469
- analytics: "analytics"
1470
- }[n] || n;
1471
- }
1472
- return {
1473
- dashboard: "dashboard",
1474
- system: "system",
1475
- user: "user",
1476
- role: "role",
1477
- menu: "list",
1478
- setting: "setting",
1479
- home: "home",
1480
- chart: "chart",
1481
- report: "report",
1482
- analytics: "analytics",
1483
- permission: "permission",
1484
- log: "log",
1485
- notification: "notification",
1486
- app: "app",
1487
- list: "list",
1488
- grid: "grid"
1489
- }[c] || c;
1490
- }, B = (c) => c ? c.charAt(0) : "", q = (c) => R.has(c), U = (c) => {
1491
- l.setActiveTopMenuPath(c);
1492
- const m = r.menuList.find((n) => n.menuUrl === c);
1493
- if (m)
1494
- if (m.children && m.children.length > 0) {
1495
- const n = m.children.find((x) => x.isDefault) || m.children[0];
1496
- n && n.menuUrl !== s.path && o.push(n.menuUrl);
1497
- } else c !== s.path && o.push(c);
1498
- }, W = () => {
1499
- l.toggleTheme(), T.value = !1;
1500
- }, N = () => {
1501
- document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1502
- }, K = () => {
1503
- D.value = !!document.fullscreenElement;
1504
- }, oe = () => {
1505
- u.value = !u.value;
1506
- }, H = () => {
1507
- u.value = !1;
1508
- }, ne = () => {
1509
- T.value = !0;
1510
- }, ae = (c) => {
1511
- z.value = c;
1512
- const m = document.documentElement;
1513
- c ? m.classList.add("grey-mode") : m.classList.remove("grey-mode");
1514
- }, le = () => {
1515
- ae(!z.value), T.value = !1;
1516
- }, M = () => {
1517
- l.toggleTheme(), T.value = !1;
1518
- }, Z = [
1519
- { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1520
- { value: "top", label: "顶部菜单", icon: "menu" },
1521
- { value: "mix", label: "混合菜单", icon: "grid" }
1522
- ], J = w(() => l.layout), de = (c) => {
1523
- l.setLayout(c), T.value = !1;
1524
- }, re = [
1525
- { value: "#409eff", label: "默认蓝" },
1526
- { value: "#1890ff", label: "科技蓝" },
1527
- { value: "#52c41a", label: "极光绿" },
1528
- { value: "#faad14", label: "日落橙" },
1529
- { value: "#f5222d", label: "薄暮红" },
1530
- { value: "#722ed1", label: "酱紫" }
1531
- ], me = (c) => {
1532
- l.setPrimaryColor(c), T.value = !1;
1533
- }, he = () => {
1534
- H(), o.push("/profile");
1535
- }, _e = () => {
1536
- H(), o.push("/change-password");
1537
- }, fe = () => {
1538
- H(), L.logout(), d.clearUserInfo(), r.clearMenu(), o.push("/login");
1539
- }, ie = (c) => {
1540
- y.value && !y.value.contains(c.target) && H();
1541
- }, E = () => {
1542
- if (!l.activeTopMenuPath && r.menuList.length > 0) {
1543
- for (const c of r.menuList) {
1544
- if (c.menuUrl === s.path) {
1545
- l.setActiveTopMenuPath(c.menuUrl);
1546
- break;
1547
- }
1548
- if (c.children && c.children.length > 0 && c.children.some(
1549
- (n) => n.menuUrl === s.path || n.children && n.children.some((x) => x.menuUrl === s.path)
1550
- )) {
1551
- l.setActiveTopMenuPath(c.menuUrl);
1552
- break;
1553
- }
1554
- }
1555
- l.activeTopMenuPath || l.setActiveTopMenuPath(r.menuList[0].menuUrl);
1556
- }
1557
- };
1558
- return ze(() => {
1559
- document.addEventListener("click", ie), document.addEventListener("fullscreenchange", K), z.value = document.documentElement.classList.contains("grey-mode"), E();
1560
- }), Ae(() => {
1561
- document.removeEventListener("click", ie), document.removeEventListener("fullscreenchange", K);
1562
- }), (c, m) => {
1563
- var n;
1564
- return i(), v("div", mo, [
1565
- e("div", po, [
1566
- e("span", vo, C(a(l).appName), 1)
1567
- ]),
1568
- f(a(Fe), {
1569
- "default-active": _.value,
1570
- mode: "horizontal",
1571
- "background-color": g.value,
1572
- "text-color": p.value,
1573
- "active-text-color": h.value,
1574
- class: "mix-top-menu__menu",
1575
- onSelect: U
1576
- }, {
1577
- default: I(() => [
1578
- (i(!0), v(F, null, Y(a(r).menuList, (x) => (i(), V(a(we), {
1579
- key: x.menuUrl,
1580
- index: x.menuUrl
1581
- }, {
1582
- default: I(() => [
1583
- e("span", ho, [
1584
- q(A(x.icon)) ? (i(), V(a(S), {
1585
- key: 0,
1586
- name: A(x.icon),
1587
- size: 16
1588
- }, null, 8, ["name"])) : (i(), v("span", _o, C(B(x.menuName)), 1))
1589
- ]),
1590
- e("span", null, C(x.menuName), 1)
1591
- ]),
1592
- _: 2
1593
- }, 1032, ["index"]))), 128))
1594
- ]),
1595
- _: 1
1596
- }, 8, ["default-active", "background-color", "text-color", "active-text-color"]),
1597
- e("div", fo, [
1598
- e("div", {
1599
- class: "mix-top-menu__action",
1600
- onClick: N,
1601
- title: D.value ? "退出全屏" : "全屏"
1602
- }, [
1603
- f(a(S), {
1604
- name: D.value ? "fullscreen-exit" : "fullscreen",
1605
- size: 16
1606
- }, null, 8, ["name"])
1607
- ], 8, go),
1608
- e("div", {
1609
- class: "mix-top-menu__action",
1610
- onClick: ne,
1611
- title: "换肤设置"
1612
- }, [
1613
- f(a(S), {
1614
- name: "skin",
1615
- size: 16
1616
- })
1617
- ]),
1618
- e("div", {
1619
- class: "mix-top-menu__action",
1620
- onClick: W,
1621
- title: "切换主题"
1622
- }, [
1623
- f(a(S), {
1624
- name: a(l).isDark ? "sun" : "moon",
1625
- size: 16
1626
- }, null, 8, ["name"])
1627
- ]),
1628
- e("div", {
1629
- class: "mix-top-menu__user",
1630
- ref_key: "dropdownRef",
1631
- ref: y
1632
- }, [
1633
- e("div", {
1634
- class: "mix-top-menu__user-trigger",
1635
- onClick: Ie(oe, ["stop"])
1636
- }, [
1637
- e("div", yo, [
1638
- e("span", null, C(((n = a(d).userName) == null ? void 0 : n.charAt(0)) || "U"), 1)
1639
- ]),
1640
- e("span", ko, C(a(d).userName), 1),
1641
- e("span", {
1642
- class: O(["mix-top-menu__user-arrow", { "is-active": u.value }])
1643
- }, "▼", 2)
1644
- ]),
1645
- f(Te, { name: "dropdown" }, {
1646
- default: I(() => {
1647
- var x;
1648
- return [
1649
- u.value ? (i(), v("div", wo, [
1650
- e("div", bo, [
1651
- e("div", xo, [
1652
- e("span", null, C(((x = a(d).userName) == null ? void 0 : x.charAt(0)) || "U"), 1)
1653
- ]),
1654
- e("div", Co, [
1655
- e("div", $o, C(a(d).userName), 1),
1656
- e("div", To, C(a(d).departmentName), 1)
1657
- ])
1658
- ]),
1659
- m[5] || (m[5] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
1660
- e("div", Lo, [
1661
- e("div", {
1662
- class: "mix-top-menu__dropdown-item",
1663
- onClick: he
1664
- }, [
1665
- f(a(S), {
1666
- name: "user",
1667
- size: 16
1668
- }),
1669
- m[1] || (m[1] = e("span", null, "个人信息", -1))
1670
- ]),
1671
- e("div", {
1672
- class: "mix-top-menu__dropdown-item",
1673
- onClick: _e
1674
- }, [
1675
- f(a(S), {
1676
- name: "lock",
1677
- size: 16
1678
- }),
1679
- m[2] || (m[2] = e("span", null, "修改密码", -1))
1680
- ]),
1681
- m[4] || (m[4] = e("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
1682
- e("div", {
1683
- class: "mix-top-menu__dropdown-item mix-top-menu__dropdown-item--danger",
1684
- onClick: fe
1685
- }, [
1686
- f(a(S), {
1687
- name: "logout",
1688
- size: 16
1689
- }),
1690
- m[3] || (m[3] = e("span", null, "退出登录", -1))
1691
- ])
1692
- ])
1693
- ])) : j("", !0)
1694
- ];
1695
- }),
1696
- _: 1
1697
- })
1698
- ], 512)
1699
- ]),
1700
- f(a(Be), {
1701
- modelValue: T.value,
1702
- "onUpdate:modelValue": m[0] || (m[0] = (x) => T.value = x),
1703
- title: "换肤设置",
1704
- direction: "rtl",
1705
- size: "320px"
1706
- }, {
1707
- default: I(() => [
1708
- e("div", Mo, [
1709
- e("div", So, [
1710
- m[9] || (m[9] = e("div", { class: "settings-title" }, "布局模式", -1)),
1711
- e("div", Io, [
1712
- (i(), v(F, null, Y(Z, (x) => e("div", {
1713
- key: x.value,
1714
- class: O(["layout-option", { "is-active": J.value === x.value }]),
1715
- onClick: ($) => de(x.value)
1716
- }, [
1717
- e("div", Uo, [
1718
- x.value === "sidebar" ? (i(), v("div", No, [...m[6] || (m[6] = [
1719
- e("div", { class: "preview-aside" }, null, -1),
1720
- e("div", { class: "preview-main" }, [
1721
- e("div", { class: "preview-header" }),
1722
- e("div", { class: "preview-content" })
1723
- ], -1)
1724
- ])])) : x.value === "top" ? (i(), v("div", Po, [...m[7] || (m[7] = [
1725
- e("div", { class: "preview-header-full" }, null, -1),
1726
- e("div", { class: "preview-content-full" }, null, -1)
1727
- ])])) : (i(), v("div", Do, [...m[8] || (m[8] = [
1728
- e("div", { class: "preview-header-mix" }, [
1729
- e("div", { class: "preview-mix-left" })
1730
- ], -1),
1731
- e("div", { class: "preview-mix-body" }, [
1732
- e("div", { class: "preview-mix-aside" }),
1733
- e("div", { class: "preview-mix-content" })
1734
- ], -1)
1735
- ])]))
1736
- ]),
1737
- e("span", zo, C(x.label), 1)
1738
- ], 10, Eo)), 64))
1739
- ])
1740
- ]),
1741
- e("div", Ao, [
1742
- m[10] || (m[10] = e("div", { class: "settings-title" }, "主题色", -1)),
1743
- e("div", Ro, [
1744
- (i(), v(F, null, Y(re, (x) => e("div", {
1745
- key: x.value,
1746
- class: O(["color-option", { "is-active": a(l).primaryColor === x.value }]),
1747
- style: ke({ backgroundColor: x.value }),
1748
- title: x.label,
1749
- onClick: ($) => me(x.value)
1750
- }, [
1751
- a(l).primaryColor === x.value ? (i(), V(a(S), {
1752
- key: 0,
1753
- name: "check",
1754
- size: 12,
1755
- color: "#fff"
1756
- })) : j("", !0)
1757
- ], 14, Oo)), 64))
1758
- ])
1759
- ]),
1760
- e("div", Vo, [
1761
- m[15] || (m[15] = e("div", { class: "settings-title" }, "功能设置", -1)),
1762
- e("div", Fo, [
1763
- e("div", Bo, [
1764
- m[12] || (m[12] = e("span", null, "灰色模式", -1)),
1765
- e("div", {
1766
- class: O(["switch-wrapper", { "is-checked": z.value }]),
1767
- onClick: le
1768
- }, [...m[11] || (m[11] = [
1769
- e("span", { class: "switch-core" }, null, -1)
1770
- ])], 2)
1771
- ]),
1772
- e("div", Ko, [
1773
- m[14] || (m[14] = e("span", null, "暗黑模式", -1)),
1774
- e("div", {
1775
- class: O(["switch-wrapper", { "is-checked": a(l).isDark }]),
1776
- onClick: M
1777
- }, [...m[13] || (m[13] = [
1778
- e("span", { class: "switch-core" }, null, -1)
1779
- ])], 2)
1780
- ])
1781
- ])
1782
- ])
1783
- ])
1784
- ]),
1785
- _: 1
1786
- }, 8, ["modelValue"])
1787
- ]);
1788
- };
1789
- }
1790
- }), qo = /* @__PURE__ */ X(jo, [["__scopeId", "data-v-aa15a69c"]]), Yo = { class: "layout__mix-body" }, Wo = { class: "layout__main" }, Ho = { class: "layout__content" }, Go = {
1791
- key: 1,
1792
- class: "layout__top-menu"
1793
- }, Xo = { class: "layout__main" }, Jo = {
1794
- key: 0,
1795
- class: "layout__header"
1796
- }, Qo = { class: "layout__content" }, Zo = /* @__PURE__ */ Q({
1797
- __name: "index",
1798
- setup(t) {
1799
- const s = ue(), o = se(), r = ce(), l = w(
1800
- () => o.isCollapsed ? "64px" : "210px"
1801
- ), d = w(() => o.layout), L = w(() => d.value === "sidebar" ? !0 : d.value === "mix" ? p.value.length > 0 : !1), _ = w(() => d.value === "top"), g = w(() => d.value === "sidebar"), p = w(() => {
1802
- if (d.value !== "mix") return r.menuList;
1803
- const h = o.activeTopMenuPath;
1804
- if (!h) return [];
1805
- const u = r.menuList.find((y) => y.menuUrl === h);
1806
- return (u == null ? void 0 : u.children) || [];
1807
- });
1808
- return Qe(
1809
- () => s.path,
1810
- (h) => {
1811
- if (d.value === "mix" && r.menuList.length > 0)
1812
- for (const u of r.menuList) {
1813
- if (u.menuUrl === h) {
1814
- o.activeTopMenuPath !== u.menuUrl && o.setActiveTopMenuPath(u.menuUrl);
1815
- break;
1816
- }
1817
- if (u.children && u.children.length > 0 && u.children.some(
1818
- (D) => D.menuUrl === h || D.children && D.children.some((T) => T.menuUrl === h)
1819
- )) {
1820
- o.activeTopMenuPath !== u.menuUrl && o.setActiveTopMenuPath(u.menuUrl);
1821
- break;
1822
- }
1823
- }
1824
- },
1825
- { immediate: !0 }
1826
- ), (h, u) => {
1827
- const y = vt("router-view");
1828
- return i(), v("div", {
1829
- class: O(["layout", `layout--${d.value}`])
1830
- }, [
1831
- d.value === "mix" ? (i(), v(F, { key: 0 }, [
1832
- f(qo),
1833
- e("div", Yo, [
1834
- p.value.length > 0 ? (i(), v("aside", {
1835
- key: 0,
1836
- class: "layout__aside",
1837
- style: ke({ width: l.value })
1838
- }, [
1839
- f(Je, { "menu-list": p.value }, null, 8, ["menu-list"])
1840
- ], 4)) : j("", !0),
1841
- e("div", Wo, [
1842
- e("main", Ho, [
1843
- f(y)
1844
- ])
1845
- ])
1846
- ])
1847
- ], 64)) : (i(), v(F, { key: 1 }, [
1848
- L.value ? (i(), v("aside", {
1849
- key: 0,
1850
- class: "layout__aside",
1851
- style: ke({ width: l.value })
1852
- }, [
1853
- f(Je, {
1854
- "menu-list": a(r).menuList
1855
- }, null, 8, ["menu-list"])
1856
- ], 4)) : j("", !0),
1857
- _.value ? (i(), v("div", Go, [
1858
- f(co)
1859
- ])) : j("", !0),
1860
- e("div", Xo, [
1861
- g.value ? (i(), v("header", Jo, [
1862
- f(Ms)
1863
- ])) : j("", !0),
1864
- e("main", Qo, [
1865
- f(y)
1866
- ])
1867
- ])
1868
- ], 64))
1869
- ], 2);
1870
- };
1871
- }
1872
- }), rt = /* @__PURE__ */ X(Zo, [["__scopeId", "data-v-58be5ac1"]]), en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1873
- __proto__: null,
1874
- default: rt
1875
- }, Symbol.toStringTag, { value: "Module" })), tn = { class: "tabs-wrapper" }, sn = { class: "tab-label" }, on = ["onClick"], nn = /* @__PURE__ */ Q({
1876
- __name: "Tabs",
1877
- setup(t) {
1878
- const s = ue(), o = te(), r = w(() => {
1879
- const _ = [];
1880
- return s.matched.forEach((g) => {
1881
- var p;
1882
- (p = g.meta) != null && p.affix && _.push({
1883
- name: g.name,
1884
- title: g.meta.title,
1885
- path: g.path,
1886
- affix: !0
1887
- });
1888
- }), _;
1889
- }), l = w(() => s.path), d = (_) => {
1890
- o.push(_);
1891
- }, L = (_) => {
1892
- const g = r.value.find((p) => p.path === _);
1893
- if (!(g != null && g.affix) && _ === l.value) {
1894
- const p = r.value.findIndex((u) => u.path === _), h = r.value[p - 1] || r.value[p + 1];
1895
- h && o.push(h.path);
1896
- }
1897
- };
1898
- return (_, g) => (i(), v("div", tn, [
1899
- f(a(ht), {
1900
- modelValue: l.value,
1901
- "onUpdate:modelValue": g[0] || (g[0] = (p) => l.value = p),
1902
- type: "card",
1903
- onTabClick: d
1904
- }, {
1905
- default: I(() => [
1906
- (i(!0), v(F, null, Y(r.value, (p) => (i(), V(a(_t), {
1907
- key: p.path,
1908
- name: p.path,
1909
- label: p.title,
1910
- closable: !p.affix
1911
- }, {
1912
- label: I(() => [
1913
- e("span", sn, [
1914
- ve(C(p.title) + " ", 1),
1915
- p.affix ? j("", !0) : (i(), v("span", {
1916
- key: 0,
1917
- class: "tab-close",
1918
- onClick: Ie((h) => L(p.path), ["stop"])
1919
- }, " ✕ ", 8, on))
1920
- ])
1921
- ]),
1922
- _: 2
1923
- }, 1032, ["name", "label", "closable"]))), 128))
1924
- ]),
1925
- _: 1
1926
- }, 8, ["modelValue"])
1927
- ]));
1928
- }
1929
- }), Hn = /* @__PURE__ */ X(nn, [["__scopeId", "data-v-9156d8cd"]]), an = {}, ln = { class: "footer" };
1930
- function rn(t, s) {
1931
- return i(), v("div", ln, [...s[0] || (s[0] = [
1932
- e("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
1933
- ])]);
1934
- }
1935
- const Gn = /* @__PURE__ */ X(an, [["render", rn], ["__scopeId", "data-v-4852826a"]]), un = () => {
1936
- const t = yt.create({
1937
- baseURL: void 0,
1938
- timeout: 3e4,
1939
- headers: {
1940
- "Content-Type": "application/json"
1941
- }
1942
- });
1943
- return t.interceptors.request.use(
1944
- (s) => {
1945
- const o = Ne(), r = bt() || "Bearer";
1946
- return o && (s.headers.Authorization = `${r} ${o}`), s;
1947
- },
1948
- (s) => Promise.reject(s)
1949
- ), t.interceptors.response.use(
1950
- (s) => {
1951
- const { data: o } = s;
1952
- return o.code === 200 || o.code === 0 ? o.data : (ee.error(o.message || "请求失败"), Promise.reject(new Error(o.message || "请求失败")));
1953
- },
1954
- (s) => {
1955
- var r;
1956
- const { response: o } = s;
1957
- if (o)
1958
- switch (o.status) {
1959
- case 401:
1960
- ee.error("登录已过期,请重新登录"), at(), window.location.href = "/login";
1961
- break;
1962
- case 403:
1963
- ee.error("没有权限访问");
1964
- break;
1965
- case 404:
1966
- ee.error("请求资源不存在");
1967
- break;
1968
- case 500:
1969
- ee.error("服务器错误");
1970
- break;
1971
- default:
1972
- ee.error(((r = o.data) == null ? void 0 : r.message) || "请求失败");
1973
- }
1974
- else
1975
- ee.error("网络连接失败");
1976
- return Promise.reject(s);
1977
- }
1978
- ), t;
1979
- }, ye = un(), P = {
1980
- get(t, s) {
1981
- return ye.get(t, s);
1982
- },
1983
- post(t, s, o) {
1984
- return ye.post(t, s, o);
1985
- },
1986
- put(t, s, o) {
1987
- return ye.put(t, s, o);
1988
- },
1989
- patch(t, s, o) {
1990
- return ye.patch(t, s, o);
1991
- },
1992
- delete(t, s) {
1993
- return ye.delete(t, s);
1994
- }
1995
- };
1996
- function cn(t) {
1997
- return P.post("/user/v1.0/login/by-domain", t);
1998
- }
1999
- function Xn() {
2000
- return P.put("/user/v1.0/user/logout");
2001
- }
2002
- function dn() {
2003
- return P.get("/user/v1.0/user/get-me");
2004
- }
2005
- function Jn(t) {
2006
- return P.post("/user/v1.0/refresh", { refreshToken: t });
2007
- }
2008
- const Le = k(""), Me = k(""), Se = k("");
2009
- function Qn(t) {
2010
- t.appId && (Le.value = t.appId), t.clientId && (Me.value = t.clientId), t.apiBaseUrl && (Se.value = t.apiBaseUrl);
2011
- }
2012
- function Ge() {
2013
- if (Le.value)
2014
- return Le.value;
2015
- try {
2016
- return "";
2017
- } catch {
2018
- return "";
2019
- }
2020
- }
2021
- function mn() {
2022
- if (Me.value)
2023
- return Me.value;
2024
- try {
2025
- return "";
2026
- } catch {
2027
- return "";
2028
- }
2029
- }
2030
- function Zn() {
2031
- if (Se.value)
2032
- return Se.value;
2033
- try {
2034
- return "";
2035
- } catch {
2036
- return "";
2037
- }
2038
- }
2039
- const ea = {
2040
- appId: Le,
2041
- clientId: Me,
2042
- apiBaseUrl: Se
2043
- }, pn = { class: "login" }, vn = { class: "login__container" }, hn = /* @__PURE__ */ Q({
2044
- __name: "index",
2045
- setup(t) {
2046
- const s = te(), o = ue(), r = k(!1), l = k(!1), d = Re({
2047
- uid: "",
2048
- password: ""
2049
- }), L = {
2050
- uid: [
2051
- { required: !0, message: "请输入用户名", trigger: "blur" }
2052
- ],
2053
- password: [
2054
- { required: !0, message: "请输入密码", trigger: "blur" },
2055
- { min: 6, message: "密码长度至少6位", trigger: "blur" }
2056
- ]
2057
- }, _ = k(), g = async () => {
2058
- var p;
2059
- try {
2060
- await ((p = _.value) == null ? void 0 : p.validate()), r.value = !0;
2061
- const h = await cn({
2062
- appId: Ge(),
2063
- clientId: mn(),
2064
- uid: d.uid,
2065
- password: d.password,
2066
- code: !0
2067
- });
2068
- nt(h), ee.success("登录成功");
2069
- const u = o.query.redirect || "/";
2070
- s.push(u);
2071
- } catch (h) {
2072
- console.error("登录失败:", h);
2073
- } finally {
2074
- r.value = !1;
2075
- }
2076
- };
2077
- return (p, h) => (i(), v("div", pn, [
2078
- e("div", vn, [
2079
- h[5] || (h[5] = e("div", { class: "login__header" }, [
2080
- e("img", {
2081
- src: ot,
2082
- alt: "Logo",
2083
- class: "login__logo"
2084
- }),
2085
- e("h1", { class: "login__title" }, "Xto Demo"),
2086
- e("p", { class: "login__subtitle" }, "后台管理系统")
2087
- ], -1)),
2088
- f(a(ft), {
2089
- ref_key: "formRef",
2090
- ref: _,
2091
- model: d,
2092
- rules: L,
2093
- class: "login__form",
2094
- "label-width": "0"
2095
- }, {
2096
- default: I(() => [
2097
- f(a(xe), { prop: "uid" }, {
2098
- default: I(() => [
2099
- f(a(Xe), {
2100
- modelValue: d.uid,
2101
- "onUpdate:modelValue": h[0] || (h[0] = (u) => d.uid = u),
2102
- placeholder: "用户名",
2103
- size: "large"
2104
- }, {
2105
- prefix: I(() => [
2106
- f(a(S), {
2107
- name: "user",
2108
- size: 18
2109
- })
2110
- ]),
2111
- _: 1
2112
- }, 8, ["modelValue"])
2113
- ]),
2114
- _: 1
2115
- }),
2116
- f(a(xe), { prop: "password" }, {
2117
- default: I(() => [
2118
- f(a(Xe), {
2119
- modelValue: d.password,
2120
- "onUpdate:modelValue": h[1] || (h[1] = (u) => d.password = u),
2121
- type: "password",
2122
- placeholder: "密码",
2123
- size: "large",
2124
- "show-password": "",
2125
- onKeyup: et(g, ["enter"])
2126
- }, {
2127
- prefix: I(() => [
2128
- f(a(S), {
2129
- name: "lock",
2130
- size: 18
2131
- })
2132
- ]),
2133
- _: 1
2134
- }, 8, ["modelValue"])
2135
- ]),
2136
- _: 1
2137
- }),
2138
- f(a(xe), null, {
2139
- default: I(() => [
2140
- f(a(gt), {
2141
- modelValue: l.value,
2142
- "onUpdate:modelValue": h[2] || (h[2] = (u) => l.value = u)
2143
- }, {
2144
- default: I(() => [...h[3] || (h[3] = [
2145
- ve("记住我", -1)
2146
- ])]),
2147
- _: 1
2148
- }, 8, ["modelValue"])
2149
- ]),
2150
- _: 1
2151
- }),
2152
- f(a(xe), null, {
2153
- default: I(() => [
2154
- f(a(Ue), {
2155
- type: "primary",
2156
- size: "large",
2157
- loading: r.value,
2158
- class: "login__submit",
2159
- onClick: g
2160
- }, {
2161
- default: I(() => [...h[4] || (h[4] = [
2162
- ve(" 登录 ", -1)
2163
- ])]),
2164
- _: 1
2165
- }, 8, ["loading"])
2166
- ]),
2167
- _: 1
2168
- })
2169
- ]),
2170
- _: 1
2171
- }, 8, ["model"]),
2172
- h[6] || (h[6] = e("div", { class: "login__footer" }, [
2173
- e("p", null, "请输入您的用户名和密码")
2174
- ], -1))
2175
- ])
2176
- ]));
2177
- }
2178
- }), _n = /* @__PURE__ */ X(hn, [["__scopeId", "data-v-f3e724b6"]]), fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2179
- __proto__: null,
2180
- default: _n
2181
- }, Symbol.toStringTag, { value: "Module" })), gn = { class: "error-page" }, yn = { class: "error-page__content" }, kn = /* @__PURE__ */ Q({
2182
- __name: "404",
2183
- setup(t) {
2184
- const s = te(), o = () => {
2185
- s.push("/");
2186
- };
2187
- return (r, l) => (i(), v("div", gn, [
2188
- e("div", yn, [
2189
- l[1] || (l[1] = e("div", { class: "error-page__code" }, "404", -1)),
2190
- l[2] || (l[2] = e("div", { class: "error-page__title" }, "页面不存在", -1)),
2191
- l[3] || (l[3] = e("div", { class: "error-page__desc" }, "抱歉,您访问的页面不存在或已被删除", -1)),
2192
- f(a(Ue), {
2193
- type: "primary",
2194
- onClick: o
2195
- }, {
2196
- default: I(() => [...l[0] || (l[0] = [
2197
- ve("返回首页", -1)
2198
- ])]),
2199
- _: 1
2200
- })
2201
- ])
2202
- ]));
2203
- }
2204
- }), wn = /* @__PURE__ */ X(kn, [["__scopeId", "data-v-c3c12c24"]]), bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2205
- __proto__: null,
2206
- default: wn
2207
- }, Symbol.toStringTag, { value: "Module" })), xn = { class: "error-page" }, Cn = { class: "error-page__content" }, $n = /* @__PURE__ */ Q({
2208
- __name: "403",
2209
- setup(t) {
2210
- const s = te(), o = () => {
2211
- s.push("/");
2212
- };
2213
- return (r, l) => (i(), v("div", xn, [
2214
- e("div", Cn, [
2215
- l[1] || (l[1] = e("div", { class: "error-page__code" }, "403", -1)),
2216
- l[2] || (l[2] = e("div", { class: "error-page__title" }, "无访问权限", -1)),
2217
- l[3] || (l[3] = e("div", { class: "error-page__desc" }, "抱歉,您没有权限访问此页面", -1)),
2218
- f(a(Ue), {
2219
- type: "primary",
2220
- onClick: o
2221
- }, {
2222
- default: I(() => [...l[0] || (l[0] = [
2223
- ve("返回首页", -1)
2224
- ])]),
2225
- _: 1
2226
- })
2227
- ])
2228
- ]));
2229
- }
2230
- }), Tn = /* @__PURE__ */ X($n, [["__scopeId", "data-v-dd5f2795"]]), Ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2231
- __proto__: null,
2232
- default: Tn
2233
- }, Symbol.toStringTag, { value: "Module" }));
2234
- function ta() {
2235
- const t = se(), s = G(), o = be(), r = w(() => s.userName || ""), l = w(() => s.userInfo), d = w(() => t.appName), L = w(() => o.isLoggedIn), _ = w(() => t.isDark), g = w(() => t.theme), p = w(() => t.isCollapsed), h = w(() => t.layout);
2236
- return {
2237
- userName: r,
2238
- userInfo: l,
2239
- appName: d,
2240
- isLoggedIn: L,
2241
- isDark: _,
2242
- theme: g,
2243
- isCollapsed: p,
2244
- layout: h,
2245
- toggleTheme: () => {
2246
- t.toggleTheme();
2247
- },
2248
- toggleCollapse: () => {
2249
- t.toggleCollapse();
2250
- }
2251
- };
2252
- }
2253
- function sa() {
2254
- const t = G();
2255
- return {
2256
- isLoggedIn: w(() => t.isLoggedIn)
2257
- };
2258
- }
2259
- function oa(t, s = {}) {
2260
- const { rules: o, onSubmit: r } = s, l = k(), d = Re({ ...t }), L = k(!1), _ = k(!1), g = k(!1), p = () => {
2261
- y(), g.value = !1, _.value = !0;
2262
- }, h = (T) => {
2263
- Object.assign(d, T), g.value = !0, _.value = !0;
2264
- }, u = () => {
2265
- _.value = !1, y();
2266
- }, y = () => {
2267
- var T;
2268
- Object.keys(t).forEach((z) => {
2269
- d[z] = t[z];
2270
- }), (T = l.value) == null || T.resetFields();
2271
- };
2272
- return {
2273
- formRef: l,
2274
- formData: d,
2275
- rules: o,
2276
- loading: L,
2277
- visible: _,
2278
- isEdit: g,
2279
- openAdd: p,
2280
- openEdit: h,
2281
- close: u,
2282
- resetForm: y,
2283
- handleSubmit: async () => {
2284
- var T;
2285
- try {
2286
- await ((T = l.value) == null ? void 0 : T.validate()), L.value = !0, await (r == null ? void 0 : r(d)), u();
2287
- } catch (z) {
2288
- console.error(z);
2289
- } finally {
2290
- L.value = !1;
2291
- }
2292
- }
2293
- };
2294
- }
2295
- function na(t) {
2296
- const { fetchData: s, defaultPageSize: o = 10 } = t, r = k(!1), l = k([]), d = k(0), L = k(1), _ = k(o), g = Re({}), p = async () => {
2297
- r.value = !0;
2298
- try {
2299
- const R = {
2300
- ...g,
2301
- page: L.value,
2302
- pageSize: _.value
2303
- }, A = await s(R);
2304
- l.value = A.list, d.value = A.total;
2305
- } catch (R) {
2306
- console.error(R);
2307
- } finally {
2308
- r.value = !1;
2309
- }
2310
- }, h = () => {
2311
- L.value = 1, p();
2312
- }, u = () => {
2313
- Object.keys(g).forEach((R) => {
2314
- g[R] = void 0;
2315
- }), L.value = 1, p();
2316
- }, y = (R) => {
2317
- L.value = R, p();
2318
- }, D = (R) => {
2319
- _.value = R, L.value = 1, p();
2320
- }, T = () => {
2321
- p();
2322
- }, z = w(() => ({
2323
- current: L.value,
2324
- pageSize: _.value,
2325
- total: d.value
2326
- }));
2327
- return {
2328
- loading: r,
2329
- data: l,
2330
- total: d,
2331
- currentPage: L,
2332
- pageSize: _,
2333
- searchParams: g,
2334
- pagination: z,
2335
- getData: p,
2336
- handleSearch: h,
2337
- handleReset: u,
2338
- handlePageChange: y,
2339
- handleSizeChange: D,
2340
- refresh: T
2341
- };
2342
- }
2343
- function aa(t) {
2344
- return G().isLoggedIn;
2345
- }
2346
- function la(t) {
2347
- return G().isLoggedIn;
2348
- }
2349
- function ra() {
2350
- return !0;
2351
- }
2352
- const it = [
2353
- {
2354
- path: "/login",
2355
- name: "Login",
2356
- component: () => Promise.resolve().then(() => fn),
2357
- meta: {
2358
- title: "登录",
2359
- hidden: !0
2360
- }
2361
- },
2362
- {
2363
- path: "/404",
2364
- name: "NotFound",
2365
- component: () => Promise.resolve().then(() => bn),
2366
- meta: {
2367
- title: "404",
2368
- hidden: !0
2369
- }
2370
- },
2371
- {
2372
- path: "/403",
2373
- name: "Forbidden",
2374
- component: () => Promise.resolve().then(() => Ln),
2375
- meta: {
2376
- title: "403",
2377
- hidden: !0
2378
- }
2379
- }
2380
- ], ut = {
2381
- path: "/:pathMatch(.*)*",
2382
- redirect: "/404",
2383
- meta: {
2384
- hidden: !0
2385
- }
2386
- }, ct = {
2387
- path: "/",
2388
- name: "Layout",
2389
- component: () => Promise.resolve().then(() => en),
2390
- redirect: "/dashboard",
2391
- children: [
2392
- {
2393
- path: "/dashboard",
2394
- name: "Dashboard",
2395
- component: () => import("./index-BAJakzRz.js"),
2396
- meta: {
2397
- title: "仪表盘",
2398
- icon: "dashboard",
2399
- keepAlive: !0,
2400
- affix: !0
2401
- }
2402
- },
2403
- {
2404
- path: "/system/user",
2405
- name: "SystemUser",
2406
- component: () => import("./index-Dpv1M9Hu.js"),
2407
- meta: {
2408
- title: "用户管理",
2409
- icon: "user",
2410
- keepAlive: !0
2411
- }
2412
- },
2413
- {
2414
- path: "/system/role",
2415
- name: "SystemRole",
2416
- component: () => import("./index-Di2VPQjn.js"),
2417
- meta: {
2418
- title: "角色管理",
2419
- icon: "role",
2420
- keepAlive: !0
2421
- }
2422
- },
2423
- {
2424
- path: "/system/menu",
2425
- name: "SystemMenu",
2426
- component: () => import("./index-BadGWG4q.js"),
2427
- meta: {
2428
- title: "菜单管理",
2429
- icon: "menu",
2430
- keepAlive: !0
2431
- }
2432
- }
2433
- ]
2434
- }, ia = [
2435
- {
2436
- path: "/dashboard",
2437
- name: "Dashboard",
2438
- component: () => import("./index-BAJakzRz.js"),
2439
- meta: {
2440
- title: "仪表盘",
2441
- icon: "dashboard",
2442
- keepAlive: !0,
2443
- affix: !0
2444
- }
2445
- },
2446
- {
2447
- path: "/system",
2448
- name: "System",
2449
- redirect: "/system/user",
2450
- meta: {
2451
- title: "系统管理",
2452
- icon: "setting"
2453
- },
2454
- children: [
2455
- {
2456
- path: "user",
2457
- name: "SystemUser",
2458
- component: () => import("./index-Dpv1M9Hu.js"),
2459
- meta: {
2460
- title: "用户管理",
2461
- icon: "user",
2462
- keepAlive: !0
2463
- }
2464
- },
2465
- {
2466
- path: "role",
2467
- name: "SystemRole",
2468
- component: () => import("./index-Di2VPQjn.js"),
2469
- meta: {
2470
- title: "角色管理",
2471
- icon: "role",
2472
- keepAlive: !0
2473
- }
2474
- },
2475
- {
2476
- path: "menu",
2477
- name: "SystemMenu",
2478
- component: () => import("./index-BadGWG4q.js"),
2479
- meta: {
2480
- title: "菜单管理",
2481
- icon: "menu",
2482
- keepAlive: !0
2483
- }
2484
- }
2485
- ]
2486
- }
2487
- ], Mn = [
2488
- {
2489
- menuCode: "dashboard",
2490
- menuName: "仪表盘",
2491
- menuUrl: "/dashboard",
2492
- icon: "dashboard",
2493
- closable: !0,
2494
- isDefault: !0,
2495
- isOut: !1
2496
- },
2497
- {
2498
- menuCode: "system",
2499
- menuName: "系统管理",
2500
- menuUrl: "/system",
2501
- icon: "setting",
2502
- closable: !1,
2503
- isDefault: !1,
2504
- isOut: !1,
2505
- children: [
2506
- {
2507
- menuCode: "system_user",
2508
- menuName: "用户管理",
2509
- menuUrl: "/system/user",
2510
- icon: "user",
2511
- closable: !0,
2512
- isDefault: !1,
2513
- isOut: !1
2514
- },
2515
- {
2516
- menuCode: "system_role",
2517
- menuName: "角色管理",
2518
- menuUrl: "/system/role",
2519
- icon: "role",
2520
- closable: !0,
2521
- isDefault: !1,
2522
- isOut: !1
2523
- },
2524
- {
2525
- menuCode: "system_menu",
2526
- menuName: "菜单管理",
2527
- menuUrl: "/system/menu",
2528
- icon: "menu",
2529
- closable: !0,
2530
- isDefault: !1,
2531
- isOut: !1
2532
- }
2533
- ]
2534
- }
2535
- ], dt = Oe({
2536
- history: Ve(),
2537
- routes: [...it, ct, ut],
2538
- scrollBehavior: () => ({ left: 0, top: 0 })
2539
- }), Sn = ["/login", "/404", "/403"];
2540
- dt.beforeEach(async (t, s, o) => {
2541
- const r = se();
2542
- if (r.initTheme(), lt())
2543
- if (t.path === "/login")
2544
- o({ path: "/" });
2545
- else {
2546
- const l = G();
2547
- l.isLoggedIn || (l.setUserInfo({
2548
- appId: Ge(),
2549
- userId: "1",
2550
- userName: "管理员",
2551
- departmentName: "技术部",
2552
- email: "admin@example.com",
2553
- mobilePhone: "13800138000",
2554
- positionName: "管理员",
2555
- avatar: ""
2556
- }), ce().setMenuList(Mn)), t.name && t.meta.keepAlive && r.addCachedView(t.name), o();
2557
- }
2558
- else
2559
- Sn.includes(t.path) ? o() : o("/login");
2560
- });
2561
- function ua() {
2562
- const t = Oe({
2563
- history: Ve(),
2564
- routes: [...it, ct, ut]
2565
- });
2566
- dt.matcher = t.matcher;
2567
- }
2568
- function ca(t, s = {}) {
2569
- const o = s.indexPath || "/dashboard";
2570
- return {
2571
- path: "/",
2572
- name: "Layout",
2573
- component: rt,
2574
- redirect: o,
2575
- children: t
2576
- };
2577
- }
2578
- function da(t) {
2579
- return Oe({
2580
- history: Ve(),
2581
- routes: t,
2582
- scrollBehavior: () => ({ left: 0, top: 0 })
2583
- });
2584
- }
2585
- function ma(t) {
2586
- return P.get("/role/list", { params: t });
2587
- }
2588
- function pa(t) {
2589
- return P.get(`/role/${t}`);
2590
- }
2591
- function va(t) {
2592
- return P.post("/role", t);
2593
- }
2594
- function ha(t, s) {
2595
- return P.put(`/role/${t}`, s);
2596
- }
2597
- function _a(t) {
2598
- return P.delete(`/role/${t}`);
2599
- }
2600
- function fa(t, s) {
2601
- return P.patch(`/role/${t}/status`, { status: s });
2602
- }
2603
- function ga() {
2604
- return P.get("/user/v1.0/menu/list");
2605
- }
2606
- function In(t) {
2607
- const s = t || Ge();
2608
- return P.get(`/user/v1.0/menu/get-menu?appId=${s}`);
2609
- }
2610
- function ya(t) {
2611
- return P.post("/menu", t);
2612
- }
2613
- function ka(t, s) {
2614
- return P.put(`/menu/${t}`, s);
2615
- }
2616
- function wa(t) {
2617
- return P.delete(`/menu/${t}`);
2618
- }
2619
- const En = ["/login", "/404", "/403"];
2620
- function ba(t, s = {}) {
2621
- const o = s.whiteList || En, r = s.loginPath || "/login", l = s.homePath || "/";
2622
- t.beforeEach(async (d, L, _) => {
2623
- const g = se(), p = G(), h = ce();
2624
- if (g.initTheme(), Ne())
2625
- if (d.path === r)
2626
- _({ path: l });
2627
- else if (p.isLoggedIn)
2628
- d.name && d.meta.keepAlive && g.addCachedView(d.name), _();
2629
- else
2630
- try {
2631
- if (s.fetchUserInfo) {
2632
- const y = await s.fetchUserInfo();
2633
- p.setUserInfo(y);
2634
- } else {
2635
- const y = await dn();
2636
- p.setUserInfo(y);
2637
- }
2638
- if (s.fetchMenu) {
2639
- const y = await s.fetchMenu();
2640
- h.setMenuList(y);
2641
- } else {
2642
- const y = await In(s.appId);
2643
- h.setMenuList(y);
2644
- }
2645
- s.onLoginSuccess && s.onLoginSuccess(), d.name && d.meta.keepAlive && g.addCachedView(d.name), _({ ...d, replace: !0 });
2646
- } catch (y) {
2647
- console.error("获取用户信息失败:", y), p.clearUserInfo(), h.clearMenu(), localStorage.removeItem("token"), localStorage.removeItem("token_type"), localStorage.removeItem("refresh_token"), _({ path: r, query: { redirect: d.fullPath } });
2648
- }
2649
- else
2650
- o.includes(d.path) ? _() : _({ path: r, query: { redirect: d.fullPath } });
2651
- }), t.afterEach(() => {
2652
- });
2653
- }
2654
- function xa(t) {
2655
- return P.get("/user/list", { params: t });
2656
- }
2657
- function Ca(t) {
2658
- return P.get(`/user/${t}`);
2659
- }
2660
- function $a(t) {
2661
- return P.post("/user", t);
2662
- }
2663
- function Ta(t, s) {
2664
- return P.put(`/user/${t}`, s);
2665
- }
2666
- function La(t) {
2667
- return P.delete(`/user/${t}`);
2668
- }
2669
- function Ma(t) {
2670
- return P.post("/user/batch-delete", { ids: t });
2671
- }
2672
- function Sa(t, s) {
2673
- return P.patch(`/user/${t}/status`, { status: s });
2674
- }
2675
- function Ia(t) {
2676
- return P.post(`/user/${t}/reset-password`);
2677
- }
2678
- var Un = /* @__PURE__ */ ((t) => (t[t.ENABLED = 1] = "ENABLED", t[t.DISABLED = 0] = "DISABLED", t))(Un || {}), Nn = /* @__PURE__ */ ((t) => (t[t.UNKNOWN = 0] = "UNKNOWN", t[t.MALE = 1] = "MALE", t[t.FEMALE = 2] = "FEMALE", t))(Nn || {}), Pn = /* @__PURE__ */ ((t) => (t[t.DIRECTORY = 0] = "DIRECTORY", t[t.MENU = 1] = "MENU", t[t.BUTTON = 2] = "BUTTON", t))(Pn || {});
2679
- const Ea = {
2680
- 1: "启用",
2681
- 0: "禁用"
2682
- }, Ua = {
2683
- 0: "未知",
2684
- 1: "男",
2685
- 2: "女"
2686
- }, Na = {
2687
- 0: "目录",
2688
- 1: "菜单",
2689
- 2: "按钮"
2690
- }, Pa = [
2691
- {
2692
- label: "启用",
2693
- value: 1
2694
- /* ENABLED */
2695
- },
2696
- {
2697
- label: "禁用",
2698
- value: 0
2699
- /* DISABLED */
2700
- }
2701
- ], Da = [
2702
- {
2703
- label: "未知",
2704
- value: 0
2705
- /* UNKNOWN */
2706
- },
2707
- {
2708
- label: "男",
2709
- value: 1
2710
- /* MALE */
2711
- },
2712
- {
2713
- label: "女",
2714
- value: 2
2715
- /* FEMALE */
2716
- }
2717
- ], za = [
2718
- {
2719
- label: "目录",
2720
- value: 0
2721
- /* DIRECTORY */
2722
- },
2723
- {
2724
- label: "菜单",
2725
- value: 1
2726
- /* MENU */
2727
- },
2728
- {
2729
- label: "按钮",
2730
- value: 2
2731
- /* BUTTON */
2732
- }
2733
- ], Aa = {
2734
- mounted(t, s) {
2735
- var r;
2736
- G().isLoggedIn || (r = t.parentNode) == null || r.removeChild(t);
2737
- }
2738
- };
2739
- export {
2740
- St as $,
2741
- Wn as A,
2742
- ga as B,
2743
- In as C,
2744
- Yn as D,
2745
- qn as E,
2746
- Gn as F,
2747
- Nn as G,
2748
- Ms as H,
2749
- pa as I,
2750
- ma as J,
2751
- Ne as K,
2752
- rt as L,
2753
- Pn as M,
2754
- $t as N,
2755
- bt as O,
2756
- Ca as P,
2757
- dn as Q,
2758
- xa as R,
2759
- Un as S,
2760
- Hn as T,
2761
- aa as U,
2762
- la as V,
2763
- lt as W,
2764
- P as X,
2765
- Qn as Y,
2766
- ra as Z,
2767
- X as _,
2768
- Pa as a,
2769
- ct as a0,
2770
- b as a1,
2771
- Ce as a2,
2772
- cn as a3,
2773
- Xn as a4,
2774
- Mn as a5,
2775
- Aa as a6,
2776
- Jn as a7,
2777
- Ia as a8,
2778
- ua as a9,
2779
- dt as aa,
2780
- jn as ab,
2781
- $e as ac,
2782
- Mt as ad,
2783
- Lt as ae,
2784
- Ct as af,
2785
- wt as ag,
2786
- Tt as ah,
2787
- nt as ai,
2788
- xt as aj,
2789
- ba as ak,
2790
- it as al,
2791
- ka as am,
2792
- ha as an,
2793
- fa as ao,
2794
- Ta as ap,
2795
- Sa as aq,
2796
- ta as ar,
2797
- se as as,
2798
- sa as at,
2799
- be as au,
2800
- oa as av,
2801
- ce as aw,
2802
- na as ax,
2803
- G as ay,
2804
- za as b,
2805
- Tn as c,
2806
- Da as d,
2807
- Ua as e,
2808
- Na as f,
2809
- wn as g,
2810
- Je as h,
2811
- _n as i,
2812
- Ea as j,
2813
- ea as k,
2814
- Ma as l,
2815
- at as m,
2816
- ca as n,
2817
- ya as o,
2818
- va as p,
2819
- da as q,
2820
- $a as r,
2821
- ia as s,
2822
- wa as t,
2823
- _a as u,
2824
- La as v,
2825
- ut as w,
2826
- Zn as x,
2827
- Ge as y,
2828
- mn as z
2829
- };