@pubinfo/core 2.0.0-beta.9 → 2.0.0-rc.2
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.
- package/dist/{AppSetting-BQT7OI6K.js → AppSetting-D2RJrc9O.js} +37 -39
- package/dist/{HCheckList.vue_vue_type_script_setup_true_lang-D4u_haxr.js → HCheckList.vue_vue_type_script_setup_true_lang-DusVz35O.js} +12 -14
- package/dist/HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js +20 -0
- package/dist/HToggle-DMcVgMVY.js +34 -0
- package/dist/PreferencesContent-Dtd9rtew.js +923 -0
- package/dist/{SettingBreadcrumb-CgugOTgx.js → SettingBreadcrumb-QSCSviKM.js} +9 -9
- package/dist/{SettingCopyright-BPeCJBLi.js → SettingCopyright-Dr5P6yfq.js} +8 -8
- package/dist/{SettingEnableTransition-BK0_EH_N.js → SettingEnableTransition-DGiHEbCI.js} +20 -21
- package/dist/{SettingHome-DGnxlXLd.js → SettingHome-CEPcBlds.js} +20 -20
- package/dist/{SettingMenu-BqAd9zbL.js → SettingMenu-BJdjnRA6.js} +26 -26
- package/dist/{SettingMode-CgA3XDwW.js → SettingMode-BnuCHoEY.js} +11 -12
- package/dist/{SettingNavSearch-WFnkcRQ3.js → SettingNavSearch-CiU4BmlU.js} +9 -9
- package/dist/{SettingOther-CG4RI6mO.js → SettingOther-DTHjVlFe.js} +13 -13
- package/dist/SettingPage-D75_Nf05.js +29 -0
- package/dist/{SettingTabbar-CQA6ZT9l.js → SettingTabbar-D48dzvgA.js} +18 -18
- package/dist/SettingThemes-D-8vTs5n.js +142 -0
- package/dist/{SettingToolbar-DdR2940j.js → SettingToolbar-DjIjm9V-.js} +10 -10
- package/dist/{SettingTopbar-C_jYO_Ax.js → SettingTopbar-Cg30OTH3.js} +16 -16
- package/dist/{SettingWidthMode-ir_28SE3.js → SettingWidthMode-BKV_7kb8.js} +19 -20
- package/dist/{TopThinMode-jHDpKsma.js → TopThinMode-JFYsp_lJ.js} +1 -1
- package/dist/built-in/authentication/helper.d.ts +1 -0
- package/dist/built-in/authentication/index.d.ts +10 -0
- package/dist/built-in/authentication/interface.d.ts +7 -0
- package/dist/built-in/authentication/router.d.ts +2 -0
- package/dist/built-in/authorization/directives.d.ts +2 -0
- package/dist/built-in/authorization/helper.d.ts +6 -0
- package/dist/built-in/authorization/index.d.ts +7 -0
- package/dist/built-in/authorization/router.d.ts +3 -0
- package/dist/built-in/index.d.ts +8 -0
- package/dist/{layout → built-in/layout-component}/Layout.vue.d.ts +2 -2
- package/dist/{layout → built-in/layout-component}/components/Header/TopMode/More.vue.d.ts +1 -1
- package/dist/{layout → built-in/layout-component}/components/Header/TopMode/NotCursor.vue.d.ts +2 -0
- package/dist/{layout → built-in/layout-component}/components/Menu/sub.vue.d.ts +43 -43
- package/dist/{layout → built-in/layout-component}/components/Menu/types.d.ts +1 -1
- package/dist/{layout → built-in/layout-component}/components/Tools/Search.vue.d.ts +43 -43
- package/dist/built-in/layout-component/components/Tools/index.vue.d.ts +27 -0
- package/dist/built-in/layout-component/components/Topbar/Tabbar/MoreAction.vue.d.ts +11 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HDialog.vue.d.ts +1 -1
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HSlideover.vue.d.ts +1 -1
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HTabList.vue.d.ts +2 -2
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HTooltip.vue.d.ts +1 -1
- package/dist/{layout → built-in/layout-component}/composables/useContext.d.ts +1 -1
- package/dist/built-in/layout-component/composables/useGlobalSearch.d.ts +19 -0
- package/dist/{layout → built-in/layout-component}/composables/useHotkey.d.ts +1 -1
- package/dist/{layout → built-in/layout-component}/composables/useMenu.d.ts +1 -1
- package/dist/{layout → built-in/layout-component}/index.d.ts +5 -4
- package/dist/built-in/layout-component/utils/eventBus.d.ts +5 -0
- package/dist/built-in/layout-component/utils/index.d.ts +3 -0
- package/dist/{utils → built-in/layout-component/utils}/watermark.d.ts +1 -1
- package/dist/built-in/locales/helpler.d.ts +594 -0
- package/dist/built-in/locales/index.d.ts +5 -0
- package/dist/built-in/n-progress/index.d.ts +6 -0
- package/dist/built-in/pinia-plugin/enum.d.ts +1 -0
- package/dist/built-in/pinia-plugin/index.d.ts +5 -0
- package/dist/built-in/pinia-plugin/plugins/persist.d.ts +3 -0
- package/dist/built-in/pre-access/index.d.ts +7 -0
- package/dist/built-in/settings/index.d.ts +5 -0
- package/dist/built-in/settings/router.d.ts +3 -0
- package/dist/{colors-gu4NABiz.js → colors-CODcBxrF.js} +1 -1
- package/dist/core/create.d.ts +2 -0
- package/dist/core/ctx.d.ts +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/interface.d.ts +74 -0
- package/dist/{modules.d.ts → core/modules.d.ts} +9 -0
- package/dist/{api/index.d.ts → core/request.d.ts} +2 -4
- package/dist/core/resolver/icon.d.ts +5 -0
- package/dist/core/resolver/index.d.ts +4 -0
- package/dist/core/resolver/layout.d.ts +2 -0
- package/dist/core/resolver/page.d.ts +17 -0
- package/dist/core/resolver/resolver.d.ts +10 -0
- package/dist/{api → features/api}/modules/auth/renzhengfuwu.d.ts +7 -0
- package/dist/{api → features/api}/modules/configData/index.d.ts +1 -1
- package/dist/{api → features/api}/modules/rbac/pubJiaosezukongzhiqi.d.ts +7 -0
- package/dist/{api → features/api}/modules/rbac/ziyuanjiekou.d.ts +7 -0
- package/dist/features/api/request.d.ts +2 -0
- package/dist/{assets → features/assets}/styles/index.d.ts +2 -3
- package/dist/{composables → features/composables}/auth.d.ts +1 -1
- package/dist/features/context/index.d.ts +12 -0
- package/dist/features/enum.d.ts +21 -0
- package/dist/features/index.d.ts +7 -0
- package/dist/features/router/asyncRoutes.d.ts +14 -0
- package/dist/features/router/index.d.ts +2 -0
- package/dist/features/router/systemRoutes.d.ts +9 -0
- package/dist/features/stores/index.d.ts +1 -0
- package/dist/{stores → features/stores}/modules/favorites.d.ts +2 -2
- package/dist/{stores → features/stores}/modules/route.d.ts +6 -6
- package/dist/{stores → features/stores}/modules/tabbar.d.ts +1 -1
- package/dist/features/stores/modules/user.d.ts +36 -0
- package/dist/features/stores/utils/crypto.d.ts +1 -0
- package/dist/features/stores/utils/index.d.ts +2 -0
- package/dist/features/stores/utils/routerHelper.d.ts +17 -0
- package/dist/index-BAoB7aoj.js +49 -0
- package/dist/{reload-CUcPYtl7.js → index-BD2fkZis.js} +5 -5
- package/dist/index-BROqFYXS.js +44 -0
- package/dist/{index-CjsnFBwd.js → index-BVLkBCRY.js} +7733 -8240
- package/dist/index-D4_xmL_A.js +258 -0
- package/dist/index-DQn1WFMa.js +139 -0
- package/dist/{index-CWIfG62O.js → index-DmcblkoZ.js} +1804 -1897
- package/dist/{index-NpS61xSA.js → index-DvJr0paY.js} +54 -54
- package/dist/index-Jd3PYkpj.js +52561 -0
- package/dist/index-RT-QBzm0.js +234 -0
- package/dist/index.d.ts +23 -11
- package/dist/index.js +59 -72
- package/dist/pick-BLJM77QN.js +12 -0
- package/dist/style.css +3 -3
- package/dist/utils/index.d.ts +4 -13
- package/dist/utils/path.d.ts +1 -0
- package/dist/utils/proxy.d.ts +1 -0
- package/dist/utils/storage.d.ts +1 -2
- package/package.json +41 -43
- package/src/built-in/authentication/helper.ts +55 -0
- package/src/built-in/authentication/index.ts +42 -0
- package/src/built-in/authentication/interface.ts +7 -0
- package/src/built-in/authentication/pages/change-organization/assets/change-org.svg +1 -0
- package/src/{pages/system → built-in/authentication/pages}/change-organization/index.vue +29 -43
- package/src/built-in/authentication/pages/change-password/assets/login-small.png +0 -0
- package/src/built-in/authentication/pages/change-password/assets/login-small_dark.webp +0 -0
- package/src/built-in/authentication/pages/change-password/assets/mima.svg +1 -0
- package/src/{pages/system → built-in/authentication/pages}/change-password/components/ChangePasswordForm/index.vue +1 -1
- package/src/{pages/system → built-in/authentication/pages}/change-password/index.vue +19 -36
- package/src/built-in/authentication/router.ts +57 -0
- package/src/{directives/plugins/permission.ts → built-in/authorization/directives.ts} +6 -7
- package/src/built-in/authorization/helper.ts +11 -0
- package/src/built-in/authorization/index.ts +25 -0
- package/src/built-in/authorization/pages/not-permission/403.svg +1 -0
- package/src/built-in/authorization/pages/not-permission/403_dark.svg +1 -0
- package/src/{pages/system → built-in/authorization/pages}/not-permission/index.vue +9 -13
- package/src/{route/guard/auth.ts → built-in/authorization/router.ts} +39 -9
- package/src/built-in/index.ts +8 -0
- package/src/built-in/layout-component/Layout.vue +273 -0
- package/src/built-in/layout-component/assets/icons/favorites.svg +1 -0
- package/src/built-in/layout-component/assets/icons/toolbar-collapse.svg +1 -0
- package/src/{layout → built-in/layout-component}/components/Content/IframeView.vue +1 -2
- package/src/{layout → built-in/layout-component}/components/Content/LinkView.vue +2 -2
- package/src/built-in/layout-component/components/Content/index.vue +146 -0
- package/src/{layout → built-in/layout-component}/components/Copyright/index.vue +7 -8
- package/src/{layout → built-in/layout-component}/components/Header/TopMode/More.vue +26 -34
- package/src/built-in/layout-component/components/Header/TopMode/NotCursor.vue +70 -0
- package/src/{layout → built-in/layout-component}/components/Header/TopMode/index.vue +14 -18
- package/src/built-in/layout-component/components/Header/index.vue +171 -0
- package/src/{layout → built-in/layout-component}/components/Logo/index.vue +5 -20
- package/src/{layout → built-in/layout-component}/components/Menu/index.vue +3 -3
- package/src/{layout → built-in/layout-component}/components/Menu/item.vue +22 -27
- package/src/{layout → built-in/layout-component}/components/Menu/types.ts +1 -1
- package/src/{layout → built-in/layout-component}/components/SettingBar/AppSetting.vue +11 -11
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/DayNightToggle.vue +26 -120
- package/src/built-in/layout-component/components/SettingBar/components/SettingEnableTransition.vue +190 -0
- package/src/built-in/layout-component/components/SettingBar/components/SettingMode.vue +154 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingThemes.vue +55 -90
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingWidthMode.vue +63 -71
- package/src/built-in/layout-component/components/SettingBar/index.vue +81 -0
- package/src/{layout → built-in/layout-component}/components/Sidebar/MainSidebar.vue +87 -135
- package/src/{layout → built-in/layout-component}/components/Sidebar/SubSidebar.vue +50 -59
- package/src/built-in/layout-component/components/Tools/Breadcrumb/index.vue +15 -0
- package/src/built-in/layout-component/components/Tools/DayNightSwitch.vue +70 -0
- package/src/{layout → built-in/layout-component}/components/Tools/Preferences/PreferencesContent.vue +214 -278
- package/src/{layout → built-in/layout-component}/components/Tools/Search.vue +15 -9
- package/src/{layout → built-in/layout-component}/components/Tools/index.vue +16 -20
- package/src/{layout → built-in/layout-component}/components/Topbar/Tabbar/MoreAction.vue +102 -148
- package/src/{layout → built-in/layout-component}/components/Topbar/Tabbar/index.vue +293 -405
- package/src/{layout → built-in/layout-component}/components/Topbar/Toolbar/Favorites.vue +5 -5
- package/src/{layout → built-in/layout-component}/components/Topbar/Toolbar/index.vue +72 -67
- package/src/{layout → built-in/layout-component}/components/Topbar/index.vue +16 -19
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HCheckList.vue +1 -1
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HDialog.vue +1 -1
- package/src/built-in/layout-component/components/ui/HDivider.vue +24 -0
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HDropdownMenu.vue +1 -1
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HDropdownTree.vue +1 -1
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HSlideover.vue +1 -1
- package/src/built-in/layout-component/components/ui/HToggle.vue +133 -0
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HTooltip.vue +1 -1
- package/src/{layout → built-in/layout-component}/composables/useContext.ts +2 -2
- package/src/{layout → built-in/layout-component}/composables/useGetComputedStyle.ts +1 -1
- package/src/built-in/layout-component/composables/useGlobalSearch.ts +48 -0
- package/src/{layout → built-in/layout-component}/composables/useHotkey.ts +1 -1
- package/src/{layout → built-in/layout-component}/composables/useMainPage.ts +2 -2
- package/src/{layout → built-in/layout-component}/composables/useMenu.ts +1 -1
- package/src/{layout → built-in/layout-component}/composables/useTabbar.ts +1 -1
- package/src/{layout → built-in/layout-component}/composables/useTitle.ts +1 -1
- package/src/{layout → built-in/layout-component}/composables/useWatermark.ts +4 -4
- package/src/{layout → built-in/layout-component}/index.ts +38 -16
- package/src/{layout → built-in/layout-component}/provider.ts +8 -2
- package/src/built-in/layout-component/utils/eventBus.ts +8 -0
- package/src/built-in/layout-component/utils/index.ts +3 -0
- package/src/{utils → built-in/layout-component/utils}/watermark.ts +2 -2
- package/src/{locales/index.ts → built-in/locales/helpler.ts} +13 -17
- package/src/built-in/locales/index.ts +20 -0
- package/src/built-in/n-progress/index.ts +31 -0
- package/src/built-in/n-progress/nprogress.css +68 -0
- package/src/built-in/pinia-plugin/enum.ts +1 -0
- package/src/{stores → built-in/pinia-plugin}/helper.ts +3 -3
- package/src/built-in/pinia-plugin/index.ts +27 -0
- package/src/{stores/plugin/sideEffect → built-in/pinia-plugin/plugins}/cleanup.ts +1 -1
- package/src/{stores/plugin/sideEffect → built-in/pinia-plugin/plugins}/favoritesStorage.ts +6 -7
- package/src/{stores/plugin/sideEffect → built-in/pinia-plugin/plugins}/iframeCache.ts +3 -3
- package/src/built-in/pinia-plugin/plugins/persist.ts +21 -0
- package/src/{stores/plugin/sideEffect → built-in/pinia-plugin/plugins}/tabbarStorage.ts +7 -8
- package/src/built-in/pre-access/index.ts +20 -0
- package/src/built-in/settings/index.ts +15 -0
- package/src/{route/guard/setting.ts → built-in/settings/router.ts} +3 -2
- package/src/core/create.ts +70 -0
- package/src/core/ctx.ts +3 -0
- package/src/core/index.ts +4 -0
- package/src/core/interface.ts +89 -0
- package/src/{modules.ts → core/modules.ts} +19 -5
- package/src/core/request.ts +52 -0
- package/src/core/resolver/icon.ts +75 -0
- package/src/core/resolver/index.ts +4 -0
- package/src/core/resolver/layout.ts +23 -0
- package/src/core/resolver/page.ts +89 -0
- package/src/core/resolver/resolver.ts +25 -0
- package/src/{api → features/api}/modules/auth/renzhengfuwu.ts +47 -15
- package/src/{api → features/api}/modules/auth/typings.d.ts +34 -28
- package/src/{api → features/api}/modules/configData/heibaimingdanfuwu.ts +13 -4
- package/src/{api → features/api}/modules/configData/index.ts +1 -1
- package/src/{api → features/api}/modules/configData/typings.d.ts +79 -79
- package/src/{api → features/api}/modules/configData/xitongpeizhifuwu.ts +43 -19
- package/src/{api/modules/configData/zidianfuwu.ts → features/api/modules/configData/zidifuwu.ts} +41 -11
- package/src/{api → features/api}/modules/rbac/gangweijiekou.ts +25 -10
- package/src/{api → features/api}/modules/rbac/jiaosejiekou.ts +25 -10
- package/src/{api → features/api}/modules/rbac/pubJiaosezukongzhiqi.ts +46 -7
- package/src/{api → features/api}/modules/rbac/shujuquanxianzhubiaokongzhiqi.ts +27 -13
- package/src/{api → features/api}/modules/rbac/typings.d.ts +323 -304
- package/src/{api → features/api}/modules/rbac/yonghujiekou.ts +49 -16
- package/src/{api → features/api}/modules/rbac/yonghushoucangbiaojiekou.ts +21 -6
- package/src/{api → features/api}/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +13 -4
- package/src/{api → features/api}/modules/rbac/ziyuanjiekou.ts +44 -5
- package/src/{api → features/api}/modules/rbac/zuhuguanlijiekou.ts +21 -12
- package/src/{api → features/api}/modules/rbac/zuzhijiaosebiaokongzhiqi.ts +13 -4
- package/src/{api → features/api}/modules/rbac/zuzhijiekou.ts +29 -11
- package/src/features/api/request.ts +5 -0
- package/src/{api → features/api}/system/user.ts +1 -1
- package/src/{assets → features/assets}/fonts/digital-7/digital-7-webfont.svg +131 -133
- package/src/{assets → features/assets}/fonts/digital-7_mono/digital-7_mono-webfont.svg +130 -132
- package/src/{assets → features/assets}/images/org.svg +2 -2
- package/src/features/assets/styles/globals.css +188 -0
- package/src/{assets → features/assets}/styles/index.ts +2 -3
- package/src/features/assets/styles/rbac.css +51 -0
- package/src/features/assets/styles/resources/utils.css +53 -0
- package/src/features/assets/styles/resources/variables.css +5 -0
- package/src/features/components/MicroAppContainer/index.vue +9 -0
- package/src/features/components/NotAllowed/assets/403.svg +1 -0
- package/src/features/components/NotAllowed/assets/403_dark.svg +1 -0
- package/src/{components → features/components}/NotAllowed/index.vue +6 -8
- package/src/{components → features/components}/PassStrengthValidator/index.vue +33 -48
- package/src/{components → features/components}/PassStrengthValidator/rule.vue +13 -25
- package/src/{components → features/components}/PubinfoApp/index.vue +2 -1
- package/src/features/components/PubinfoIcon/index.vue +140 -0
- package/src/{components → features/components}/PubinfoProvider/index.ts +1 -2
- package/src/{composables → features/composables}/auth.ts +2 -2
- package/src/{composables → features/composables}/theme.ts +1 -1
- package/src/{composables → features/composables}/watchDiff.ts +1 -1
- package/src/features/context/index.ts +40 -0
- package/src/features/enum.ts +21 -0
- package/src/features/index.ts +8 -0
- package/src/features/pages/not-found/assets/404.svg +1 -0
- package/src/features/pages/not-found/assets/404_dark.svg +1 -0
- package/src/{pages/system/[...all].vue → features/pages/not-found/index.vue} +6 -8
- package/src/{pages/personal → features/pages}/profile/index.vue +1 -1
- package/src/features/router/asyncRoutes.ts +35 -0
- package/src/features/router/index.ts +2 -0
- package/src/features/router/systemRoutes.ts +45 -0
- package/src/{config/settings.ts → features/settings/index.ts} +0 -1
- package/src/{stores/enum/index.ts → features/stores/enum.ts} +0 -1
- package/src/features/stores/index.ts +1 -0
- package/src/{stores → features/stores}/modules/keepAlive.ts +1 -0
- package/src/{stores → features/stores}/modules/menu.ts +44 -6
- package/src/{stores → features/stores}/modules/route.ts +89 -65
- package/src/{stores → features/stores}/modules/settings.ts +27 -10
- package/src/{stores → features/stores}/modules/tabbar.ts +8 -5
- package/src/{stores → features/stores}/modules/user.ts +60 -25
- package/src/{utils → features/stores/utils}/crypto.ts +7 -10
- package/src/features/stores/utils/index.ts +2 -0
- package/src/features/stores/utils/routerHelper.ts +221 -0
- package/src/index.ts +117 -12
- package/src/utils/cleanup.ts +1 -1
- package/src/utils/index.ts +4 -43
- package/src/utils/path.ts +5 -0
- package/src/utils/proxy.ts +36 -0
- package/src/utils/storage.ts +2 -4
- package/types/auto-imports.d.ts +3 -10
- package/types/components.d.ts +16 -15
- package/types/menu.d.ts +2 -0
- package/types/module.d.ts +2 -15
- package/types/settings.d.ts +0 -8
- package/types/tabbar.d.ts +1 -0
- package/types/vue-router.d.ts +11 -7
- package/dist/HButton.vue_vue_type_script_setup_true_lang-CYAzn9Mg.js +0 -25
- package/dist/HDivider-DgXBhPr0.js +0 -21
- package/dist/HToggle-Cd71WKvG.js +0 -34
- package/dist/PreferencesContent-MR1Db7z7.js +0 -972
- package/dist/SettingPage-C1CT1Mm8.js +0 -29
- package/dist/SettingThemes-BJu9czNK.js +0 -144
- package/dist/_...all_-18BnHmEa.js +0 -52
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/api/helper.d.ts +0 -32
- package/dist/api/interface.d.ts +0 -14
- package/dist/api/request.d.ts +0 -2
- package/dist/api/system/app.d.ts +0 -17
- package/dist/config/index.d.ts +0 -1
- package/dist/context.d.ts +0 -14
- package/dist/create.d.ts +0 -3
- package/dist/directives/index.d.ts +0 -4
- package/dist/directives/plugins/permission.d.ts +0 -6
- package/dist/index-C1p_tY7i.js +0 -49
- package/dist/index-CCPTQYuB.js +0 -12910
- package/dist/index-CNUEMTao.js +0 -354
- package/dist/index-CmXo8ShY.js +0 -276
- package/dist/index-DL8Y7jFG.js +0 -137
- package/dist/index-DTQQt_XY.js +0 -10
- package/dist/index-Dj8zy7hH.js +0 -230
- package/dist/index.vue_vue_type_style_index_0_scoped_fa1c6ee4_lang-BCo6Ft-Q.js +0 -2300
- package/dist/interface.d.ts +0 -29
- package/dist/layout/components/Tools/index.vue.d.ts +0 -233
- package/dist/layout/components/Topbar/Tabbar/MoreAction.vue.d.ts +0 -217
- package/dist/locales/index.d.ts +0 -301
- package/dist/menu-CLiZ1BO_.js +0 -15315
- package/dist/pick-C9bU8_xv.js +0 -19
- package/dist/request.js +0 -1811
- package/dist/route/async.d.ts +0 -9
- package/dist/route/guard/auth.d.ts +0 -3
- package/dist/route/guard/basic.d.ts +0 -3
- package/dist/route/guard/index.d.ts +0 -3
- package/dist/route/guard/setting.d.ts +0 -3
- package/dist/route/index.d.ts +0 -7
- package/dist/route/routes.d.ts +0 -3
- package/dist/stores/index.d.ts +0 -5
- package/dist/stores/modules/user.d.ts +0 -4
- package/dist/stores/plugin/persist.d.ts +0 -5
- package/dist/stores/plugin/sideEffect/index.d.ts +0 -5
- package/dist/utils/crypto.d.ts +0 -4
- package/dist/utils/eventBus.d.ts +0 -5
- package/src/api/helper.ts +0 -64
- package/src/api/index.ts +0 -75
- package/src/api/interface.ts +0 -15
- package/src/api/request.ts +0 -4
- package/src/api/system/app.ts +0 -28
- package/src/assets/icons/403.svg +0 -1
- package/src/assets/icons/403_dark.svg +0 -1
- package/src/assets/icons/404.svg +0 -1
- package/src/assets/icons/404_dark.svg +0 -1
- package/src/assets/icons/add-child.svg +0 -1
- package/src/assets/icons/authority.svg +0 -1
- package/src/assets/icons/authorize.svg +0 -1
- package/src/assets/icons/blacklist-disable.svg +0 -1
- package/src/assets/icons/blacklist-enable.svg +0 -1
- package/src/assets/icons/browser-360.svg +0 -1
- package/src/assets/icons/browser-chrome.svg +0 -1
- package/src/assets/icons/browser-edge.svg +0 -1
- package/src/assets/icons/browser-ie.svg +0 -1
- package/src/assets/icons/browser-other.svg +0 -1
- package/src/assets/icons/browser-qq.svg +0 -1
- package/src/assets/icons/browser-safari.svg +0 -1
- package/src/assets/icons/browser-uc.svg +0 -1
- package/src/assets/icons/change-org.svg +0 -1
- package/src/assets/icons/edit.svg +0 -1
- package/src/assets/icons/empty-data.svg +0 -1
- package/src/assets/icons/favorites.svg +0 -1
- package/src/assets/icons/icard.svg +0 -1
- package/src/assets/icons/icon_animation.svg +0 -1
- package/src/assets/icons/icon_breadcrumb.svg +0 -1
- package/src/assets/icons/icon_copyright.svg +0 -1
- package/src/assets/icons/icon_jt.svg +0 -1
- package/src/assets/icons/icon_layout.svg +0 -1
- package/src/assets/icons/icon_mainpage.svg +0 -1
- package/src/assets/icons/icon_menu.svg +0 -1
- package/src/assets/icons/icon_page_size.svg +0 -1
- package/src/assets/icons/icon_position_type.svg +0 -1
- package/src/assets/icons/icon_safe_manage.svg +0 -1
- package/src/assets/icons/icon_screen_scale.svg +0 -6
- package/src/assets/icons/icon_system_manage.svg +0 -1
- package/src/assets/icons/icon_tabbar.svg +0 -1
- package/src/assets/icons/icon_toolbar.svg +0 -1
- package/src/assets/icons/icon_topbar.svg +0 -1
- package/src/assets/icons/icon_watermark.svg +0 -1
- package/src/assets/icons/image-load-fail.svg +0 -1
- package/src/assets/icons/log-center.svg +0 -1
- package/src/assets/icons/logo-sig.svg +0 -1
- package/src/assets/icons/mima.svg +0 -1
- package/src/assets/icons/not-data.svg +0 -1
- package/src/assets/icons/org-main.svg +0 -1
- package/src/assets/icons/org-unmain.svg +0 -1
- package/src/assets/icons/process-management.svg +0 -1
- package/src/assets/icons/project-management.svg +0 -1
- package/src/assets/icons/rbac.svg +0 -1
- package/src/assets/icons/remove.svg +0 -1
- package/src/assets/icons/resource-app.svg +0 -1
- package/src/assets/icons/resource-btn.svg +0 -1
- package/src/assets/icons/resource-index.svg +0 -1
- package/src/assets/icons/resource-menu.svg +0 -1
- package/src/assets/icons/resource-nonmenu.svg +0 -1
- package/src/assets/icons/setting-manage.svg +0 -1
- package/src/assets/icons/test.svg +0 -1
- package/src/assets/icons/theme-check-mark.svg +0 -1
- package/src/assets/icons/theme-title.svg +0 -1
- package/src/assets/icons/toolbar-collapse.svg +0 -1
- package/src/assets/icons/tree_icon.svg +0 -1
- package/src/assets/icons/tree_icon_checked.svg +0 -1
- package/src/assets/icons/view.svg +0 -1
- package/src/assets/icons/workbench.svg +0 -1
- package/src/assets/icons/zddata.svg +0 -1
- package/src/assets/icons/zy_checked.svg +0 -1
- package/src/assets/icons/zy_default.svg +0 -1
- package/src/assets/images/layout/item1.webp +0 -0
- package/src/assets/images/layout/item1_dark.webp +0 -0
- package/src/assets/images/layout/item2.webp +0 -0
- package/src/assets/images/layout/item2_dark.webp +0 -0
- package/src/assets/images/layout/item3.webp +0 -0
- package/src/assets/images/layout/item3_dark.webp +0 -0
- package/src/assets/images/layout/item4.webp +0 -0
- package/src/assets/images/layout/item4_dark.webp +0 -0
- package/src/assets/images/layout/item5.webp +0 -0
- package/src/assets/images/layout/item5_dark.webp +0 -0
- package/src/assets/images/page-width/anto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/auto.webp +0 -0
- package/src/assets/images/page-width/auto_dark.webp +0 -0
- package/src/assets/images/page-width/auto_min_w.webp +0 -0
- package/src/assets/images/page-width/auto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/icon_auto.webp +0 -0
- package/src/assets/images/page-width/icon_auto_dark.webp +0 -0
- package/src/assets/images/page-width/icon_auto_min_w.webp +0 -0
- package/src/assets/images/page-width/icon_auto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/icon_middle.webp +0 -0
- package/src/assets/images/page-width/icon_middle_dark.webp +0 -0
- package/src/assets/images/page-width/icon_middle_max_w.webp +0 -0
- package/src/assets/images/page-width/icon_middle_max_w_dark.webp +0 -0
- package/src/assets/images/page-width/middle.webp +0 -0
- package/src/assets/images/page-width/middle_dark.webp +0 -0
- package/src/assets/images/page-width/middle_max_w.webp +0 -0
- package/src/assets/images/page-width/middle_max_w_dark.webp +0 -0
- package/src/assets/styles/globals.scss +0 -189
- package/src/assets/styles/nprogress.scss +0 -63
- package/src/assets/styles/rbac.scss +0 -61
- package/src/assets/styles/resources/utils.scss +0 -53
- package/src/assets/styles/resources/variables.scss +0 -6
- package/src/components/PubinfoIcon/index.vue +0 -85
- package/src/config/index.ts +0 -1
- package/src/context.ts +0 -30
- package/src/create.ts +0 -88
- package/src/directives/index.ts +0 -6
- package/src/interface.ts +0 -35
- package/src/layout/Layout.vue +0 -330
- package/src/layout/components/Content/index.vue +0 -100
- package/src/layout/components/Header/TopMode/NotCursor.vue +0 -77
- package/src/layout/components/Header/index.vue +0 -263
- package/src/layout/components/SettingBar/components/SettingEnableTransition.vue +0 -215
- package/src/layout/components/SettingBar/components/SettingMode.vue +0 -164
- package/src/layout/components/SettingBar/index.vue +0 -112
- package/src/layout/components/Tools/Breadcrumb/index.vue +0 -21
- package/src/layout/components/Tools/DayNightSwitch.vue +0 -93
- package/src/layout/components/Tools/I18nSelector.vue +0 -52
- package/src/layout/ui-kit/HDivider.vue +0 -53
- package/src/layout/ui-kit/HToggle.vue +0 -177
- package/src/pages/system/change-password/page.vue +0 -58
- package/src/pages/system/index.vue +0 -5
- package/src/route/async.ts +0 -18
- package/src/route/guard/basic.ts +0 -23
- package/src/route/guard/index.ts +0 -3
- package/src/route/index.ts +0 -12
- package/src/route/routes.ts +0 -101
- package/src/stores/index.ts +0 -10
- package/src/stores/plugin/persist.ts +0 -27
- package/src/stores/plugin/sideEffect/index.ts +0 -15
- package/src/utils/eventBus.ts +0 -15
- package/dist/{api/enum/code.d.ts → built-in/authentication/enum.d.ts} +0 -0
- package/dist/{components/NotAllowed → built-in/authentication/pages/change-organization}/index.vue.d.ts +0 -0
- package/dist/{pages/system → built-in/authentication/pages}/change-password/components/ChangePasswordForm/index.vue.d.ts +0 -0
- package/dist/{pages/system → built-in/authentication/pages}/change-password/index.vue.d.ts +0 -0
- package/dist/{layout/components/Topbar/Toolbar → built-in/authorization/pages/not-permission}/index.vue.d.ts +0 -0
- package/dist/{components/PubinfoApp → built-in/layout-component/components/BackTop}/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Content/IframeView.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Content/LinkView.vue.d.ts +0 -0
- package/dist/{layout/components/BackTop → built-in/layout-component/components/Content}/index.vue.d.ts +0 -0
- package/dist/{layout/components/Content → built-in/layout-component/components/Copyright}/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Header/TopMode/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Header/TopThinMode.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Header/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Logo/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Menu/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Menu/item.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/AppSetting.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/DayNightToggle.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingBreadcrumb.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingCopyright.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingEnableTransition.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingHome.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingMenu.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingMode.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingNavSearch.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingOther.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingPage.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingTabbar.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingThemes.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingToolbar.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingTopbar.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/SettingBar/components/SettingWidthMode.vue.d.ts +0 -0
- package/dist/{layout/components/Copyright → built-in/layout-component/components/SettingBar}/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Sidebar/MainSidebar.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Sidebar/SubSidebar.vue.d.ts +0 -0
- package/dist/{layout/components/SettingBar → built-in/layout-component/components/Sidebar}/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Tools/Breadcrumb/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Tools/Breadcrumb/item.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Tools/DayNightSwitch.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Tools/HotkeysIntro.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Tools/Preferences/PreferencesContent.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Tools/Preferences/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Topbar/Tabbar/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Topbar/Toolbar/Favorites.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/components/Topbar/Toolbar/Star.vue.d.ts +0 -0
- package/dist/{layout/components/Topbar → built-in/layout-component/components/Topbar/Toolbar}/index.vue.d.ts +0 -0
- package/dist/{pages/personal/profile → built-in/layout-component/components/Topbar}/index.vue.d.ts +0 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HBadge.vue.d.ts +0 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HButton.vue.d.ts +1 -1
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HCheckList.vue.d.ts +2 -2
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HDivider.vue.d.ts +0 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HDropdown.vue.d.ts +0 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HDropdownMenu.vue.d.ts +0 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HDropdownTree.vue.d.ts +0 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HInput.vue.d.ts +0 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HKbd.vue.d.ts +0 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HSelect.vue.d.ts +0 -0
- package/dist/{layout/ui-kit → built-in/layout-component/components/ui}/HToggle.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/composables/useGetComputedStyle.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/composables/useMainPage.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/composables/useTabbar.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/composables/useTitle.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/composables/useViewTransition.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/composables/useWatermark.d.ts +0 -0
- package/dist/{pages/system/change-organization → built-in/layout-component/pages/reload}/index.vue.d.ts +0 -0
- package/dist/{layout → built-in/layout-component}/provider.d.ts +0 -0
- package/dist/{utils → built-in/layout-component/utils}/injectionKeys.d.ts +0 -0
- package/dist/{locales → built-in/locales}/lang/en.json.d.ts +0 -0
- package/dist/{locales → built-in/locales}/lang/zh-cn.json.d.ts +0 -0
- package/dist/{locales → built-in/locales}/lang/zh-tw.json.d.ts +0 -0
- package/dist/{locales → built-in/locales}/ui.d.ts +0 -0
- package/dist/{stores → built-in/pinia-plugin}/helper.d.ts +0 -0
- package/dist/{stores/plugin/sideEffect → built-in/pinia-plugin/plugins}/cleanup.d.ts +0 -0
- package/dist/{stores/plugin/sideEffect → built-in/pinia-plugin/plugins}/favoritesStorage.d.ts +0 -0
- package/dist/{stores/plugin/sideEffect → built-in/pinia-plugin/plugins}/iframeCache.d.ts +0 -0
- package/dist/{stores/plugin/sideEffect → built-in/pinia-plugin/plugins}/tabbarStorage.d.ts +0 -0
- package/dist/{utils → core}/utils.d.ts +0 -0
- package/dist/{api → features/api}/modules/auth/index.d.ts +0 -0
- package/dist/{api → features/api}/modules/configData/heibaimingdanfuwu.d.ts +0 -0
- package/dist/{api → features/api}/modules/configData/xitongpeizhifuwu.d.ts +0 -0
- package/dist/{api/modules/configData/zidianfuwu.d.ts → features/api/modules/configData/zidifuwu.d.ts} +0 -0
- package/dist/{api → features/api}/modules/rbac/gangweijiekou.d.ts +0 -0
- package/dist/{api → features/api}/modules/rbac/index.d.ts +0 -0
- package/dist/{api → features/api}/modules/rbac/jiaosejiekou.d.ts +0 -0
- package/dist/{api → features/api}/modules/rbac/shujuquanxianzhubiaokongzhiqi.d.ts +0 -0
- package/dist/{api → features/api}/modules/rbac/yonghujiekou.d.ts +0 -0
- package/dist/{api → features/api}/modules/rbac/yonghushoucangbiaojiekou.d.ts +0 -0
- package/dist/{api → features/api}/modules/rbac/yonghuzuijinchangyongbiaojiekou.d.ts +0 -0
- package/dist/{api → features/api}/modules/rbac/zuhuguanlijiekou.d.ts +0 -0
- package/dist/{api → features/api}/modules/rbac/zuzhijiaosebiaokongzhiqi.d.ts +0 -0
- package/dist/{api → features/api}/modules/rbac/zuzhijiekou.d.ts +0 -0
- package/dist/{api → features/api}/system/user.d.ts +0 -0
- package/dist/{pages/system → features/components/MicroAppContainer}/index.vue.d.ts +0 -0
- package/dist/{pages/system/not-permission → features/components/NotAllowed}/index.vue.d.ts +0 -0
- package/dist/{components → features/components}/PageHeader/index.vue.d.ts +0 -0
- package/dist/{components → features/components}/PageMain/index.vue.d.ts +0 -0
- package/dist/{components → features/components}/PassStrengthValidator/index.vue.d.ts +2 -2
- package/dist/{components → features/components}/PassStrengthValidator/rule.vue.d.ts +0 -0
- package/dist/{layout/components/Sidebar → features/components/PubinfoApp}/index.vue.d.ts +0 -0
- package/dist/{components → features/components}/PubinfoIcon/index.vue.d.ts +0 -0
- package/dist/{components → features/components}/PubinfoProvider/index.d.ts +0 -0
- package/dist/{components → features/components}/index.d.ts +0 -0
- package/dist/{composables → features/composables}/index.d.ts +0 -0
- package/dist/{composables → features/composables}/log.d.ts +0 -0
- package/dist/{composables → features/composables}/theme.d.ts +0 -0
- package/dist/{composables → features/composables}/watchDiff.d.ts +0 -0
- package/dist/{pages/system/[...all].vue.d.ts → features/pages/not-found/index.vue.d.ts} +0 -0
- package/dist/{pages/system/reload.vue.d.ts → features/pages/profile/index.vue.d.ts} +0 -0
- package/dist/{config/settings.d.ts → features/settings/index.d.ts} +0 -0
- package/dist/{stores/enum/index.d.ts → features/stores/enum.d.ts} +0 -0
- package/dist/{stores → features/stores}/modules/iframe.d.ts +0 -0
- package/dist/{stores → features/stores}/modules/index.d.ts +0 -0
- package/dist/{stores → features/stores}/modules/keepAlive.d.ts +0 -0
- package/dist/{stores → features/stores}/modules/menu.d.ts +0 -0
- package/dist/{stores → features/stores}/modules/settings.d.ts +0 -0
- package/src/{api/enum/code.ts → built-in/authentication/enum.ts} +0 -0
- package/src/{assets/images → built-in/authentication/pages/change-organization/assets}/login-small.png +0 -0
- package/src/{assets/images → built-in/authentication/pages/change-organization/assets}/login-small_dark.webp +0 -0
- package/src/{assets → built-in/layout-component/assets}/images/not-cursor.png +0 -0
- package/src/{layout → built-in/layout-component}/components/BackTop/index.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/Header/TopThinMode.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/Menu/sub.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingBreadcrumb.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingCopyright.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingHome.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingMenu.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingNavSearch.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingOther.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingPage.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingTabbar.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingToolbar.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/SettingBar/components/SettingTopbar.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/Sidebar/index.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/Tools/Breadcrumb/item.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/Tools/HotkeysIntro.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/Tools/Preferences/index.vue +0 -0
- package/src/{layout → built-in/layout-component}/components/Topbar/Toolbar/Star.vue +0 -0
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HBadge.vue +0 -0
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HButton.vue +0 -0
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HDropdown.vue +0 -0
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HInput.vue +0 -0
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HKbd.vue +0 -0
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HSelect.vue +0 -0
- package/src/{layout/ui-kit → built-in/layout-component/components/ui}/HTabList.vue +0 -0
- package/src/{layout → built-in/layout-component}/composables/useViewTransition.ts +0 -0
- package/src/{pages/system/reload.vue → built-in/layout-component/pages/reload/index.vue} +0 -0
- package/src/{utils → built-in/layout-component/utils}/injectionKeys.ts +0 -0
- package/src/{locales → built-in/locales}/lang/en.json +0 -0
- package/src/{locales → built-in/locales}/lang/zh-cn.json +0 -0
- package/src/{locales → built-in/locales}/lang/zh-tw.json +0 -0
- package/src/{locales → built-in/locales}/ui.ts +0 -0
- package/src/{utils → core}/utils.ts +0 -0
- package/src/{api → features/api}/modules/auth/index.ts +0 -0
- package/src/{api → features/api}/modules/rbac/index.ts +0 -0
- package/src/{api → features/api}/system/typings.d.ts +0 -0
- package/src/{assets → features/assets}/fonts/digital-7/digital-7-webfont.eot +0 -0
- package/src/{assets → features/assets}/fonts/digital-7/digital-7-webfont.woff +0 -0
- package/src/{assets → features/assets}/fonts/digital-7/digital-7-webfont.woff2 +0 -0
- package/src/{assets → features/assets}/fonts/digital-7/stylesheet.css +0 -0
- package/src/{assets → features/assets}/fonts/digital-7_mono/digital-7_mono-webfont.eot +0 -0
- package/src/{assets → features/assets}/fonts/digital-7_mono/digital-7_mono-webfont.woff +0 -0
- package/src/{assets → features/assets}/fonts/digital-7_mono/digital-7_mono-webfont.woff2 +0 -0
- package/src/{assets → features/assets}/fonts/digital-7_mono/stylesheet.css +0 -0
- package/src/{assets → features/assets}/fonts/title.otf +0 -0
- package/src/{assets → features/assets}/images/change-org-bc.webp +0 -0
- package/src/{assets → features/assets}/images/header-bg.png +0 -0
- package/src/{assets → features/assets}/images/logo.png +0 -0
- package/src/{assets → features/assets}/images/slider-bg.png +0 -0
- package/src/{components → features/components}/PageHeader/index.vue +0 -0
- package/src/{components → features/components}/PageMain/index.vue +0 -0
- package/src/{components → features/components}/index.ts +0 -0
- package/src/{composables → features/composables}/index.ts +0 -0
- package/src/{composables → features/composables}/log.ts +0 -0
- package/src/{stores → features/stores}/modules/favorites.ts +1 -1
- /package/src/{stores → features/stores}/modules/iframe.ts +0 -0
- /package/src/{stores → features/stores}/modules/index.ts +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
import { setupDefaultLayout } from '@/core';
|
|
3
|
+
import { useSettingsStore } from '@/features/stores';
|
|
4
|
+
|
|
5
|
+
// #region --- 系统路由
|
|
6
|
+
const systemRoutes: RouteRecordRaw[] = [
|
|
7
|
+
{
|
|
8
|
+
path: '/',
|
|
9
|
+
meta: {
|
|
10
|
+
title: () => useSettingsStore().settings.home.title,
|
|
11
|
+
breadcrumb: false,
|
|
12
|
+
},
|
|
13
|
+
children: [
|
|
14
|
+
// TODO 优化掉该页面
|
|
15
|
+
{
|
|
16
|
+
path: 'profile',
|
|
17
|
+
name: 'Profile',
|
|
18
|
+
component: () => import('@/features/pages/profile/index.vue'),
|
|
19
|
+
meta: {
|
|
20
|
+
title: '个人中心',
|
|
21
|
+
i18n: 'route.personal.profile',
|
|
22
|
+
icon: 'i-iconamoon-profile-duotone',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 定义并注册系统路由(含Layout)
|
|
31
|
+
*/
|
|
32
|
+
export function defineSystemRoutes(routes: RouteRecordRaw[]) {
|
|
33
|
+
systemRoutes[0].children?.push(...routes);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 读取注册的系统路由
|
|
38
|
+
*/
|
|
39
|
+
export function getSystemRoutes() {
|
|
40
|
+
if (!systemRoutes[0].component) {
|
|
41
|
+
systemRoutes[0].component = setupDefaultLayout();
|
|
42
|
+
}
|
|
43
|
+
return systemRoutes;
|
|
44
|
+
}
|
|
45
|
+
// #endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './modules';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Menu } from '#/menu';
|
|
2
2
|
|
|
3
|
-
import { resolveRoutePath } from '@/utils';
|
|
4
3
|
import { get, isNumber } from 'lodash-es';
|
|
4
|
+
import { match } from 'path-to-regexp';
|
|
5
5
|
import { defineStore } from 'pinia';
|
|
6
|
-
|
|
6
|
+
import { useWarn } from '@/features/composables';
|
|
7
|
+
import { resolveRoutePath } from '@/utils';
|
|
7
8
|
import { STORE_NAME } from '../enum';
|
|
8
9
|
import useRouteStore from './route';
|
|
9
10
|
import useSettingsStore from './settings';
|
|
@@ -106,7 +107,7 @@ const useMenuStore = defineStore(
|
|
|
106
107
|
});
|
|
107
108
|
|
|
108
109
|
/**
|
|
109
|
-
* TODO: 如果第一个菜单是一个isDev为true的菜单,那么这个计算属性可能会出现问题
|
|
110
|
+
* TODO V1: 如果第一个菜单是一个isDev为true的菜单,那么这个计算属性可能会出现问题
|
|
110
111
|
* 返回第一个侧边栏菜单的最深路径的计算属性。
|
|
111
112
|
*
|
|
112
113
|
* @returns {string} 第一个侧边栏菜单的最深路径,如果没有侧边栏菜单则返回'/'。
|
|
@@ -125,13 +126,26 @@ const useMenuStore = defineStore(
|
|
|
125
126
|
*/
|
|
126
127
|
function getDeepestPath(menu: Menu.recordRaw, rootPath = '') {
|
|
127
128
|
let retnPath = '';
|
|
128
|
-
if (menu.children) {
|
|
129
|
+
if (menu.children && menu.children.length > 0) {
|
|
130
|
+
// CLOSE: 优化菜单查找逻辑,优先找到可显示在侧边栏的菜单
|
|
129
131
|
const item = menu.children.find(item => item.meta?.sidebar !== false);
|
|
130
132
|
if (item) {
|
|
131
133
|
retnPath = getDeepestPath(item, resolveRoutePath(rootPath, menu.path));
|
|
132
134
|
}
|
|
133
135
|
else {
|
|
134
|
-
|
|
136
|
+
// TODO: 如果没有找到可显示的菜单,检查是否所有子菜单都被隐藏
|
|
137
|
+
const hasVisibleChildren = menu.children.some(child =>
|
|
138
|
+
child.meta?.sidebar !== false || (child.children && child.children.length > 0),
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
if (hasVisibleChildren) {
|
|
142
|
+
retnPath = getDeepestPath(menu.children[0], resolveRoutePath(rootPath, menu.path));
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
// FIX-ME: 目录下没有可显示的菜单时,返回当前路径或默认路径
|
|
146
|
+
useWarn(`目录"${menu.meta?.title || menu.path}"下没有可显示的菜单项`);
|
|
147
|
+
retnPath = resolveRoutePath(rootPath, menu.path);
|
|
148
|
+
}
|
|
135
149
|
}
|
|
136
150
|
}
|
|
137
151
|
else {
|
|
@@ -185,13 +199,37 @@ const useMenuStore = defineStore(
|
|
|
185
199
|
}
|
|
186
200
|
else {
|
|
187
201
|
// 如果是 string 类型,则认为是路由,需要查找对应的主导航索引
|
|
188
|
-
const findIndex = allMenus.value
|
|
202
|
+
const findIndex = findRootIndexByPath(allMenus.value, data);
|
|
189
203
|
if (findIndex >= 0) {
|
|
190
204
|
actived.value = findIndex;
|
|
191
205
|
}
|
|
192
206
|
}
|
|
193
207
|
}
|
|
194
208
|
|
|
209
|
+
/**
|
|
210
|
+
* 根据路径查找主导航索引
|
|
211
|
+
*/
|
|
212
|
+
function findRootIndexByPath(routes: Menu.recordRaw[], targetPath: string) {
|
|
213
|
+
function containsPath(route: Menu.recordRaw): boolean {
|
|
214
|
+
const matcher = match(route.path ?? '', { decode: decodeURIComponent });
|
|
215
|
+
if (matcher(targetPath)) {
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
if (route.children) {
|
|
219
|
+
return route.children.some(child => containsPath(child));
|
|
220
|
+
}
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
for (let i = 0; i < routes.length; i++) {
|
|
225
|
+
if (containsPath(routes[i])) {
|
|
226
|
+
return i;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return 0;
|
|
231
|
+
}
|
|
232
|
+
|
|
195
233
|
return {
|
|
196
234
|
menus,
|
|
197
235
|
actived,
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { Route } from '#/vue-router';
|
|
2
2
|
import type { RouteMeta, RouteRecordRaw } from 'vue-router';
|
|
3
3
|
|
|
4
|
-
import { GetApiRouteList } from '@/api/system/app';
|
|
5
|
-
import { readProject } from '@/context';
|
|
6
|
-
import { getAsyncRoutes } from '@/route';
|
|
7
|
-
import { systemRoutes } from '@/route/routes';
|
|
8
|
-
import { resolveRoutePath } from '@/utils';
|
|
9
4
|
import { cloneDeep, defaultTo, get, has, isArray, isString, isUndefined, merge, omit } from 'lodash-es';
|
|
10
5
|
import { defineStore } from 'pinia';
|
|
6
|
+
import { setupDefaultLayout } from '@/core';
|
|
7
|
+
import { postRbacResourceMineOrAllResourceTree } from '@/features/api/modules/rbac';
|
|
8
|
+
import { useWarn } from '@/features/composables';
|
|
9
|
+
import { RESOURCE_TYPE } from '@/features/enum';
|
|
10
|
+
import { getAsyncRoutes, getSystemRoutes } from '@/features/router';
|
|
11
|
+
import { resolveRoutePath } from '@/utils';
|
|
11
12
|
import { STORE_NAME } from '../enum';
|
|
13
|
+
import { formatBackRoutes } from '../utils';
|
|
12
14
|
import useSettingsStore from './settings';
|
|
13
15
|
import useTabbarStore from './tabbar';
|
|
14
16
|
import useUserStore from './user';
|
|
@@ -24,6 +26,7 @@ const useRouteStore = defineStore(
|
|
|
24
26
|
|
|
25
27
|
const isGenerate = ref(false);
|
|
26
28
|
const routesRaw = ref<Route.recordMainRaw[]>([]);
|
|
29
|
+
const remoteRoutesRaw = ref<API.PubResourceTreeBo[]>([]);
|
|
27
30
|
const filesystemRoutesRaw = ref<RouteRecordRaw[]>([]);
|
|
28
31
|
const currentRemoveRoutes = ref<Array<{
|
|
29
32
|
(): void
|
|
@@ -160,7 +163,14 @@ const useRouteStore = defineStore(
|
|
|
160
163
|
|
|
161
164
|
if (routesRaw.value.length) {
|
|
162
165
|
routesRaw.value.forEach((item) => {
|
|
163
|
-
//
|
|
166
|
+
// CLOSE: 开发模式应用的子路由不应该被扁平化到vue-router中
|
|
167
|
+
// 开发模式应用只在TopMode中显示,点击时显示开发状态
|
|
168
|
+
if (get(item, 'meta.isDev', false)) {
|
|
169
|
+
useWarn(`开发模式应用"${item.meta?.title}"的子路由将不会被注册到vue-router中`);
|
|
170
|
+
return; // 跳过开发模式应用的路由扁平化
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// TODO V1: 兼容写法,垫补后续逻辑需要有 children
|
|
164
174
|
if (item.children?.length) {
|
|
165
175
|
let tmpRoutes = cloneDeep(item.children);
|
|
166
176
|
tmpRoutes = tmpRoutes.map((childrenRoute) => {
|
|
@@ -190,6 +200,7 @@ const useRouteStore = defineStore(
|
|
|
190
200
|
* @returns {Array<RouteRecordRaw>} 扁平化的系统路由。
|
|
191
201
|
*/
|
|
192
202
|
const flatSystemRoutes = computed(() => {
|
|
203
|
+
const systemRoutes = getSystemRoutes();
|
|
193
204
|
const routes = [...systemRoutes];
|
|
194
205
|
routes.forEach(item => flattenSystemRoutes(item));
|
|
195
206
|
return routes;
|
|
@@ -237,14 +248,14 @@ const useRouteStore = defineStore(
|
|
|
237
248
|
routes.forEach((route) => {
|
|
238
249
|
if (hasPermission(permissions, route)) {
|
|
239
250
|
const tmpRoute = cloneDeep(route);
|
|
240
|
-
if (tmpRoute.children) {
|
|
251
|
+
if (tmpRoute.children && tmpRoute.children.length > 0) {
|
|
241
252
|
tmpRoute.children = filterAsyncRoutes(tmpRoute.children, permissions);
|
|
242
253
|
if (tmpRoute.children.length || get(tmpRoute, 'meta.isDev', false)) {
|
|
243
254
|
res.push(tmpRoute);
|
|
244
255
|
}
|
|
245
256
|
}
|
|
246
257
|
else {
|
|
247
|
-
// TODO: 兼容写法,垫补后续逻辑需要有 children
|
|
258
|
+
// TODO V1: 兼容写法,垫补后续逻辑需要有 children
|
|
248
259
|
if (get(tmpRoute, 'meta.isDev', false)) {
|
|
249
260
|
tmpRoute.children = [];
|
|
250
261
|
}
|
|
@@ -266,7 +277,7 @@ const useRouteStore = defineStore(
|
|
|
266
277
|
let returnRoutes: Route.recordMainRaw[];
|
|
267
278
|
// 如果权限功能开启,则需要对路由数据进行筛选过滤
|
|
268
279
|
if (settingsStore.settings.app.enablePermission) {
|
|
269
|
-
returnRoutes = filterAsyncRoutes(routesRaw.value, userStore.permissions);
|
|
280
|
+
returnRoutes = filterAsyncRoutes(routesRaw.value, userStore.user.permissions);
|
|
270
281
|
}
|
|
271
282
|
else {
|
|
272
283
|
returnRoutes = cloneDeep(routesRaw.value);
|
|
@@ -275,11 +286,11 @@ const useRouteStore = defineStore(
|
|
|
275
286
|
});
|
|
276
287
|
|
|
277
288
|
// 将设置 meta.singleMenu 的一级路由转换成二级路由
|
|
278
|
-
|
|
279
|
-
const
|
|
289
|
+
function convertSingleRoutes<T extends Route.recordMainRaw[]>(routes: T) {
|
|
290
|
+
const Layout = setupDefaultLayout();
|
|
280
291
|
|
|
281
292
|
routes.map((route) => {
|
|
282
|
-
if (route.children) {
|
|
293
|
+
if (route.children && route.children.length > 0) {
|
|
283
294
|
route.children.forEach((item, index, arr) => {
|
|
284
295
|
if (item.meta?.singleMenu) {
|
|
285
296
|
const { name, ...rest } = item;
|
|
@@ -303,8 +314,16 @@ const useRouteStore = defineStore(
|
|
|
303
314
|
delete arr[index].meta!.singleMenu;
|
|
304
315
|
}
|
|
305
316
|
|
|
306
|
-
if (!
|
|
307
|
-
|
|
317
|
+
if (!item.component) {
|
|
318
|
+
item.component = Layout;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// 给一级路由设置 provider
|
|
322
|
+
if (route.meta?.provider) {
|
|
323
|
+
(item.meta as any) = {
|
|
324
|
+
...(item.meta ?? {}),
|
|
325
|
+
provider: route.meta.provider,
|
|
326
|
+
};
|
|
308
327
|
}
|
|
309
328
|
});
|
|
310
329
|
}
|
|
@@ -332,11 +351,61 @@ const useRouteStore = defineStore(
|
|
|
332
351
|
}
|
|
333
352
|
|
|
334
353
|
/**
|
|
335
|
-
*
|
|
354
|
+
* 生成路由
|
|
336
355
|
*/
|
|
337
|
-
async function
|
|
338
|
-
|
|
339
|
-
|
|
356
|
+
async function generateRoutes() {
|
|
357
|
+
const res = await postRbacResourceMineOrAllResourceTree({ needAll: false });
|
|
358
|
+
if (res.success) {
|
|
359
|
+
remoteRoutesRaw.value = res?.data ?? [];
|
|
360
|
+
const staticRoutes = convertSingleRoutes(filterEnabledRoutes(cloneDeep(asyncRoutes)));
|
|
361
|
+
|
|
362
|
+
// 后端返回的路由树
|
|
363
|
+
const remoteRoutes = res.data?.map((route) => {
|
|
364
|
+
// 将本地应用替换成静态路由
|
|
365
|
+
if (route.type === RESOURCE_TYPE.APP) {
|
|
366
|
+
const foundStaticRoute = staticRoutes.find(staticRoute => staticRoute.meta?.auth === route.code);
|
|
367
|
+
// CLOSE: 静态应用如果是开发模式,仍然要返回路由对象供TopMode显示
|
|
368
|
+
// 但其子路由不会被注册到vue-router中,这由菜单系统和路由扁平化逻辑处理
|
|
369
|
+
if (foundStaticRoute && get(foundStaticRoute, 'meta.isDev', false)) {
|
|
370
|
+
useWarn(`静态应用"${foundStaticRoute.meta?.title}"处于开发模式,将在TopMode中显示开发状态`);
|
|
371
|
+
}
|
|
372
|
+
return foundStaticRoute;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// 将动态应用数据格式化成路由数据
|
|
376
|
+
if (route.type === RESOURCE_TYPE.DYNAMIC_APP) {
|
|
377
|
+
// CLOSE: 动态应用如果是开发模式,仍然要返回路由对象供TopMode显示
|
|
378
|
+
if (route.meta?.isDev) {
|
|
379
|
+
useWarn(`动态应用"${route.name}"处于开发模式,将在TopMode中显示开发状态`);
|
|
380
|
+
}
|
|
381
|
+
return formatBackRoutes([route])[0] as any;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// 将微应用数据格式化成路由数据
|
|
385
|
+
if (route.type === RESOURCE_TYPE.MICRO_APP) {
|
|
386
|
+
return formatBackRoutes([route])[0];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
return false;
|
|
390
|
+
}).filter(route => !!route) ?? [];
|
|
391
|
+
|
|
392
|
+
// 未出现在后端路由树中的静态路由
|
|
393
|
+
const restStaticRoutes = staticRoutes.filter((staticRoute) => {
|
|
394
|
+
const { auth } = staticRoute.meta ?? {};
|
|
395
|
+
if (isString(auth)) {
|
|
396
|
+
return !res.data?.map(route => route.code).includes(auth);
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
return true;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
// FIX-ME routesRaw 最终会被 routes 使用,在 menuStore 中作为生成 allMenus 的数据源。
|
|
404
|
+
// 为了解决这个问题,我们需要重构一下逻辑,想办法将 路由 和 菜单 分开处理。
|
|
405
|
+
// 可以考虑直接让 menuStore 的菜单根据 remoteRoutesRaw 生成。
|
|
406
|
+
routesRaw.value = [...remoteRoutes, ...restStaticRoutes];
|
|
407
|
+
}
|
|
408
|
+
|
|
340
409
|
if (settingsStore.settings.app.enablePermission) {
|
|
341
410
|
await userStore.getPermissions();
|
|
342
411
|
}
|
|
@@ -347,51 +416,6 @@ const useRouteStore = defineStore(
|
|
|
347
416
|
}
|
|
348
417
|
}
|
|
349
418
|
|
|
350
|
-
/**
|
|
351
|
-
* 格式化后端返回的路由数据
|
|
352
|
-
* @param routes 路由数据
|
|
353
|
-
* @returns 格式化后的路由数据
|
|
354
|
-
*/
|
|
355
|
-
function formatBackRoutes(routes: any): Route.recordMainRaw[] {
|
|
356
|
-
return routes.map((route: any) => {
|
|
357
|
-
switch (route.component) {
|
|
358
|
-
case 'Layout':
|
|
359
|
-
// route.component = Layout;
|
|
360
|
-
break;
|
|
361
|
-
default:
|
|
362
|
-
if (route.component) {
|
|
363
|
-
// TODO 等待合并辰龙相关功能的分支再作处理
|
|
364
|
-
// route.component = views?.[`../../views/${route.component}`];
|
|
365
|
-
}
|
|
366
|
-
else {
|
|
367
|
-
delete route.component;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
if (route.children) {
|
|
371
|
-
route.children = formatBackRoutes(route.children);
|
|
372
|
-
}
|
|
373
|
-
return route;
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* 生成后端路由
|
|
379
|
-
*/
|
|
380
|
-
async function generateRoutesAtBack() {
|
|
381
|
-
await GetApiRouteList().then(async (res: any) => {
|
|
382
|
-
// 设置 routes 数据
|
|
383
|
-
routesRaw.value = await convertSingleRoutes(formatBackRoutes(res.data) as any);
|
|
384
|
-
if (settingsStore.settings.app.enablePermission) {
|
|
385
|
-
await userStore.getPermissions();
|
|
386
|
-
}
|
|
387
|
-
isGenerate.value = true;
|
|
388
|
-
// 初始化常驻标签页
|
|
389
|
-
if (settingsStore.settings.tabbar.enable) {
|
|
390
|
-
tabbarStore.initPermanentTab();
|
|
391
|
-
}
|
|
392
|
-
}).catch(() => {});
|
|
393
|
-
}
|
|
394
|
-
|
|
395
419
|
/**
|
|
396
420
|
* 设置当前要移除的路由。
|
|
397
421
|
* @param {(() => void)[]} routes - 要设置的路由。
|
|
@@ -424,8 +448,8 @@ const useRouteStore = defineStore(
|
|
|
424
448
|
currentRemoveRoutes,
|
|
425
449
|
flatRoutes,
|
|
426
450
|
flatSystemRoutes,
|
|
427
|
-
|
|
428
|
-
|
|
451
|
+
remoteRoutesRaw,
|
|
452
|
+
generateRoutes,
|
|
429
453
|
setCurrentRemoveRoutes,
|
|
430
454
|
removeRoutes,
|
|
431
455
|
};
|
|
@@ -1,22 +1,39 @@
|
|
|
1
1
|
import type { RouteLocationNormalized, RouteMeta } from 'vue-router';
|
|
2
|
-
import {
|
|
3
|
-
getSysconfigGetSysThemeStyleConfig,
|
|
4
|
-
getSysconfigGetThemeStyleConfig,
|
|
5
|
-
getSysconfigGetUserThemeStyleConfig,
|
|
6
|
-
postSysconfigAddOrEditUserThemeStyleConfig,
|
|
7
|
-
postSysconfigResetUserThemeStyleConfig,
|
|
8
|
-
} from '@/api/modules/configData';
|
|
9
|
-
import { getSettings } from '@/config';
|
|
10
|
-
import { objectToPaths, storage } from '@/utils';
|
|
11
2
|
import { FrownOutlined } from '@ant-design/icons-vue';
|
|
12
3
|
import { usePreferredDark } from '@vueuse/core';
|
|
13
4
|
import { Modal } from 'ant-design-vue';
|
|
14
|
-
import { cloneDeep, defaultsDeep, get, set } from 'lodash-es';
|
|
5
|
+
import { cloneDeep, defaultsDeep, get, isArray, isEmpty, isObject, reduce, set } from 'lodash-es';
|
|
15
6
|
import { defineStore } from 'pinia';
|
|
16
7
|
import { createVNode } from 'vue';
|
|
17
8
|
import Message from 'vue-m-message';
|
|
9
|
+
import {
|
|
10
|
+
getSysconfigGetSysThemeStyleConfig,
|
|
11
|
+
getSysconfigGetThemeStyleConfig,
|
|
12
|
+
getSysconfigGetUserThemeStyleConfig,
|
|
13
|
+
postSysconfigAddOrEditUserThemeStyleConfig,
|
|
14
|
+
postSysconfigResetUserThemeStyleConfig,
|
|
15
|
+
} from '@/features/api/modules/configData';
|
|
16
|
+
import { useWarn } from '@/features/composables';
|
|
17
|
+
import { watchDiffObject } from '@/features/composables/watchDiff';
|
|
18
|
+
import { getSettings } from '@/features/settings';
|
|
19
|
+
import { storage } from '@/utils';
|
|
18
20
|
import { STORE_NAME } from '../enum';
|
|
19
21
|
|
|
22
|
+
function objectToPaths(obj: Record<string, any>, prefix = '') {
|
|
23
|
+
return reduce(obj, (result, value, key) => {
|
|
24
|
+
const fullPath = prefix.length ? `${prefix}.${key}` : key;
|
|
25
|
+
if (isObject(value) && !isArray(value) && !isEmpty(value)) {
|
|
26
|
+
// 如果是非空对象,递归调用
|
|
27
|
+
result = result.concat(objectToPaths(value, fullPath));
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// 否则,添加当前路径到结果数组
|
|
31
|
+
result.push(fullPath);
|
|
32
|
+
}
|
|
33
|
+
return result;
|
|
34
|
+
}, [] as string[]);
|
|
35
|
+
}
|
|
36
|
+
|
|
20
37
|
const useSettingsStore = defineStore(
|
|
21
38
|
// 唯一ID
|
|
22
39
|
STORE_NAME.SETTINGS,
|
|
@@ -7,7 +7,7 @@ import useKeepAliveStore from './keepAlive';
|
|
|
7
7
|
import useRouteStore from './route';
|
|
8
8
|
import useSettingsStore from './settings';
|
|
9
9
|
|
|
10
|
-
// TODO: 移除createTab函数,返回值变化太多
|
|
10
|
+
// TODO V1: 移除createTab函数,返回值变化太多
|
|
11
11
|
const useTabbarStore = defineStore(
|
|
12
12
|
STORE_NAME.TABBAR,
|
|
13
13
|
() => {
|
|
@@ -28,7 +28,7 @@ const useTabbarStore = defineStore(
|
|
|
28
28
|
function formatTabs(items: RouteRecordRaw) {
|
|
29
29
|
if (items.children) {
|
|
30
30
|
items.children.forEach((route) => {
|
|
31
|
-
if (route.meta?.permanent && route.meta?.breadcrumbNeste) {
|
|
31
|
+
if (route.meta?.permanent && route.meta?.breadcrumbNeste && route.meta?.tabbar !== false) {
|
|
32
32
|
const fullPath = route.meta.breadcrumbNeste.at(-1)?.path as string;
|
|
33
33
|
const tabId = settingsStore.settings.tabbar.mergeTabsBy === 'activeMenu' ? (route.meta.activeMenu || fullPath) : fullPath;
|
|
34
34
|
tabs.push({
|
|
@@ -43,7 +43,8 @@ const useTabbarStore = defineStore(
|
|
|
43
43
|
activeIcon: route.meta?.activeIcon ?? route.meta?.breadcrumbNeste?.findLast(item => item.activeIcon)?.activeIcon,
|
|
44
44
|
name: route.name ? [route.name as string] : [],
|
|
45
45
|
customTitleList: [],
|
|
46
|
-
isPin: false,
|
|
46
|
+
isPin: route.meta?.pin !== undefined ? route.meta?.pin : false,
|
|
47
|
+
isTabbar: route.meta?.tabbar !== false,
|
|
47
48
|
isPermanent: true,
|
|
48
49
|
});
|
|
49
50
|
}
|
|
@@ -76,7 +77,7 @@ const useTabbarStore = defineStore(
|
|
|
76
77
|
const meta = route.matched.at(-1)?.meta;
|
|
77
78
|
const tabId = settingsStore.settings.tabbar.mergeTabsBy === 'activeMenu' ? (meta?.activeMenu ?? route.fullPath) : route.fullPath;
|
|
78
79
|
|
|
79
|
-
if (route.name !== 'Reload') {
|
|
80
|
+
if (route.name !== 'Reload' && meta?.tabbar !== false) {
|
|
80
81
|
// 记录查找到的标签页
|
|
81
82
|
const findTab = list.value.find((item) => {
|
|
82
83
|
if (settingsStore.settings.tabbar.mergeTabsBy === 'routeName' && item.routeName) {
|
|
@@ -100,7 +101,8 @@ const useTabbarStore = defineStore(
|
|
|
100
101
|
activeIcon: meta?.activeIcon ?? meta?.breadcrumbNeste?.findLast(item => item.activeIcon)?.activeIcon,
|
|
101
102
|
name: names,
|
|
102
103
|
customTitleList: [],
|
|
103
|
-
isPin: false,
|
|
104
|
+
isPin: meta?.pin !== undefined ? meta?.pin : false,
|
|
105
|
+
isTabbar: meta?.tabbar !== false,
|
|
104
106
|
isPermanent: false,
|
|
105
107
|
};
|
|
106
108
|
if (leaveIndex.value >= 0) {
|
|
@@ -123,6 +125,7 @@ const useTabbarStore = defineStore(
|
|
|
123
125
|
findTab.iframe = meta?.iframe;
|
|
124
126
|
findTab.icon = meta?.icon ?? meta?.breadcrumbNeste?.findLast(item => item.icon)?.icon;
|
|
125
127
|
findTab.activeIcon = meta?.activeIcon ?? meta?.breadcrumbNeste?.findLast(item => item.activeIcon)?.activeIcon;
|
|
128
|
+
findTab.isTabbar = meta?.tabbar !== false;
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
}
|
|
@@ -1,14 +1,57 @@
|
|
|
1
1
|
import type { AxiosRequestHeaders } from 'axios';
|
|
2
|
-
import type {
|
|
3
|
-
import { postAuthChangeLoginOrg, postAuthLogin } from '@/api/modules/auth';
|
|
4
|
-
import { getRbacResourceGrantedResources, getRbacUserUserEntireInfo, putRbacUserChangePassword } from '@/api/modules/rbac';
|
|
5
|
-
import { usePubinfoContext } from '@/context';
|
|
6
|
-
import { getEncryptedData } from '@/utils';
|
|
2
|
+
import type { ComputedRef } from 'vue';
|
|
7
3
|
import { find } from 'lodash-es';
|
|
8
4
|
import { defineStore } from 'pinia';
|
|
5
|
+
import { postAuthChangeLoginOrg, postAuthLogin } from '@/features/api/modules/auth';
|
|
6
|
+
import { getRbacResourceGrantedResources, getRbacUserUserEntireInfo, putRbacUserChangePassword } from '@/features/api/modules/rbac';
|
|
7
|
+
import { usePubinfoContext } from '@/features/context';
|
|
9
8
|
import { STORE_NAME } from '../enum';
|
|
9
|
+
import { getEncryptedData } from '../utils';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
export interface UserStore {
|
|
12
|
+
/** 用户信息 */
|
|
13
|
+
user: User
|
|
14
|
+
|
|
15
|
+
/** 用户组织名称 */
|
|
16
|
+
userOrgName: ComputedRef<string>
|
|
17
|
+
|
|
18
|
+
/** 是否登录 */
|
|
19
|
+
isLogin: ComputedRef<boolean>
|
|
20
|
+
|
|
21
|
+
/** 获取用户信息 */
|
|
22
|
+
getUserInfo: () => Promise<API.ResponseDataPubUserBo>
|
|
23
|
+
|
|
24
|
+
/** 获取用户权限码 */
|
|
25
|
+
getPermissions: () => Promise<string[]>
|
|
26
|
+
|
|
27
|
+
/** 登录 */
|
|
28
|
+
login: (data: {
|
|
29
|
+
account: string
|
|
30
|
+
password: string
|
|
31
|
+
captchas: string
|
|
32
|
+
captchaHash: string
|
|
33
|
+
loginType?: 'password' | string
|
|
34
|
+
}) => Promise<API.ResponseDataLoginTokenVo>
|
|
35
|
+
|
|
36
|
+
/** 登出 */
|
|
37
|
+
logout: () => void
|
|
38
|
+
|
|
39
|
+
/** 修改密码 */
|
|
40
|
+
changeUserPassword: (form: API.putRbacUserChangePasswordParams & {
|
|
41
|
+
token?: string | string[]
|
|
42
|
+
}) => Promise<API.ResponseDataVoid>
|
|
43
|
+
|
|
44
|
+
/** 切换组织 */
|
|
45
|
+
changeOrg: (changeOrgId: string) => Promise<void>
|
|
46
|
+
|
|
47
|
+
/** 设置TOKEN */
|
|
48
|
+
setToken: (accessToken: string, refreshToken: string) => void
|
|
49
|
+
|
|
50
|
+
/** 清空用户信息 */
|
|
51
|
+
clean: () => void
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const useUserStore = defineStore<STORE_NAME.USER, UserStore>(
|
|
12
55
|
STORE_NAME.USER,
|
|
13
56
|
() => {
|
|
14
57
|
const { router } = usePubinfoContext();
|
|
@@ -65,7 +108,7 @@ const useUserStore = defineStore(
|
|
|
65
108
|
password: string
|
|
66
109
|
captchas: string
|
|
67
110
|
captchaHash: string
|
|
68
|
-
loginType?: 'password'
|
|
111
|
+
loginType?: 'password' | string
|
|
69
112
|
}) {
|
|
70
113
|
const {
|
|
71
114
|
account: loginName,
|
|
@@ -83,14 +126,14 @@ const useUserStore = defineStore(
|
|
|
83
126
|
code,
|
|
84
127
|
});
|
|
85
128
|
const { accessToken, refreshToken } = result.data as Required<API.LoginTokenVo>;
|
|
86
|
-
|
|
129
|
+
setToken(accessToken, refreshToken);
|
|
130
|
+
return result;
|
|
87
131
|
}
|
|
88
132
|
|
|
89
133
|
/**
|
|
90
134
|
* 执行用户注销操作,并跳转到登录页面。
|
|
91
|
-
* @param _redirect - 注销后的重定向路径,默认为当前页面的完整路径。
|
|
92
135
|
*/
|
|
93
|
-
|
|
136
|
+
function logout() {
|
|
94
137
|
router?.push({
|
|
95
138
|
name: 'Login',
|
|
96
139
|
});
|
|
@@ -123,6 +166,7 @@ const useUserStore = defineStore(
|
|
|
123
166
|
if (userData.userOrgList?.length && !user.orgId) {
|
|
124
167
|
user.orgId = find(userData.userOrgList, ['main', true])!.orgId!;
|
|
125
168
|
}
|
|
169
|
+
return res;
|
|
126
170
|
}
|
|
127
171
|
|
|
128
172
|
/**
|
|
@@ -130,7 +174,7 @@ const useUserStore = defineStore(
|
|
|
130
174
|
* @param form - 包含要修改的密码和令牌的表单数据
|
|
131
175
|
* @returns 修改密码的结果
|
|
132
176
|
*/
|
|
133
|
-
async function changeUserPassword(form: API.putRbacUserChangePasswordParams & { token?:
|
|
177
|
+
async function changeUserPassword(form: API.putRbacUserChangePasswordParams & { token?: string | string[] }) {
|
|
134
178
|
const headers = {} as AxiosRequestHeaders;
|
|
135
179
|
if (form.token) {
|
|
136
180
|
headers.authorization = form.token;
|
|
@@ -151,7 +195,7 @@ const useUserStore = defineStore(
|
|
|
151
195
|
* @param accessToken 访问令牌
|
|
152
196
|
* @param refreshToken 刷新令牌数据
|
|
153
197
|
*/
|
|
154
|
-
|
|
198
|
+
function setToken(accessToken: string, refreshToken: string) {
|
|
155
199
|
user.token = accessToken;
|
|
156
200
|
user.refreshToken = refreshToken;
|
|
157
201
|
}
|
|
@@ -173,33 +217,25 @@ const useUserStore = defineStore(
|
|
|
173
217
|
async function changeOrg(changeOrgId: string) {
|
|
174
218
|
const res = await postAuthChangeLoginOrg({ orgId: changeOrgId });
|
|
175
219
|
const { accessToken, refreshToken } = res.data as Required<API.LoginTokenVo>;
|
|
176
|
-
|
|
220
|
+
setToken(accessToken, refreshToken);
|
|
177
221
|
user.orgId = changeOrgId;
|
|
178
222
|
router?.push({
|
|
179
223
|
path: '/',
|
|
180
224
|
});
|
|
181
225
|
}
|
|
182
226
|
|
|
183
|
-
async function phoneLogin(phone: string, verify: string) {
|
|
184
|
-
// message.success(`${phone}登录成功`);
|
|
185
|
-
// await setToken(accessToken, refreshTokenData);
|
|
186
|
-
// await getUserInfo();
|
|
187
|
-
}
|
|
188
|
-
|
|
189
227
|
return {
|
|
190
228
|
user,
|
|
229
|
+
userOrgName,
|
|
191
230
|
isLogin,
|
|
231
|
+
getUserInfo,
|
|
232
|
+
getPermissions,
|
|
192
233
|
login,
|
|
193
234
|
logout,
|
|
194
|
-
phoneLogin,
|
|
195
|
-
getPermissions,
|
|
196
235
|
changeUserPassword,
|
|
197
|
-
userOrgName,
|
|
198
236
|
changeOrg,
|
|
199
237
|
setToken,
|
|
200
|
-
getUserInfo,
|
|
201
238
|
clean,
|
|
202
|
-
...toRefs(user),
|
|
203
239
|
};
|
|
204
240
|
},
|
|
205
241
|
{
|
|
@@ -208,4 +244,3 @@ const useUserStore = defineStore(
|
|
|
208
244
|
);
|
|
209
245
|
|
|
210
246
|
export default useUserStore;
|
|
211
|
-
export type UserStore = ReturnType<typeof useUserStore>;
|