@pubinfo/core 2.0.0-beta.1
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/es/AppSetting-BXQHV5F8.js +125 -0
- package/es/HButton.vue_vue_type_script_setup_true_lang-CYAzn9Mg.js +25 -0
- package/es/HCheckList.vue_vue_type_script_setup_true_lang-DanhyVxU.js +41 -0
- package/es/HDivider-DgXBhPr0.js +21 -0
- package/es/HInput.vue_vue_type_script_setup_true_lang-DBqCXRnn.js +33 -0
- package/es/HToggle-Cd71WKvG.js +34 -0
- package/es/PreferencesContent-CQkwkQ_1.js +972 -0
- package/es/SettingBreadcrumb-Bp_66IFN.js +50 -0
- package/es/SettingCopyright-BPSnoTQb.js +62 -0
- package/es/SettingEnableTransition-Rx2-0Wxj.js +78 -0
- package/es/SettingHome-BW27PQqs.js +55 -0
- package/es/SettingMenu-D5gdNfal.js +120 -0
- package/es/SettingMode-B4_HGVez.js +69 -0
- package/es/SettingNavSearch-CRovYxzh.js +46 -0
- package/es/SettingOther-D0zo11vM.js +81 -0
- package/es/SettingPage-B8GHuoKV.js +29 -0
- package/es/SettingTabbar-Cn_QzvA8.js +154 -0
- package/es/SettingThemes-D_DpEncn.js +144 -0
- package/es/SettingToolbar-Csl2gnfi.js +85 -0
- package/es/SettingTopbar-CaHjQULM.js +52 -0
- package/es/SettingWidthMode-BGiP7gTw.js +68 -0
- package/es/TopThinMode-DWm0oY5Y.js +35 -0
- package/es/_...all_-DI_QAUox.js +52 -0
- package/es/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/es/api/enum/code.d.ts +67 -0
- package/es/api/helper.d.ts +32 -0
- package/es/api/index.d.ts +12 -0
- package/es/api/interface.d.ts +14 -0
- package/es/api/modules/auth/index.d.ts +1 -0
- package/es/api/modules/auth/renzhengfuwu.d.ts +50 -0
- package/es/api/modules/configData/heibaimingdanfuwu.d.ts +36 -0
- package/es/api/modules/configData/index.d.ts +3 -0
- package/es/api/modules/configData/xitongpeizhifuwu.d.ts +99 -0
- package/es/api/modules/configData/zidianfuwu.d.ts +71 -0
- package/es/api/modules/rbac/gangweijiekou.d.ts +43 -0
- package/es/api/modules/rbac/index.d.ts +11 -0
- package/es/api/modules/rbac/jiaosejiekou.d.ts +50 -0
- package/es/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +43 -0
- package/es/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.d.ts +64 -0
- package/es/api/modules/rbac/yonghujiekou.d.ts +106 -0
- package/es/api/modules/rbac/yonghushoucangbiaojiekou.d.ts +36 -0
- package/es/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.d.ts +29 -0
- package/es/api/modules/rbac/ziyuanjiekou.d.ts +85 -0
- package/es/api/modules/rbac/zuhuguanlijiekou.d.ts +36 -0
- package/es/api/modules/rbac/zuzhijiaosebiaokongzhiqi.d.ts +29 -0
- package/es/api/modules/rbac/zuzhijiekou.d.ts +64 -0
- package/es/api/request.d.ts +2 -0
- package/es/api/system/app.d.ts +17 -0
- package/es/api/system/user.d.ts +24 -0
- package/es/assets/styles/index.d.ts +6 -0
- package/es/colors-oRlAXMUC.js +25 -0
- package/es/components/NotAllowed/index.vue.d.ts +2 -0
- package/es/components/PageHeader/index.vue.d.ts +23 -0
- package/es/components/PageMain/index.vue.d.ts +27 -0
- package/es/components/PassStrengthValidator/index.vue.d.ts +26 -0
- package/es/components/PassStrengthValidator/rule.vue.d.ts +8 -0
- package/es/components/PubinfoApp/index.vue.d.ts +2 -0
- package/es/components/PubinfoIcon/index.vue.d.ts +10 -0
- package/es/components/PubinfoProvider/index.d.ts +8 -0
- package/es/components/index.d.ts +8 -0
- package/es/composables/auth.d.ts +8 -0
- package/es/composables/index.d.ts +4 -0
- package/es/composables/log.d.ts +6 -0
- package/es/composables/theme.d.ts +3 -0
- package/es/composables/watchDiff.d.ts +2 -0
- package/es/config/index.d.ts +1 -0
- package/es/config/settings.d.ts +3 -0
- package/es/context.d.ts +14 -0
- package/es/create.d.ts +3 -0
- package/es/directives/index.d.ts +4 -0
- package/es/directives/plugins/permission.d.ts +6 -0
- package/es/index-B9I6Pru6.js +276 -0
- package/es/index-BHkrq701.js +137 -0
- package/es/index-BkqnOkyO.js +49 -0
- package/es/index-BvVAS3S-.js +35841 -0
- package/es/index-ChOUZNbk.js +354 -0
- package/es/index-D8eeneI_.js +271 -0
- package/es/index-DTQQt_XY.js +10 -0
- package/es/index-Dav3jQVP.js +8228 -0
- package/es/index-DvHnVMX5.js +12913 -0
- package/es/index-P2cA5UeU.js +230 -0
- package/es/index.d.ts +11 -0
- package/es/index.js +76 -0
- package/es/index.vue_vue_type_style_index_0_scoped_fa1c6ee4_lang-BBe8CvCV.js +2300 -0
- package/es/interface.d.ts +29 -0
- package/es/layout/Layout.vue.d.ts +20 -0
- package/es/layout/components/BackTop/index.vue.d.ts +2 -0
- package/es/layout/components/Content/IframeView.vue.d.ts +4 -0
- package/es/layout/components/Content/LinkView.vue.d.ts +2 -0
- package/es/layout/components/Content/index.vue.d.ts +2 -0
- package/es/layout/components/Copyright/index.vue.d.ts +2 -0
- package/es/layout/components/Header/TopMode/More.vue.d.ts +26 -0
- package/es/layout/components/Header/TopMode/NotCursor.vue.d.ts +25 -0
- package/es/layout/components/Header/TopMode/index.vue.d.ts +4 -0
- package/es/layout/components/Header/TopThinMode.vue.d.ts +4 -0
- package/es/layout/components/Header/index.vue.d.ts +19 -0
- package/es/layout/components/Logo/index.vue.d.ts +26 -0
- package/es/layout/components/Menu/index.vue.d.ts +10 -0
- package/es/layout/components/Menu/item.vue.d.ts +11 -0
- package/es/layout/components/Menu/sub.vue.d.ts +219 -0
- package/es/layout/components/Menu/types.d.ts +42 -0
- package/es/layout/components/SettingBar/AppSetting.vue.d.ts +12 -0
- package/es/layout/components/SettingBar/components/DayNightToggle.vue.d.ts +9 -0
- package/es/layout/components/SettingBar/components/SettingBreadcrumb.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingCopyright.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingEnableTransition.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingHome.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingMenu.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingMode.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingNavSearch.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingOther.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingPage.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingTabbar.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingThemes.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingToolbar.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingTopbar.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/components/SettingWidthMode.vue.d.ts +2 -0
- package/es/layout/components/SettingBar/index.vue.d.ts +2 -0
- package/es/layout/components/Sidebar/MainSidebar.vue.d.ts +2 -0
- package/es/layout/components/Sidebar/SubSidebar.vue.d.ts +2 -0
- package/es/layout/components/Sidebar/index.vue.d.ts +2 -0
- package/es/layout/components/Tools/Breadcrumb/index.vue.d.ts +17 -0
- package/es/layout/components/Tools/Breadcrumb/item.vue.d.ts +25 -0
- package/es/layout/components/Tools/DayNightSwitch.vue.d.ts +2 -0
- package/es/layout/components/Tools/HotkeysIntro.vue.d.ts +4 -0
- package/es/layout/components/Tools/Preferences/PreferencesContent.vue.d.ts +2 -0
- package/es/layout/components/Tools/Preferences/index.vue.d.ts +4 -0
- package/es/layout/components/Tools/Search.vue.d.ts +199 -0
- package/es/layout/components/Tools/index.vue.d.ts +233 -0
- package/es/layout/components/Topbar/Tabbar/MoreAction.vue.d.ts +217 -0
- package/es/layout/components/Topbar/Tabbar/index.vue.d.ts +14 -0
- package/es/layout/components/Topbar/Toolbar/Favorites.vue.d.ts +4 -0
- package/es/layout/components/Topbar/Toolbar/Star.vue.d.ts +2 -0
- package/es/layout/components/Topbar/Toolbar/index.vue.d.ts +2 -0
- package/es/layout/components/Topbar/index.vue.d.ts +2 -0
- package/es/layout/composables/useContext.d.ts +18 -0
- package/es/layout/composables/useGetComputedStyle.d.ts +15 -0
- package/es/layout/composables/useHotkey.d.ts +5 -0
- package/es/layout/composables/useMainPage.d.ts +14 -0
- package/es/layout/composables/useMenu.d.ts +8 -0
- package/es/layout/composables/useTabbar.d.ts +14 -0
- package/es/layout/composables/useTitle.d.ts +3 -0
- package/es/layout/composables/useViewTransition.d.ts +3 -0
- package/es/layout/composables/useWatermark.d.ts +4 -0
- package/es/layout/index.d.ts +19 -0
- package/es/layout/provider.d.ts +1 -0
- package/es/layout/ui-kit/HBadge.vue.d.ts +20 -0
- package/es/layout/ui-kit/HButton.vue.d.ts +26 -0
- package/es/layout/ui-kit/HCheckList.vue.d.ts +20 -0
- package/es/layout/ui-kit/HDialog.vue.d.ts +28 -0
- package/es/layout/ui-kit/HDivider.vue.d.ts +20 -0
- package/es/layout/ui-kit/HDropdown.vue.d.ts +18 -0
- package/es/layout/ui-kit/HDropdownMenu.vue.d.ts +26 -0
- package/es/layout/ui-kit/HDropdownTree.vue.d.ts +32 -0
- package/es/layout/ui-kit/HInput.vue.d.ts +17 -0
- package/es/layout/ui-kit/HKbd.vue.d.ts +17 -0
- package/es/layout/ui-kit/HSelect.vue.d.ts +17 -0
- package/es/layout/ui-kit/HSlideover.vue.d.ts +30 -0
- package/es/layout/ui-kit/HTabList.vue.d.ts +22 -0
- package/es/layout/ui-kit/HToggle.vue.d.ts +14 -0
- package/es/layout/ui-kit/HTooltip.vue.d.ts +23 -0
- package/es/locales/index.d.ts +301 -0
- package/es/locales/lang/en.json.d.ts +99 -0
- package/es/locales/lang/zh-cn.json.d.ts +100 -0
- package/es/locales/lang/zh-tw.json.d.ts +100 -0
- package/es/locales/ui.d.ts +3 -0
- package/es/modules.d.ts +11 -0
- package/es/notification-6D5hA7Bp.js +15347 -0
- package/es/pages/personal/profile/index.vue.d.ts +2 -0
- package/es/pages/system/[...all].vue.d.ts +2 -0
- package/es/pages/system/change-organization/index.vue.d.ts +2 -0
- package/es/pages/system/change-password/components/ChangePasswordForm/index.vue.d.ts +18 -0
- package/es/pages/system/change-password/index.vue.d.ts +31 -0
- package/es/pages/system/index.vue.d.ts +2 -0
- package/es/pages/system/not-permission/index.vue.d.ts +2 -0
- package/es/pages/system/reload.vue.d.ts +2 -0
- package/es/pick-Br-UKn7B.js +19 -0
- package/es/question-line-CfkciTFq.js +18 -0
- package/es/reload-CUcPYtl7.js +14 -0
- package/es/request.js +1811 -0
- package/es/right-Bfe2p1o0.js +36 -0
- package/es/route/async.d.ts +9 -0
- package/es/route/guard/auth.d.ts +3 -0
- package/es/route/guard/basic.d.ts +3 -0
- package/es/route/guard/index.d.ts +3 -0
- package/es/route/guard/setting.d.ts +3 -0
- package/es/route/index.d.ts +7 -0
- package/es/route/routes.d.ts +3 -0
- package/es/stores/enum/index.d.ts +20 -0
- package/es/stores/helper.d.ts +2 -0
- package/es/stores/index.d.ts +5 -0
- package/es/stores/modules/favorites.d.ts +32 -0
- package/es/stores/modules/iframe.d.ts +41 -0
- package/es/stores/modules/index.d.ts +9 -0
- package/es/stores/modules/keepAlive.d.ts +23 -0
- package/es/stores/modules/menu.d.ts +32 -0
- package/es/stores/modules/notification.d.ts +18 -0
- package/es/stores/modules/route.d.ts +42 -0
- package/es/stores/modules/settings.d.ts +85 -0
- package/es/stores/modules/tabbar.d.ts +59 -0
- package/es/stores/modules/user.d.ts +3 -0
- package/es/stores/plugin/persist.d.ts +5 -0
- package/es/stores/plugin/sideEffect/cleanup.d.ts +5 -0
- package/es/stores/plugin/sideEffect/favoritesStorage.d.ts +5 -0
- package/es/stores/plugin/sideEffect/iframeCache.d.ts +5 -0
- package/es/stores/plugin/sideEffect/index.d.ts +5 -0
- package/es/stores/plugin/sideEffect/tabbarStorage.d.ts +5 -0
- package/es/style.css +9 -0
- package/es/utils/cleanup.d.ts +8 -0
- package/es/utils/crypto.d.ts +4 -0
- package/es/utils/eventBus.d.ts +5 -0
- package/es/utils/index.d.ts +14 -0
- package/es/utils/injectionKeys.d.ts +2 -0
- package/es/utils/storage.d.ts +21 -0
- package/es/utils/utils.d.ts +3 -0
- package/es/utils/watermark.d.ts +51 -0
- package/lib/AppSetting-CCiwpjoq.cjs +1 -0
- package/lib/HButton.vue_vue_type_script_setup_true_lang-D-XkyoXl.cjs +1 -0
- package/lib/HCheckList.vue_vue_type_script_setup_true_lang-DwA8einQ.cjs +1 -0
- package/lib/HDivider-DCfDgE8l.cjs +1 -0
- package/lib/HInput.vue_vue_type_script_setup_true_lang-CwS0mGyL.cjs +1 -0
- package/lib/HToggle-BP6YYf-s.cjs +1 -0
- package/lib/PreferencesContent-DgL-Jc_J.cjs +3 -0
- package/lib/SettingBreadcrumb-BQ78yEP4.cjs +1 -0
- package/lib/SettingCopyright-x7aPlkQy.cjs +1 -0
- package/lib/SettingEnableTransition-CD3-44Iy.cjs +1 -0
- package/lib/SettingHome-u52oz6i8.cjs +1 -0
- package/lib/SettingMenu-DsElOvvv.cjs +1 -0
- package/lib/SettingMode-C_kgpTxw.cjs +1 -0
- package/lib/SettingNavSearch-3auTi8UW.cjs +1 -0
- package/lib/SettingOther-6XGQq7OA.cjs +1 -0
- package/lib/SettingPage-C8yIHpLc.cjs +1 -0
- package/lib/SettingTabbar-K-nHb89z.cjs +1 -0
- package/lib/SettingThemes-BeNwFz7K.cjs +1 -0
- package/lib/SettingToolbar-Be1V7lwV.cjs +1 -0
- package/lib/SettingTopbar-C-j8O3c8.cjs +1 -0
- package/lib/SettingWidthMode-GMjAF-s3.cjs +1 -0
- package/lib/TopThinMode-DGUvyHT2.cjs +1 -0
- package/lib/_...all_-C4CXjAo9.cjs +1 -0
- package/lib/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/lib/api/enum/code.d.ts +67 -0
- package/lib/api/helper.d.ts +32 -0
- package/lib/api/index.d.ts +12 -0
- package/lib/api/interface.d.ts +14 -0
- package/lib/api/modules/auth/index.d.ts +1 -0
- package/lib/api/modules/auth/renzhengfuwu.d.ts +50 -0
- package/lib/api/modules/configData/heibaimingdanfuwu.d.ts +36 -0
- package/lib/api/modules/configData/index.d.ts +3 -0
- package/lib/api/modules/configData/xitongpeizhifuwu.d.ts +99 -0
- package/lib/api/modules/configData/zidianfuwu.d.ts +71 -0
- package/lib/api/modules/rbac/gangweijiekou.d.ts +43 -0
- package/lib/api/modules/rbac/index.d.ts +11 -0
- package/lib/api/modules/rbac/jiaosejiekou.d.ts +50 -0
- package/lib/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +43 -0
- package/lib/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.d.ts +64 -0
- package/lib/api/modules/rbac/yonghujiekou.d.ts +106 -0
- package/lib/api/modules/rbac/yonghushoucangbiaojiekou.d.ts +36 -0
- package/lib/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.d.ts +29 -0
- package/lib/api/modules/rbac/ziyuanjiekou.d.ts +85 -0
- package/lib/api/modules/rbac/zuhuguanlijiekou.d.ts +36 -0
- package/lib/api/modules/rbac/zuzhijiaosebiaokongzhiqi.d.ts +29 -0
- package/lib/api/modules/rbac/zuzhijiekou.d.ts +64 -0
- package/lib/api/request.d.ts +2 -0
- package/lib/api/system/app.d.ts +17 -0
- package/lib/api/system/user.d.ts +24 -0
- package/lib/assets/styles/index.d.ts +6 -0
- package/lib/colors-KAaBT84S.cjs +1 -0
- package/lib/components/NotAllowed/index.vue.d.ts +2 -0
- package/lib/components/PageHeader/index.vue.d.ts +23 -0
- package/lib/components/PageMain/index.vue.d.ts +27 -0
- package/lib/components/PassStrengthValidator/index.vue.d.ts +26 -0
- package/lib/components/PassStrengthValidator/rule.vue.d.ts +8 -0
- package/lib/components/PubinfoApp/index.vue.d.ts +2 -0
- package/lib/components/PubinfoIcon/index.vue.d.ts +10 -0
- package/lib/components/PubinfoProvider/index.d.ts +8 -0
- package/lib/components/index.d.ts +8 -0
- package/lib/composables/auth.d.ts +8 -0
- package/lib/composables/index.d.ts +4 -0
- package/lib/composables/log.d.ts +6 -0
- package/lib/composables/theme.d.ts +3 -0
- package/lib/composables/watchDiff.d.ts +2 -0
- package/lib/config/index.d.ts +1 -0
- package/lib/config/settings.d.ts +3 -0
- package/lib/context.d.ts +14 -0
- package/lib/create.d.ts +3 -0
- package/lib/directives/index.d.ts +4 -0
- package/lib/directives/plugins/permission.d.ts +6 -0
- package/lib/index-38bsQrho.cjs +1 -0
- package/lib/index-BEqD62a0.cjs +1 -0
- package/lib/index-Bbm9CQRP.cjs +1 -0
- package/lib/index-BqHsuJkr.cjs +1 -0
- package/lib/index-JZl6Zh3L.cjs +44 -0
- package/lib/index-VGR0Mt4q.cjs +240 -0
- package/lib/index-WMo0GAa6.cjs +1 -0
- package/lib/index-_YsHduAE.cjs +1 -0
- package/lib/index-gr8kFwPx.cjs +18 -0
- package/lib/index-zvGq9tSu.cjs +1 -0
- package/lib/index.cjs +1 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.vue_vue_type_style_index_0_scoped_fa1c6ee4_lang-SCJ5qyPu.cjs +1 -0
- package/lib/interface.d.ts +29 -0
- package/lib/layout/Layout.vue.d.ts +20 -0
- package/lib/layout/components/BackTop/index.vue.d.ts +2 -0
- package/lib/layout/components/Content/IframeView.vue.d.ts +4 -0
- package/lib/layout/components/Content/LinkView.vue.d.ts +2 -0
- package/lib/layout/components/Content/index.vue.d.ts +2 -0
- package/lib/layout/components/Copyright/index.vue.d.ts +2 -0
- package/lib/layout/components/Header/TopMode/More.vue.d.ts +26 -0
- package/lib/layout/components/Header/TopMode/NotCursor.vue.d.ts +25 -0
- package/lib/layout/components/Header/TopMode/index.vue.d.ts +4 -0
- package/lib/layout/components/Header/TopThinMode.vue.d.ts +4 -0
- package/lib/layout/components/Header/index.vue.d.ts +19 -0
- package/lib/layout/components/Logo/index.vue.d.ts +26 -0
- package/lib/layout/components/Menu/index.vue.d.ts +10 -0
- package/lib/layout/components/Menu/item.vue.d.ts +11 -0
- package/lib/layout/components/Menu/sub.vue.d.ts +219 -0
- package/lib/layout/components/Menu/types.d.ts +42 -0
- package/lib/layout/components/SettingBar/AppSetting.vue.d.ts +12 -0
- package/lib/layout/components/SettingBar/components/DayNightToggle.vue.d.ts +9 -0
- package/lib/layout/components/SettingBar/components/SettingBreadcrumb.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingCopyright.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingEnableTransition.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingHome.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingMenu.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingMode.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingNavSearch.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingOther.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingPage.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingTabbar.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingThemes.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingToolbar.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingTopbar.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/components/SettingWidthMode.vue.d.ts +2 -0
- package/lib/layout/components/SettingBar/index.vue.d.ts +2 -0
- package/lib/layout/components/Sidebar/MainSidebar.vue.d.ts +2 -0
- package/lib/layout/components/Sidebar/SubSidebar.vue.d.ts +2 -0
- package/lib/layout/components/Sidebar/index.vue.d.ts +2 -0
- package/lib/layout/components/Tools/Breadcrumb/index.vue.d.ts +17 -0
- package/lib/layout/components/Tools/Breadcrumb/item.vue.d.ts +25 -0
- package/lib/layout/components/Tools/DayNightSwitch.vue.d.ts +2 -0
- package/lib/layout/components/Tools/HotkeysIntro.vue.d.ts +4 -0
- package/lib/layout/components/Tools/Preferences/PreferencesContent.vue.d.ts +2 -0
- package/lib/layout/components/Tools/Preferences/index.vue.d.ts +4 -0
- package/lib/layout/components/Tools/Search.vue.d.ts +199 -0
- package/lib/layout/components/Tools/index.vue.d.ts +233 -0
- package/lib/layout/components/Topbar/Tabbar/MoreAction.vue.d.ts +217 -0
- package/lib/layout/components/Topbar/Tabbar/index.vue.d.ts +14 -0
- package/lib/layout/components/Topbar/Toolbar/Favorites.vue.d.ts +4 -0
- package/lib/layout/components/Topbar/Toolbar/Star.vue.d.ts +2 -0
- package/lib/layout/components/Topbar/Toolbar/index.vue.d.ts +2 -0
- package/lib/layout/components/Topbar/index.vue.d.ts +2 -0
- package/lib/layout/composables/useContext.d.ts +18 -0
- package/lib/layout/composables/useGetComputedStyle.d.ts +15 -0
- package/lib/layout/composables/useHotkey.d.ts +5 -0
- package/lib/layout/composables/useMainPage.d.ts +14 -0
- package/lib/layout/composables/useMenu.d.ts +8 -0
- package/lib/layout/composables/useTabbar.d.ts +14 -0
- package/lib/layout/composables/useTitle.d.ts +3 -0
- package/lib/layout/composables/useViewTransition.d.ts +3 -0
- package/lib/layout/composables/useWatermark.d.ts +4 -0
- package/lib/layout/index.d.ts +19 -0
- package/lib/layout/provider.d.ts +1 -0
- package/lib/layout/ui-kit/HBadge.vue.d.ts +20 -0
- package/lib/layout/ui-kit/HButton.vue.d.ts +26 -0
- package/lib/layout/ui-kit/HCheckList.vue.d.ts +20 -0
- package/lib/layout/ui-kit/HDialog.vue.d.ts +28 -0
- package/lib/layout/ui-kit/HDivider.vue.d.ts +20 -0
- package/lib/layout/ui-kit/HDropdown.vue.d.ts +18 -0
- package/lib/layout/ui-kit/HDropdownMenu.vue.d.ts +26 -0
- package/lib/layout/ui-kit/HDropdownTree.vue.d.ts +32 -0
- package/lib/layout/ui-kit/HInput.vue.d.ts +17 -0
- package/lib/layout/ui-kit/HKbd.vue.d.ts +17 -0
- package/lib/layout/ui-kit/HSelect.vue.d.ts +17 -0
- package/lib/layout/ui-kit/HSlideover.vue.d.ts +30 -0
- package/lib/layout/ui-kit/HTabList.vue.d.ts +22 -0
- package/lib/layout/ui-kit/HToggle.vue.d.ts +14 -0
- package/lib/layout/ui-kit/HTooltip.vue.d.ts +23 -0
- package/lib/locales/index.d.ts +301 -0
- package/lib/locales/lang/en.json.d.ts +99 -0
- package/lib/locales/lang/zh-cn.json.d.ts +100 -0
- package/lib/locales/lang/zh-tw.json.d.ts +100 -0
- package/lib/locales/ui.d.ts +3 -0
- package/lib/modules.d.ts +11 -0
- package/lib/notification-IZqPm_OK.cjs +199 -0
- package/lib/pages/personal/profile/index.vue.d.ts +2 -0
- package/lib/pages/system/[...all].vue.d.ts +2 -0
- package/lib/pages/system/change-organization/index.vue.d.ts +2 -0
- package/lib/pages/system/change-password/components/ChangePasswordForm/index.vue.d.ts +18 -0
- package/lib/pages/system/change-password/index.vue.d.ts +31 -0
- package/lib/pages/system/index.vue.d.ts +2 -0
- package/lib/pages/system/not-permission/index.vue.d.ts +2 -0
- package/lib/pages/system/reload.vue.d.ts +2 -0
- package/lib/pick-y2yLda1R.cjs +1 -0
- package/lib/question-line-Cd0CU4hr.cjs +1 -0
- package/lib/reload-6L7Dzs7h.cjs +1 -0
- package/lib/request.cjs +6 -0
- package/lib/right-C5JQ_uRB.cjs +1 -0
- package/lib/route/async.d.ts +9 -0
- package/lib/route/guard/auth.d.ts +3 -0
- package/lib/route/guard/basic.d.ts +3 -0
- package/lib/route/guard/index.d.ts +3 -0
- package/lib/route/guard/setting.d.ts +3 -0
- package/lib/route/index.d.ts +7 -0
- package/lib/route/routes.d.ts +3 -0
- package/lib/stores/enum/index.d.ts +20 -0
- package/lib/stores/helper.d.ts +2 -0
- package/lib/stores/index.d.ts +5 -0
- package/lib/stores/modules/favorites.d.ts +32 -0
- package/lib/stores/modules/iframe.d.ts +41 -0
- package/lib/stores/modules/index.d.ts +9 -0
- package/lib/stores/modules/keepAlive.d.ts +23 -0
- package/lib/stores/modules/menu.d.ts +32 -0
- package/lib/stores/modules/notification.d.ts +18 -0
- package/lib/stores/modules/route.d.ts +42 -0
- package/lib/stores/modules/settings.d.ts +85 -0
- package/lib/stores/modules/tabbar.d.ts +59 -0
- package/lib/stores/modules/user.d.ts +3 -0
- package/lib/stores/plugin/persist.d.ts +5 -0
- package/lib/stores/plugin/sideEffect/cleanup.d.ts +5 -0
- package/lib/stores/plugin/sideEffect/favoritesStorage.d.ts +5 -0
- package/lib/stores/plugin/sideEffect/iframeCache.d.ts +5 -0
- package/lib/stores/plugin/sideEffect/index.d.ts +5 -0
- package/lib/stores/plugin/sideEffect/tabbarStorage.d.ts +5 -0
- package/lib/style.css +9 -0
- package/lib/utils/cleanup.d.ts +8 -0
- package/lib/utils/crypto.d.ts +4 -0
- package/lib/utils/eventBus.d.ts +5 -0
- package/lib/utils/index.d.ts +14 -0
- package/lib/utils/injectionKeys.d.ts +2 -0
- package/lib/utils/storage.d.ts +21 -0
- package/lib/utils/utils.d.ts +3 -0
- package/lib/utils/watermark.d.ts +51 -0
- package/package.json +101 -0
- package/src/api/enum/code.ts +78 -0
- package/src/api/helper.ts +64 -0
- package/src/api/index.ts +75 -0
- package/src/api/interface.ts +15 -0
- package/src/api/modules/auth/index.ts +3 -0
- package/src/api/modules/auth/renzhengfuwu.ts +131 -0
- package/src/api/modules/auth/typings.d.ts +97 -0
- package/src/api/modules/configData/heibaimingdanfuwu.ts +95 -0
- package/src/api/modules/configData/index.ts +5 -0
- package/src/api/modules/configData/typings.d.ts +357 -0
- package/src/api/modules/configData/xitongpeizhifuwu.ts +322 -0
- package/src/api/modules/configData/zidianfuwu.ts +193 -0
- package/src/api/modules/rbac/gangweijiekou.ts +114 -0
- package/src/api/modules/rbac/index.ts +13 -0
- package/src/api/modules/rbac/jiaosejiekou.ts +124 -0
- package/src/api/modules/rbac/pubJiaosezukongzhiqi.ts +113 -0
- package/src/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.ts +186 -0
- package/src/api/modules/rbac/typings.d.ts +2030 -0
- package/src/api/modules/rbac/yonghujiekou.ts +294 -0
- package/src/api/modules/rbac/yonghushoucangbiaojiekou.ts +93 -0
- package/src/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +72 -0
- package/src/api/modules/rbac/ziyuanjiekou.ts +223 -0
- package/src/api/modules/rbac/zuhuguanlijiekou.ts +91 -0
- package/src/api/modules/rbac/zuzhijiaosebiaokongzhiqi.ts +76 -0
- package/src/api/modules/rbac/zuzhijiekou.ts +171 -0
- package/src/api/request.ts +4 -0
- package/src/api/system/app.ts +28 -0
- package/src/api/system/typings.d.ts +77 -0
- package/src/api/system/user.ts +47 -0
- package/src/assets/fonts/digital-7/digital-7-webfont.eot +0 -0
- package/src/assets/fonts/digital-7/digital-7-webfont.svg +135 -0
- package/src/assets/fonts/digital-7/digital-7-webfont.woff +0 -0
- package/src/assets/fonts/digital-7/digital-7-webfont.woff2 +0 -0
- package/src/assets/fonts/digital-7/stylesheet.css +12 -0
- package/src/assets/fonts/digital-7_mono/digital-7_mono-webfont.eot +0 -0
- package/src/assets/fonts/digital-7_mono/digital-7_mono-webfont.svg +134 -0
- package/src/assets/fonts/digital-7_mono/digital-7_mono-webfont.woff +0 -0
- package/src/assets/fonts/digital-7_mono/digital-7_mono-webfont.woff2 +0 -0
- package/src/assets/fonts/digital-7_mono/stylesheet.css +12 -0
- package/src/assets/fonts/title.otf +0 -0
- package/src/assets/icons/403.svg +1 -0
- package/src/assets/icons/403_dark.svg +1 -0
- package/src/assets/icons/404.svg +1 -0
- package/src/assets/icons/404_dark.svg +1 -0
- package/src/assets/icons/add-child.svg +1 -0
- package/src/assets/icons/authority.svg +1 -0
- package/src/assets/icons/authorize.svg +1 -0
- package/src/assets/icons/blacklist-disable.svg +1 -0
- package/src/assets/icons/blacklist-enable.svg +1 -0
- package/src/assets/icons/browser-360.svg +1 -0
- package/src/assets/icons/browser-chrome.svg +1 -0
- package/src/assets/icons/browser-edge.svg +1 -0
- package/src/assets/icons/browser-ie.svg +1 -0
- package/src/assets/icons/browser-other.svg +1 -0
- package/src/assets/icons/browser-qq.svg +1 -0
- package/src/assets/icons/browser-safari.svg +1 -0
- package/src/assets/icons/browser-uc.svg +1 -0
- package/src/assets/icons/change-org.svg +1 -0
- package/src/assets/icons/edit.svg +1 -0
- package/src/assets/icons/empty-data.svg +1 -0
- package/src/assets/icons/favorites.svg +1 -0
- package/src/assets/icons/icard.svg +1 -0
- package/src/assets/icons/icon_animation.svg +1 -0
- package/src/assets/icons/icon_breadcrumb.svg +1 -0
- package/src/assets/icons/icon_copyright.svg +1 -0
- package/src/assets/icons/icon_jt.svg +1 -0
- package/src/assets/icons/icon_layout.svg +1 -0
- package/src/assets/icons/icon_mainpage.svg +1 -0
- package/src/assets/icons/icon_menu.svg +1 -0
- package/src/assets/icons/icon_page_size.svg +1 -0
- package/src/assets/icons/icon_position_type.svg +1 -0
- package/src/assets/icons/icon_safe_manage.svg +1 -0
- package/src/assets/icons/icon_screen_scale.svg +6 -0
- package/src/assets/icons/icon_system_manage.svg +1 -0
- package/src/assets/icons/icon_tabbar.svg +1 -0
- package/src/assets/icons/icon_toolbar.svg +1 -0
- package/src/assets/icons/icon_topbar.svg +1 -0
- package/src/assets/icons/icon_watermark.svg +1 -0
- package/src/assets/icons/image-load-fail.svg +1 -0
- package/src/assets/icons/log-center.svg +1 -0
- package/src/assets/icons/logo-sig.svg +1 -0
- package/src/assets/icons/mima.svg +1 -0
- package/src/assets/icons/not-data.svg +1 -0
- package/src/assets/icons/org-main.svg +1 -0
- package/src/assets/icons/org-unmain.svg +1 -0
- package/src/assets/icons/process-management.svg +1 -0
- package/src/assets/icons/project-management.svg +1 -0
- package/src/assets/icons/rbac.svg +1 -0
- package/src/assets/icons/remove.svg +1 -0
- package/src/assets/icons/resource-app.svg +1 -0
- package/src/assets/icons/resource-btn.svg +1 -0
- package/src/assets/icons/resource-index.svg +1 -0
- package/src/assets/icons/resource-menu.svg +1 -0
- package/src/assets/icons/resource-nonmenu.svg +1 -0
- package/src/assets/icons/setting-manage.svg +1 -0
- package/src/assets/icons/test.svg +1 -0
- package/src/assets/icons/theme-check-mark.svg +1 -0
- package/src/assets/icons/theme-title.svg +1 -0
- package/src/assets/icons/toolbar-collapse.svg +1 -0
- package/src/assets/icons/tree_icon.svg +1 -0
- package/src/assets/icons/tree_icon_checked.svg +1 -0
- package/src/assets/icons/view.svg +1 -0
- package/src/assets/icons/workbench.svg +1 -0
- package/src/assets/icons/zddata.svg +1 -0
- package/src/assets/icons/zy_checked.svg +1 -0
- package/src/assets/icons/zy_default.svg +1 -0
- package/src/assets/images/change-org-bc.webp +0 -0
- package/src/assets/images/header-bg.png +0 -0
- 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/login-small.png +0 -0
- package/src/assets/images/login-small_dark.webp +0 -0
- package/src/assets/images/logo.png +0 -0
- package/src/assets/images/not-cursor.png +0 -0
- package/src/assets/images/org.svg +19 -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/images/slider-bg.png +0 -0
- package/src/assets/styles/globals.scss +189 -0
- package/src/assets/styles/index.ts +6 -0
- package/src/assets/styles/nprogress.scss +63 -0
- package/src/assets/styles/rbac.scss +61 -0
- package/src/assets/styles/resources/utils.scss +53 -0
- package/src/assets/styles/resources/variables.scss +6 -0
- package/src/components/NotAllowed/index.vue +76 -0
- package/src/components/PageHeader/index.vue +32 -0
- package/src/components/PageMain/index.vue +51 -0
- package/src/components/PassStrengthValidator/index.vue +213 -0
- package/src/components/PassStrengthValidator/rule.vue +51 -0
- package/src/components/PubinfoApp/index.vue +21 -0
- package/src/components/PubinfoIcon/index.vue +85 -0
- package/src/components/PubinfoProvider/index.ts +34 -0
- package/src/components/index.ts +8 -0
- package/src/composables/auth.ts +53 -0
- package/src/composables/index.ts +4 -0
- package/src/composables/log.ts +44 -0
- package/src/composables/theme.ts +16 -0
- package/src/composables/watchDiff.ts +53 -0
- package/src/config/index.ts +1 -0
- package/src/config/settings.ts +107 -0
- package/src/context.ts +30 -0
- package/src/create.ts +88 -0
- package/src/directives/index.ts +6 -0
- package/src/directives/plugins/permission.ts +23 -0
- package/src/index.ts +12 -0
- package/src/interface.ts +35 -0
- package/src/layout/Layout.vue +330 -0
- package/src/layout/components/BackTop/index.vue +47 -0
- package/src/layout/components/Content/IframeView.vue +120 -0
- package/src/layout/components/Content/LinkView.vue +118 -0
- package/src/layout/components/Content/index.vue +100 -0
- package/src/layout/components/Copyright/index.vue +49 -0
- package/src/layout/components/Header/TopMode/More.vue +103 -0
- package/src/layout/components/Header/TopMode/NotCursor.vue +77 -0
- package/src/layout/components/Header/TopMode/index.vue +151 -0
- package/src/layout/components/Header/TopThinMode.vue +45 -0
- package/src/layout/components/Header/index.vue +263 -0
- package/src/layout/components/Logo/index.vue +70 -0
- package/src/layout/components/Menu/index.vue +195 -0
- package/src/layout/components/Menu/item.vue +166 -0
- package/src/layout/components/Menu/sub.vue +220 -0
- package/src/layout/components/Menu/types.ts +49 -0
- package/src/layout/components/SettingBar/AppSetting.vue +146 -0
- package/src/layout/components/SettingBar/components/DayNightToggle.vue +238 -0
- package/src/layout/components/SettingBar/components/SettingBreadcrumb.vue +42 -0
- package/src/layout/components/SettingBar/components/SettingCopyright.vue +44 -0
- package/src/layout/components/SettingBar/components/SettingEnableTransition.vue +215 -0
- package/src/layout/components/SettingBar/components/SettingHome.vue +33 -0
- package/src/layout/components/SettingBar/components/SettingMenu.vue +108 -0
- package/src/layout/components/SettingBar/components/SettingMode.vue +164 -0
- package/src/layout/components/SettingBar/components/SettingNavSearch.vue +30 -0
- package/src/layout/components/SettingBar/components/SettingOther.vue +53 -0
- package/src/layout/components/SettingBar/components/SettingPage.vue +20 -0
- package/src/layout/components/SettingBar/components/SettingTabbar.vue +70 -0
- package/src/layout/components/SettingBar/components/SettingThemes.vue +202 -0
- package/src/layout/components/SettingBar/components/SettingToolbar.vue +54 -0
- package/src/layout/components/SettingBar/components/SettingTopbar.vue +37 -0
- package/src/layout/components/SettingBar/components/SettingWidthMode.vue +149 -0
- package/src/layout/components/SettingBar/index.vue +112 -0
- package/src/layout/components/Sidebar/MainSidebar.vue +240 -0
- package/src/layout/components/Sidebar/SubSidebar.vue +165 -0
- package/src/layout/components/Sidebar/index.vue +13 -0
- package/src/layout/components/Tools/Breadcrumb/index.vue +21 -0
- package/src/layout/components/Tools/Breadcrumb/item.vue +44 -0
- package/src/layout/components/Tools/DayNightSwitch.vue +93 -0
- package/src/layout/components/Tools/HotkeysIntro.vue +103 -0
- package/src/layout/components/Tools/I18nSelector.vue +52 -0
- package/src/layout/components/Tools/Notification.vue +152 -0
- package/src/layout/components/Tools/Preferences/PreferencesContent.vue +722 -0
- package/src/layout/components/Tools/Preferences/index.vue +20 -0
- package/src/layout/components/Tools/Search.vue +380 -0
- package/src/layout/components/Tools/index.vue +241 -0
- package/src/layout/components/Topbar/Tabbar/MoreAction.vue +304 -0
- package/src/layout/components/Topbar/Tabbar/index.vue +781 -0
- package/src/layout/components/Topbar/Toolbar/Favorites.vue +138 -0
- package/src/layout/components/Topbar/Toolbar/Star.vue +30 -0
- package/src/layout/components/Topbar/Toolbar/index.vue +307 -0
- package/src/layout/components/Topbar/index.vue +106 -0
- package/src/layout/composables/useContext.ts +38 -0
- package/src/layout/composables/useGetComputedStyle.ts +70 -0
- package/src/layout/composables/useHotkey.ts +49 -0
- package/src/layout/composables/useMainPage.ts +68 -0
- package/src/layout/composables/useMenu.ts +29 -0
- package/src/layout/composables/useTabbar.ts +165 -0
- package/src/layout/composables/useTitle.ts +41 -0
- package/src/layout/composables/useViewTransition.ts +16 -0
- package/src/layout/composables/useWatermark.ts +67 -0
- package/src/layout/index.ts +59 -0
- package/src/layout/provider.ts +61 -0
- package/src/layout/ui-kit/HBadge.vue +41 -0
- package/src/layout/ui-kit/HButton.vue +28 -0
- package/src/layout/ui-kit/HCheckList.vue +49 -0
- package/src/layout/ui-kit/HDialog.vue +108 -0
- package/src/layout/ui-kit/HDivider.vue +53 -0
- package/src/layout/ui-kit/HDropdown.vue +13 -0
- package/src/layout/ui-kit/HDropdownMenu.vue +50 -0
- package/src/layout/ui-kit/HDropdownTree.vue +79 -0
- package/src/layout/ui-kit/HInput.vue +40 -0
- package/src/layout/ui-kit/HKbd.vue +33 -0
- package/src/layout/ui-kit/HSelect.vue +66 -0
- package/src/layout/ui-kit/HSlideover.vue +119 -0
- package/src/layout/ui-kit/HTabList.vue +56 -0
- package/src/layout/ui-kit/HToggle.vue +177 -0
- package/src/layout/ui-kit/HTooltip.vue +21 -0
- package/src/locales/index.ts +80 -0
- package/src/locales/lang/en.json +96 -0
- package/src/locales/lang/zh-cn.json +97 -0
- package/src/locales/lang/zh-tw.json +97 -0
- package/src/locales/ui.ts +3 -0
- package/src/modules.ts +49 -0
- package/src/pages/personal/notification.vue +58 -0
- package/src/pages/personal/profile/index.vue +125 -0
- package/src/pages/system/[...all].vue +74 -0
- package/src/pages/system/change-organization/index.vue +174 -0
- package/src/pages/system/change-password/components/ChangePasswordForm/index.vue +144 -0
- package/src/pages/system/change-password/index.vue +102 -0
- package/src/pages/system/change-password/page.vue +58 -0
- package/src/pages/system/index.vue +5 -0
- package/src/pages/system/not-permission/index.vue +73 -0
- package/src/pages/system/reload.vue +11 -0
- package/src/route/async.ts +18 -0
- package/src/route/guard/auth.ts +92 -0
- package/src/route/guard/basic.ts +23 -0
- package/src/route/guard/index.ts +3 -0
- package/src/route/guard/setting.ts +122 -0
- package/src/route/index.ts +12 -0
- package/src/route/routes.ts +110 -0
- package/src/stores/enum/index.ts +29 -0
- package/src/stores/helper.ts +37 -0
- package/src/stores/index.ts +10 -0
- package/src/stores/modules/favorites.ts +152 -0
- package/src/stores/modules/iframe.ts +114 -0
- package/src/stores/modules/index.ts +9 -0
- package/src/stores/modules/keepAlive.ts +68 -0
- package/src/stores/modules/menu.ts +207 -0
- package/src/stores/modules/notification.ts +34 -0
- package/src/stores/modules/route.ts +435 -0
- package/src/stores/modules/settings.ts +371 -0
- package/src/stores/modules/tabbar.ts +338 -0
- package/src/stores/modules/user.ts +210 -0
- package/src/stores/plugin/persist.ts +27 -0
- package/src/stores/plugin/sideEffect/cleanup.ts +20 -0
- package/src/stores/plugin/sideEffect/favoritesStorage.ts +62 -0
- package/src/stores/plugin/sideEffect/iframeCache.ts +32 -0
- package/src/stores/plugin/sideEffect/index.ts +15 -0
- package/src/stores/plugin/sideEffect/tabbarStorage.ts +98 -0
- package/src/utils/cleanup.ts +20 -0
- package/src/utils/crypto.ts +27 -0
- package/src/utils/eventBus.ts +15 -0
- package/src/utils/index.ts +44 -0
- package/src/utils/injectionKeys.ts +5 -0
- package/src/utils/storage.ts +57 -0
- package/src/utils/utils.ts +12 -0
- package/src/utils/watermark.ts +256 -0
- package/types/auto-imports.d.ts +85 -0
- package/types/components.d.ts +36 -0
- package/types/favorites.d.ts +8 -0
- package/types/iframe.d.ts +8 -0
- package/types/index.d.ts +9 -0
- package/types/menu.d.ts +31 -0
- package/types/module.d.ts +23 -0
- package/types/settings.d.ts +571 -0
- package/types/tabbar.d.ts +23 -0
- package/types/user.d.ts +46 -0
- package/types/vite-env.d.ts +39 -0
- package/types/vue-router.d.ts +68 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type { Favorites } from '#/favorites';
|
|
2
|
+
import type { Route } from '#/vue-router';
|
|
3
|
+
import type { RouteLocationNormalized, RouteRecordRaw } from 'vue-router';
|
|
4
|
+
|
|
5
|
+
import { resolveRoutePath } from '@/utils';
|
|
6
|
+
import { defineStore } from 'pinia';
|
|
7
|
+
import { STORE_NAME } from '../enum';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 用于管理收藏夹的自定义存储。
|
|
11
|
+
*
|
|
12
|
+
* @returns 包含各种函数和响应式属性以管理收藏夹的对象。
|
|
13
|
+
*/
|
|
14
|
+
const useFavoritesStore = defineStore(
|
|
15
|
+
STORE_NAME.FAVORITES,
|
|
16
|
+
() => {
|
|
17
|
+
const list = ref<Favorites.recordRaw[]>([]);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 判断路由项是否有子项
|
|
21
|
+
* @param item 路由项
|
|
22
|
+
* @returns 返回布尔值,表示是否有子项
|
|
23
|
+
*/
|
|
24
|
+
function hasChildren(item: RouteRecordRaw) {
|
|
25
|
+
let flag = true;
|
|
26
|
+
if (item.children?.every(i => i.meta?.sidebar === false)) {
|
|
27
|
+
flag = false;
|
|
28
|
+
}
|
|
29
|
+
return flag;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 获取源列表
|
|
34
|
+
* @param arr 路由记录数组
|
|
35
|
+
* @param basePath 基础路径
|
|
36
|
+
* @returns 源列表
|
|
37
|
+
* @example
|
|
38
|
+
* const routes: RouteRecordRaw[] = [
|
|
39
|
+
* {
|
|
40
|
+
* path: '/home',
|
|
41
|
+
* component: Home,
|
|
42
|
+
* meta: { sidebar: true },
|
|
43
|
+
* children: [
|
|
44
|
+
* { path: '/dashboard', component: Dashboard, meta: { sidebar: true } },
|
|
45
|
+
* { path: '/profile', component: Profile, meta: { sidebar: true } },
|
|
46
|
+
* ],
|
|
47
|
+
* },
|
|
48
|
+
* { path: '/about', component: About, meta: { sidebar: false } },
|
|
49
|
+
* ];
|
|
50
|
+
* const basePath = '/home';
|
|
51
|
+
* const sourceList = getSourceList(routes, basePath);
|
|
52
|
+
* console.log(sourceList); // Output: ['/home/dashboard', '/home/profile']
|
|
53
|
+
*/
|
|
54
|
+
function getSourceList(arr: RouteRecordRaw[], basePath?: string) {
|
|
55
|
+
const list: string[] = [];
|
|
56
|
+
for (const item of arr) {
|
|
57
|
+
if (item.meta?.sidebar !== false) {
|
|
58
|
+
if (item.children && hasChildren(item)) {
|
|
59
|
+
list.push(...getSourceList(item.children, resolveRoutePath(basePath, item.path)));
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
list.push((item.redirect as string) ?? resolveRoutePath(basePath, item.path));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return list;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 获取扁平化的侧边栏菜单列表
|
|
71
|
+
* @param routes - routeStore中的routes。
|
|
72
|
+
* @returns 扁平化的侧边栏菜单列表
|
|
73
|
+
*/
|
|
74
|
+
function flatSidebarMenu(routes: Route.recordMainRaw[] = []) {
|
|
75
|
+
const list: string[] = [];
|
|
76
|
+
|
|
77
|
+
routes.forEach((item) => {
|
|
78
|
+
if (item.children) {
|
|
79
|
+
const childrenList = getSourceList(item.children as RouteRecordRaw[]);
|
|
80
|
+
list.push(...childrenList);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return list;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 确定给定的fullPath是否可以添加到收藏夹。
|
|
89
|
+
* @param fullPath - 要检查的fullPath。
|
|
90
|
+
* @param routes - routeStore中的routes。
|
|
91
|
+
* @returns 如果可以添加到收藏夹,则为true;否则为false。
|
|
92
|
+
*/
|
|
93
|
+
function canAdd(fullPath: Favorites.recordRaw['fullPath'], routes: Route.recordMainRaw[] = []) {
|
|
94
|
+
return flatSidebarMenu(routes).includes(fullPath);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 判断是否已添加到收藏夹
|
|
99
|
+
* @param fullPath 完整路径
|
|
100
|
+
* @returns 如果已添加返回true,否则返回false
|
|
101
|
+
*/
|
|
102
|
+
function isAdd(fullPath: Favorites.recordRaw['fullPath']) {
|
|
103
|
+
return list.value.some(item => item.fullPath === fullPath);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 添加收藏夹项
|
|
108
|
+
* @param {RouteLocationNormalized} route - 路由对象
|
|
109
|
+
*/
|
|
110
|
+
function add(route: RouteLocationNormalized) {
|
|
111
|
+
const meta = route.matched.at(-1)?.meta;
|
|
112
|
+
if (!list.value.find(item => item.fullPath === route.fullPath)) {
|
|
113
|
+
list.value.push({
|
|
114
|
+
fullPath: route.fullPath,
|
|
115
|
+
title: meta?.title,
|
|
116
|
+
i18n: meta?.i18n,
|
|
117
|
+
icon: meta?.icon ?? meta?.breadcrumbNeste?.findLast(item => item.icon)?.icon,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 从收藏夹中移除一个项目。
|
|
124
|
+
* @param fullPath 要移除的项目的完整路径。
|
|
125
|
+
*/
|
|
126
|
+
function remove(fullPath: Favorites.recordRaw['fullPath']) {
|
|
127
|
+
list.value = list.value.filter((item) => {
|
|
128
|
+
return item.fullPath !== fullPath;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* 将列表中的项目从旧索引移动到新索引,以对项目进行排序。
|
|
134
|
+
* @param newIndex - 应将项目移动到的新索引。
|
|
135
|
+
* @param oldIndex - 应移动的项目的旧索引。
|
|
136
|
+
*/
|
|
137
|
+
function sort(newIndex: number, oldIndex: number) {
|
|
138
|
+
list.value.splice(newIndex, 0, list.value.splice(oldIndex, 1)[0]);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
list,
|
|
143
|
+
canAdd,
|
|
144
|
+
isAdd,
|
|
145
|
+
add,
|
|
146
|
+
remove,
|
|
147
|
+
sort,
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
export default useFavoritesStore;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { Iframe } from '#/iframe';
|
|
2
|
+
import type { RouteRecordNormalized } from 'vue-router';
|
|
3
|
+
import { isFunction, isString } from 'lodash-es';
|
|
4
|
+
import { defineStore } from 'pinia';
|
|
5
|
+
import { STORE_NAME } from '../enum';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* useIframeStore 是一个自定义的 Vue 组合函数,提供了用于管理 store 中 iframe 的响应式状态和方法。
|
|
9
|
+
* 它返回一个包含以下属性和方法的对象:
|
|
10
|
+
* - isGenerate: 一个 ref,表示 iframe 列表是否已生成。
|
|
11
|
+
* - openedList: 一个计算属性,返回当前打开的 iframe 的过滤列表。
|
|
12
|
+
* - generateList: 一个根据提供的路由配置生成 iframe 列表的方法。
|
|
13
|
+
* - closeLoading: 一个关闭特定 iframe 的加载状态的方法。
|
|
14
|
+
* - open: 一个打开特定 iframe 并更新最近路径列表的方法。
|
|
15
|
+
* - close: 一个关闭一个或多个 iframe 并从最近路径列表中移除它们的方法。
|
|
16
|
+
*/
|
|
17
|
+
const useIframeStore = defineStore(
|
|
18
|
+
STORE_NAME.IFRAME,
|
|
19
|
+
() => {
|
|
20
|
+
const isGenerate = ref(false);
|
|
21
|
+
const list = ref<Iframe.recordRaw[]>([]);
|
|
22
|
+
const recentPathList = ref<Iframe.recordRaw['path'][]>([]);
|
|
23
|
+
const openedList = computed(() => list.value.filter(item => item.isOpen));
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 生成列表
|
|
27
|
+
* @param router 路由记录数组
|
|
28
|
+
*/
|
|
29
|
+
async function generateList(router: RouteRecordNormalized[], user: any) {
|
|
30
|
+
for (const routeRecord of router) {
|
|
31
|
+
if (routeRecord.meta.iframe && !routeRecord.meta.link) {
|
|
32
|
+
if (isFunction(routeRecord.meta.iframe)) {
|
|
33
|
+
routeRecord.meta.iframe = await routeRecord.meta.iframe(toRaw(user));
|
|
34
|
+
}
|
|
35
|
+
list.value.push({
|
|
36
|
+
path: routeRecord.path,
|
|
37
|
+
src: routeRecord.meta.iframe,
|
|
38
|
+
isOpen: false,
|
|
39
|
+
isLoading: true,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
isGenerate.value = true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 关闭指定路径的iframe加载状态。
|
|
49
|
+
* @param path - iframe的路径。
|
|
50
|
+
*/
|
|
51
|
+
function closeLoading(path: string) {
|
|
52
|
+
const index = list.value.findIndex(item => item.path === path);
|
|
53
|
+
list.value[index].isLoading = !~index;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 打开指定路径的 iframe
|
|
58
|
+
* @param path 要打开的路径
|
|
59
|
+
*/
|
|
60
|
+
function open(path: string) {
|
|
61
|
+
const item = list.value.find(item => item.path === path);
|
|
62
|
+
if (item) {
|
|
63
|
+
item.isOpen = true;
|
|
64
|
+
const idx = recentPathList.value.findIndex(item => item === path);
|
|
65
|
+
if (~idx) {
|
|
66
|
+
recentPathList.value.splice(0, 0, recentPathList.value[idx]);
|
|
67
|
+
recentPathList.value.splice(idx);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
recentPathList.value.unshift(path);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 关闭指定路径的 iframe 路由。
|
|
77
|
+
* 如果路径是一个字符串,则关闭单个 iframe 路由。
|
|
78
|
+
* 如果路径是一个字符串数组,则关闭多个 iframe 路由。
|
|
79
|
+
* @param path 要关闭的 iframe 路由的路径(路径)。
|
|
80
|
+
*/
|
|
81
|
+
function close(path: string | string[]) {
|
|
82
|
+
function closeIframeRoute(path: string | string[]) {
|
|
83
|
+
const idx = list.value.findIndex(item => item.path === path);
|
|
84
|
+
if (~idx) {
|
|
85
|
+
list.value[idx].isOpen = false;
|
|
86
|
+
list.value[idx].isLoading = true;
|
|
87
|
+
}
|
|
88
|
+
recentPathList.value = recentPathList.value.filter(item => item !== path);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (isString(path)) {
|
|
92
|
+
closeIframeRoute(path);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
path.forEach(closeIframeRoute);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
isGenerate,
|
|
101
|
+
openedList,
|
|
102
|
+
generateList,
|
|
103
|
+
closeLoading,
|
|
104
|
+
open,
|
|
105
|
+
close,
|
|
106
|
+
|
|
107
|
+
// 提供给sideEffect插件
|
|
108
|
+
recentPathList,
|
|
109
|
+
list,
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
export default useIframeStore;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as useFavoritesStore } from './favorites';
|
|
2
|
+
export { default as useIframeStore } from './iframe';
|
|
3
|
+
export { default as useKeepAliveStore } from './keepAlive';
|
|
4
|
+
export { default as useMenuStore } from './menu';
|
|
5
|
+
export { default as useNotificationStore } from './notification';
|
|
6
|
+
export { default as useRouteStore } from './route';
|
|
7
|
+
export { default as useSettingsStore } from './settings';
|
|
8
|
+
export { default as useTabbarStore } from './tabbar';
|
|
9
|
+
export { default as useUserStore } from './user';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { isArray, isString } from 'lodash-es';
|
|
2
|
+
import { defineStore } from 'pinia';
|
|
3
|
+
import { STORE_NAME } from '../enum';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 创建一个用于管理 keep-alive 组件的存储对象。
|
|
7
|
+
*
|
|
8
|
+
* @returns keep-alive 存储对象。
|
|
9
|
+
*/
|
|
10
|
+
const useKeepAliveStore = defineStore(
|
|
11
|
+
STORE_NAME.KEEP_ALIVE,
|
|
12
|
+
() => {
|
|
13
|
+
const list = ref<string[]>([]);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 添加要缓存的组件名称到列表中
|
|
17
|
+
* @param name - 要添加的组件名称,可以是字符串或字符串数组
|
|
18
|
+
* @returns 如果成功添加了组件名称,则返回true;否则返回false
|
|
19
|
+
*/
|
|
20
|
+
function add(name: string | string[]) {
|
|
21
|
+
if (isString(name)) {
|
|
22
|
+
return !list.value.includes(name) && list.value.push(name);
|
|
23
|
+
}
|
|
24
|
+
else if (isArray(name)) {
|
|
25
|
+
name.forEach((_name) => {
|
|
26
|
+
add(_name);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
useWarn(`KeepAlive 需要接受一个字符串或者字符串数组作为参数, 但是接受到了 ${typeof name} 类型`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 从需要保持活动状态的组件列表中移除指定的组件名称。
|
|
36
|
+
*
|
|
37
|
+
* @param name - 要移除的组件名称或名称数组。
|
|
38
|
+
*/
|
|
39
|
+
function remove(name: string | string[]) {
|
|
40
|
+
if (isString(name)) {
|
|
41
|
+
list.value = list.value.filter((v) => {
|
|
42
|
+
return v !== name;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
else if (isArray(name)) {
|
|
46
|
+
list.value = list.value.filter((v) => {
|
|
47
|
+
return !name.includes(v);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 清空列表
|
|
54
|
+
*/
|
|
55
|
+
function clean() {
|
|
56
|
+
list.value = [];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
list,
|
|
61
|
+
add,
|
|
62
|
+
remove,
|
|
63
|
+
clean,
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
export default useKeepAliveStore;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import type { Menu } from '#/menu';
|
|
2
|
+
|
|
3
|
+
import { resolveRoutePath } from '@/utils';
|
|
4
|
+
import { get, isNumber } from 'lodash-es';
|
|
5
|
+
import { defineStore } from 'pinia';
|
|
6
|
+
|
|
7
|
+
import { STORE_NAME } from '../enum';
|
|
8
|
+
import useRouteStore from './route';
|
|
9
|
+
import useSettingsStore from './settings';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 用于管理与菜单相关数据的自定义存储。
|
|
13
|
+
*
|
|
14
|
+
* @returns 包含与菜单相关的各种计算属性和函数的对象。
|
|
15
|
+
*/
|
|
16
|
+
const useMenuStore = defineStore(
|
|
17
|
+
STORE_NAME.MENU,
|
|
18
|
+
() => {
|
|
19
|
+
const settingsStore = useSettingsStore();
|
|
20
|
+
const routeStore = useRouteStore();
|
|
21
|
+
const menus = ref<Menu.recordMainRaw[]>([{
|
|
22
|
+
meta: {},
|
|
23
|
+
children: [],
|
|
24
|
+
}]);
|
|
25
|
+
const actived = ref(0);
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 通过根据基本路径解析菜单项的相对路径,将其转换为完整路径
|
|
29
|
+
* @param menu - 要转换的菜单数组。
|
|
30
|
+
* @param path - 用于解析相对路径的基本路径。默认为空字符串。
|
|
31
|
+
* @returns 具有转换后的完整路径的菜单数组。
|
|
32
|
+
* @example
|
|
33
|
+
* // Example usage:
|
|
34
|
+
* const menu = [
|
|
35
|
+
* { path: 'home', title: 'Home' },
|
|
36
|
+
* { path: 'about', title: 'About' },
|
|
37
|
+
* ];
|
|
38
|
+
* const basePath = '/app';
|
|
39
|
+
* const convertedMenu = convertToFullPath(menu, basePath);
|
|
40
|
+
* console.log(convertedMenu);
|
|
41
|
+
* // Output:
|
|
42
|
+
* // [
|
|
43
|
+
* // { path: '/app/home', title: 'Home' },
|
|
44
|
+
* // { path: '/app/about', title: 'About' },
|
|
45
|
+
* // ]
|
|
46
|
+
*/
|
|
47
|
+
function convertToFullPath(menu: any[], path: string = '') {
|
|
48
|
+
return menu.map((item) => {
|
|
49
|
+
item.path = resolveRoutePath(path, item.path);
|
|
50
|
+
if (item.children) {
|
|
51
|
+
item.children = convertToFullPath(item.children, item.path);
|
|
52
|
+
}
|
|
53
|
+
return item;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 获取所有菜单项
|
|
59
|
+
* @returns 所有菜单项的数组
|
|
60
|
+
*/
|
|
61
|
+
const allMenus = computed(() => {
|
|
62
|
+
let returnMenus: Menu.recordMainRaw[] = [{
|
|
63
|
+
meta: {},
|
|
64
|
+
children: [],
|
|
65
|
+
}];
|
|
66
|
+
|
|
67
|
+
if (settingsStore.settings.menu.menuMode === 'single') {
|
|
68
|
+
returnMenus[0].children = [];
|
|
69
|
+
routeStore.routes.forEach((item) => {
|
|
70
|
+
if (!get(item, 'meta.isDev', false)) {
|
|
71
|
+
returnMenus[0].children?.push(...item.children as Menu.recordRaw[]);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
useWarn(`侧边栏模式(不含主导航)下省略${item.meta.title}的子集菜单,因为该菜单开启了isDev属性。`);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
returnMenus = routeStore.routes as Menu.recordMainRaw[];
|
|
80
|
+
}
|
|
81
|
+
returnMenus.map(item => convertToFullPath(item.children));
|
|
82
|
+
|
|
83
|
+
return returnMenus;
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 侧边栏菜单的计算属性。
|
|
88
|
+
* @returns {Menu.recordMainRaw['children']} 当前活动菜单的子菜单,如果没有菜单则返回空数组。
|
|
89
|
+
*/
|
|
90
|
+
const sidebarMenus = computed<Menu.recordMainRaw['children']>(() => {
|
|
91
|
+
const tempAllMenus = allMenus.value.filter(item => !get(item, 'meta.isDev', false));
|
|
92
|
+
if (tempAllMenus.length > 0) {
|
|
93
|
+
if (tempAllMenus.length > 1) {
|
|
94
|
+
while (get(allMenus.value[actived.value], 'meta.isDev', false) && actived.value < allMenus.value.length - 1) {
|
|
95
|
+
actived.value++;
|
|
96
|
+
}
|
|
97
|
+
return allMenus.value[actived.value].children;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return get(allMenus.value[0], 'meta.isDev', false) ? [] : allMenus.value[0].children;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* TODO: 如果第一个菜单是一个isDev为true的菜单,那么这个计算属性可能会出现问题
|
|
110
|
+
* 返回第一个侧边栏菜单的最深路径的计算属性。
|
|
111
|
+
*
|
|
112
|
+
* @returns {string} 第一个侧边栏菜单的最深路径,如果没有侧边栏菜单则返回'/'。
|
|
113
|
+
*/
|
|
114
|
+
const sidebarMenusFirstDeepestPath = computed(() => {
|
|
115
|
+
return sidebarMenus.value.length > 0
|
|
116
|
+
? getDeepestPath(sidebarMenus.value[0])
|
|
117
|
+
: '/';
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 获取最深层级的路径
|
|
122
|
+
* @param menu 菜单对象
|
|
123
|
+
* @param rootPath 根路径
|
|
124
|
+
* @returns 最深层级的路径
|
|
125
|
+
*/
|
|
126
|
+
function getDeepestPath(menu: Menu.recordRaw, rootPath = '') {
|
|
127
|
+
let retnPath = '';
|
|
128
|
+
if (menu.children) {
|
|
129
|
+
const item = menu.children.find(item => item.meta?.sidebar !== false);
|
|
130
|
+
if (item) {
|
|
131
|
+
retnPath = getDeepestPath(item, resolveRoutePath(rootPath, menu.path));
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
retnPath = getDeepestPath(menu.children[0], resolveRoutePath(rootPath, menu.path));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
retnPath = resolveRoutePath(rootPath, menu.path);
|
|
139
|
+
}
|
|
140
|
+
return retnPath;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* 默认打开的路径计算属性。
|
|
145
|
+
* @returns 一个字符串数组,表示默认打开的路径。
|
|
146
|
+
*/
|
|
147
|
+
const defaultOpenedPaths = computed(() => {
|
|
148
|
+
const defaultOpenedPaths: string[] = [];
|
|
149
|
+
|
|
150
|
+
allMenus.value.forEach((item) => {
|
|
151
|
+
defaultOpenedPaths.push(...getDefaultOpenedPaths(item.children));
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
return defaultOpenedPaths;
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* 获取默认展开的路径数组
|
|
159
|
+
* @param menus 菜单数据
|
|
160
|
+
* @param rootPath 根路径
|
|
161
|
+
* @returns 默认展开的路径数组
|
|
162
|
+
*/
|
|
163
|
+
function getDefaultOpenedPaths(menus: Menu.recordRaw[], rootPath = '') {
|
|
164
|
+
const defaultOpenedPaths: string[] = [];
|
|
165
|
+
menus.forEach((item) => {
|
|
166
|
+
if (item.meta?.defaultOpened && item.children) {
|
|
167
|
+
defaultOpenedPaths.push(resolveRoutePath(rootPath, item.path));
|
|
168
|
+
const childrenDefaultOpenedPaths = getDefaultOpenedPaths(item.children, resolveRoutePath(rootPath, item.path));
|
|
169
|
+
if (childrenDefaultOpenedPaths.length > 0) {
|
|
170
|
+
defaultOpenedPaths.push(...childrenDefaultOpenedPaths);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
return defaultOpenedPaths;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* 设置活动项
|
|
179
|
+
* @param data - 活动项的索引或路由
|
|
180
|
+
*/
|
|
181
|
+
function setActived(data: number | string) {
|
|
182
|
+
if (isNumber(data)) {
|
|
183
|
+
// 如果是 number 类型,则认为是主导航的索引
|
|
184
|
+
actived.value = data;
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
// 如果是 string 类型,则认为是路由,需要查找对应的主导航索引
|
|
188
|
+
const findIndex = allMenus.value.findIndex(item => item.children.some(r => data.indexOf(`${r.path}/`) === 0 || data === r.path));
|
|
189
|
+
if (findIndex >= 0) {
|
|
190
|
+
actived.value = findIndex;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return {
|
|
196
|
+
menus,
|
|
197
|
+
actived,
|
|
198
|
+
allMenus,
|
|
199
|
+
sidebarMenus,
|
|
200
|
+
sidebarMenusFirstDeepestPath,
|
|
201
|
+
defaultOpenedPaths,
|
|
202
|
+
setActived,
|
|
203
|
+
};
|
|
204
|
+
},
|
|
205
|
+
);
|
|
206
|
+
|
|
207
|
+
export default useMenuStore;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineStore } from 'pinia';
|
|
2
|
+
import { STORE_NAME } from '../enum';
|
|
3
|
+
|
|
4
|
+
const useNotificationStore = defineStore(
|
|
5
|
+
// 唯一ID
|
|
6
|
+
STORE_NAME.NOTIFICATION,
|
|
7
|
+
() => {
|
|
8
|
+
const message = ref(0);
|
|
9
|
+
const todo = ref(0);
|
|
10
|
+
const total = computed(() => message.value + todo.value);
|
|
11
|
+
|
|
12
|
+
function init() {
|
|
13
|
+
getUnreadMessage();
|
|
14
|
+
getUnreadTodo();
|
|
15
|
+
}
|
|
16
|
+
function getUnreadMessage() {
|
|
17
|
+
// 为方便演示,这里直接写死的未读数
|
|
18
|
+
message.value = 9;
|
|
19
|
+
}
|
|
20
|
+
function getUnreadTodo() {
|
|
21
|
+
// 为方便演示,这里直接写死的未读数
|
|
22
|
+
todo.value = 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
message,
|
|
27
|
+
todo,
|
|
28
|
+
total,
|
|
29
|
+
init,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
export default useNotificationStore;
|