@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,371 @@
|
|
|
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
|
+
import { FrownOutlined } from '@ant-design/icons-vue';
|
|
12
|
+
import { usePreferredDark } from '@vueuse/core';
|
|
13
|
+
import { Modal } from 'ant-design-vue';
|
|
14
|
+
import { cloneDeep, defaultsDeep, get, set } from 'lodash-es';
|
|
15
|
+
import { defineStore } from 'pinia';
|
|
16
|
+
import { createVNode } from 'vue';
|
|
17
|
+
import Message from 'vue-m-message';
|
|
18
|
+
import { STORE_NAME } from '../enum';
|
|
19
|
+
|
|
20
|
+
const useSettingsStore = defineStore(
|
|
21
|
+
// 唯一ID
|
|
22
|
+
STORE_NAME.SETTINGS,
|
|
23
|
+
() => {
|
|
24
|
+
const settingsDefault = getSettings();
|
|
25
|
+
|
|
26
|
+
const settings = ref(settingsDefault);
|
|
27
|
+
|
|
28
|
+
const userSettings = ref<Settings.all>({});
|
|
29
|
+
const globalSettings = ref(settingsDefault);
|
|
30
|
+
|
|
31
|
+
const globaleSettingsIsActive = ref(false);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 对于有全局系统配置的管理员,在个人设置设置优先的原则下
|
|
35
|
+
* 应当在全局系统配置变更时提示用户是否恢复个人设置为系统默认设置
|
|
36
|
+
*/
|
|
37
|
+
watchDiffObject(globalSettings, (diff: Record<string, any>) => {
|
|
38
|
+
if (!globaleSettingsIsActive.value) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const globalChangeSettingPath = objectToPaths(diff);
|
|
42
|
+
const userSettingsPath = objectToPaths(userSettings.value);
|
|
43
|
+
if (userSettingsPath.includes(globalChangeSettingPath.at(0)!)) {
|
|
44
|
+
if (storage.session.has('userSettingIsGod')) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
Modal.confirm({
|
|
48
|
+
title: '系统设置提示',
|
|
49
|
+
icon: createVNode(FrownOutlined),
|
|
50
|
+
content: '当前设置被个人设置覆盖无法预览当前全局系统配置,是否需要恢复个人设置为系统默认设置',
|
|
51
|
+
okText: '重置个人配置',
|
|
52
|
+
cancelText: '不在提示',
|
|
53
|
+
onOk() {
|
|
54
|
+
resetSettings();
|
|
55
|
+
},
|
|
56
|
+
onCancel() {
|
|
57
|
+
storage.session.set('userSettingIsGod', '');
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const val = get(diff, globalChangeSettingPath.at(0)!);
|
|
63
|
+
set(settings.value, globalChangeSettingPath.at(0)!, val);
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
flush: 'post',
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
watch([
|
|
71
|
+
() => settings.value.app.colorScheme,
|
|
72
|
+
() => settings.value.app.lightTheme,
|
|
73
|
+
() => settings.value.app.darkTheme,
|
|
74
|
+
], ([colorScheme, lightTheme, darkTheme]) => {
|
|
75
|
+
if (colorScheme === '') {
|
|
76
|
+
colorScheme = usePreferredDark() ? 'dark' : 'light';
|
|
77
|
+
}
|
|
78
|
+
switch (colorScheme) {
|
|
79
|
+
case 'light':
|
|
80
|
+
document.documentElement.classList.remove('dark');
|
|
81
|
+
document.body.setAttribute('data-theme', lightTheme);
|
|
82
|
+
break;
|
|
83
|
+
case 'dark':
|
|
84
|
+
document.documentElement.classList.add('dark');
|
|
85
|
+
document.body.setAttribute('data-theme', darkTheme);
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
immediate: true,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
watch(() => settings.value.layout.widthMode,
|
|
94
|
+
(val) => {
|
|
95
|
+
document.body.setAttribute('data-app-width-mode', val);
|
|
96
|
+
}, {
|
|
97
|
+
immediate: true,
|
|
98
|
+
},
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
watch(() => settings.value.menu.menuMode,
|
|
102
|
+
(val) => {
|
|
103
|
+
document.body.setAttribute('data-menu-mode', val);
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
immediate: true,
|
|
107
|
+
},
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
// 操作系统
|
|
111
|
+
const os = ref<'mac' | 'windows' | 'linux' | 'other'>('other');
|
|
112
|
+
const agent = navigator.userAgent.toLowerCase();
|
|
113
|
+
switch (true) {
|
|
114
|
+
case agent.includes('mac os'):
|
|
115
|
+
os.value = 'mac';
|
|
116
|
+
break;
|
|
117
|
+
case agent.includes('windows'):
|
|
118
|
+
os.value = 'windows';
|
|
119
|
+
break;
|
|
120
|
+
case agent.includes('linux'):
|
|
121
|
+
os.value = 'linux';
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// 页面权限码
|
|
126
|
+
const auth = ref<RouteMeta['auth']>();
|
|
127
|
+
|
|
128
|
+
// 记录页面标题
|
|
129
|
+
function setAuth(_auth: RouteMeta['auth']) {
|
|
130
|
+
if (Array.isArray(_auth)) {
|
|
131
|
+
useWarn('在使用数据范围的时候,router auth字段不能为数组');
|
|
132
|
+
auth.value = _auth[0] || '';
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
auth.value = _auth;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// 页面标题
|
|
140
|
+
const title = ref<RouteMeta['title']>();
|
|
141
|
+
|
|
142
|
+
// 记录页面标题
|
|
143
|
+
function setTitle(_title: RouteMeta['title']) {
|
|
144
|
+
title.value = _title;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 自定义标题
|
|
148
|
+
const customTitleList = ref<{
|
|
149
|
+
fullPath: RouteLocationNormalized['fullPath']
|
|
150
|
+
title: string
|
|
151
|
+
}[]>([]);
|
|
152
|
+
|
|
153
|
+
// 设置自定义标题
|
|
154
|
+
function setCustomTitle(fullPath: RouteLocationNormalized['fullPath'], title: string) {
|
|
155
|
+
const index = customTitleList.value.findIndex(item => item.fullPath === fullPath);
|
|
156
|
+
if (index > -1) {
|
|
157
|
+
customTitleList.value[index].title = title;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
customTitleList.value.push({
|
|
161
|
+
fullPath,
|
|
162
|
+
title,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// 重置自定义标题
|
|
168
|
+
function resetCustomTitle(fullPath: RouteLocationNormalized['fullPath']) {
|
|
169
|
+
const index = customTitleList.value.findIndex(item => item.fullPath === fullPath);
|
|
170
|
+
if (index > -1) {
|
|
171
|
+
customTitleList.value.splice(index, 1);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// 显示模式
|
|
176
|
+
const mode = ref<'pc' | 'mobile'>('pc');
|
|
177
|
+
|
|
178
|
+
// 设置显示模式
|
|
179
|
+
function setMode(width: number) {
|
|
180
|
+
if (settings.value.layout.enableMobileAdaptation) {
|
|
181
|
+
// 先判断 UA 是否为移动端设备(手机&平板)
|
|
182
|
+
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
|
183
|
+
mode.value = 'mobile';
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
// 如果是桌面设备,则根据页面宽度判断是否需要切换为移动端展示
|
|
187
|
+
mode.value = width < 992 ? 'mobile' : 'pc';
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
mode.value = 'pc';
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// 次导航是否收起(用于记录 pc 模式下最后的状态)
|
|
196
|
+
const subMenuCollapseLastStatus = ref(settingsDefault.menu.subMenuCollapse);
|
|
197
|
+
// 切换侧边栏导航展开/收起
|
|
198
|
+
function toggleSidebarCollapse() {
|
|
199
|
+
settings.value.menu.subMenuCollapse = !settings.value.menu.subMenuCollapse;
|
|
200
|
+
if (mode.value === 'pc') {
|
|
201
|
+
subMenuCollapseLastStatus.value = !subMenuCollapseLastStatus.value;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
watch(mode, (val) => {
|
|
206
|
+
switch (val) {
|
|
207
|
+
case 'pc':
|
|
208
|
+
settings.value.menu.subMenuCollapse = subMenuCollapseLastStatus.value;
|
|
209
|
+
break;
|
|
210
|
+
case 'mobile':
|
|
211
|
+
settings.value.menu.subMenuCollapse = true;
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
document.body.setAttribute('data-mode', val);
|
|
215
|
+
}, {
|
|
216
|
+
immediate: true,
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// 设置默认语言
|
|
220
|
+
function setDefaultLang(lang: string) {
|
|
221
|
+
settings.value.app.defaultLang = lang;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// 设置主题颜色模式
|
|
225
|
+
function setColorScheme(color: Required<Settings.app>['colorScheme']) {
|
|
226
|
+
settings.value.app.colorScheme = color;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// 主页面是否最大化
|
|
230
|
+
const mainPageMaximizeStatus = ref(false);
|
|
231
|
+
|
|
232
|
+
// 切换当前主页面最大化
|
|
233
|
+
function setMainPageMaximize(value?: boolean) {
|
|
234
|
+
mainPageMaximizeStatus.value = value ?? !mainPageMaximizeStatus.value;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* 更新配置
|
|
239
|
+
* @param data - 配置数据
|
|
240
|
+
* @param fromBase - 是否从基础配置中更新
|
|
241
|
+
*/
|
|
242
|
+
function updateSettings(data: Settings.all, fromBase = false) {
|
|
243
|
+
settings.value = defaultsDeep(data, fromBase ? settingsDefault : settings.value);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* 更新系统全局配置
|
|
248
|
+
* @param data - 全局配置
|
|
249
|
+
*/
|
|
250
|
+
function updateGlobalSettings(data: Settings.all) {
|
|
251
|
+
globalSettings.value = defaultsDeep(data, settingsDefault);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* 更新用户配置
|
|
256
|
+
* @param data - 用户配置
|
|
257
|
+
*/
|
|
258
|
+
function updateUserSettings(data: Settings.all) {
|
|
259
|
+
if (Object.keys(data).length > 0) {
|
|
260
|
+
userSettings.value = defaultsDeep(data, cloneDeep(userSettings.value));
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
userSettings.value = {};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* 开始监听globaleSettings变化
|
|
269
|
+
*/
|
|
270
|
+
function setGlobaleSettingsFlag(flag = true) {
|
|
271
|
+
globaleSettingsIsActive.value = flag;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* 获取全局和个人合并后的偏好设置
|
|
276
|
+
*/
|
|
277
|
+
async function getPreferences() {
|
|
278
|
+
const res = await getSysconfigGetThemeStyleConfig();
|
|
279
|
+
const content = res?.data?.content;
|
|
280
|
+
if (content) {
|
|
281
|
+
updateSettings(JSON.parse(content || '{}'), true);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* 获取个人偏好设置
|
|
287
|
+
*/
|
|
288
|
+
async function getUserPreferences() {
|
|
289
|
+
const res = await getSysconfigGetUserThemeStyleConfig();
|
|
290
|
+
const content = res?.data?.content;
|
|
291
|
+
if (content) {
|
|
292
|
+
updateUserSettings(JSON.parse(content || '{}'));
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* 获取系统全局偏好设置
|
|
298
|
+
*/
|
|
299
|
+
async function getPreferencesGlobalSettings() {
|
|
300
|
+
const res = await getSysconfigGetSysThemeStyleConfig();
|
|
301
|
+
const content = res?.data?.content;
|
|
302
|
+
if (content) {
|
|
303
|
+
updateGlobalSettings(JSON.parse(content || '{}'));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* 并发获取个人偏好设置和系统全局偏好设置
|
|
309
|
+
*/
|
|
310
|
+
async function getPreferencesAll() {
|
|
311
|
+
await Promise.all([
|
|
312
|
+
getPreferences(),
|
|
313
|
+
getPreferencesGlobalSettings(),
|
|
314
|
+
getUserPreferences(),
|
|
315
|
+
]);
|
|
316
|
+
setGlobaleSettingsFlag(true);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* 设置个人偏好设置
|
|
321
|
+
*/
|
|
322
|
+
async function setPreferencesSetting(content: Settings.all) {
|
|
323
|
+
await postSysconfigAddOrEditUserThemeStyleConfig({
|
|
324
|
+
content: JSON.stringify(content),
|
|
325
|
+
});
|
|
326
|
+
updateUserSettings(content);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* 重置用户个人偏好设置为系统设置
|
|
331
|
+
*/
|
|
332
|
+
async function resetSettings() {
|
|
333
|
+
await postSysconfigResetUserThemeStyleConfig();
|
|
334
|
+
await getPreferences();
|
|
335
|
+
await getUserPreferences();
|
|
336
|
+
Message.success('已还原系统设置');
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return {
|
|
340
|
+
settings,
|
|
341
|
+
os,
|
|
342
|
+
auth,
|
|
343
|
+
setAuth,
|
|
344
|
+
title,
|
|
345
|
+
setTitle,
|
|
346
|
+
customTitleList,
|
|
347
|
+
setCustomTitle,
|
|
348
|
+
resetCustomTitle,
|
|
349
|
+
mode,
|
|
350
|
+
setMode,
|
|
351
|
+
subMenuCollapseLastStatus,
|
|
352
|
+
toggleSidebarCollapse,
|
|
353
|
+
setDefaultLang,
|
|
354
|
+
setColorScheme,
|
|
355
|
+
mainPageMaximizeStatus,
|
|
356
|
+
setMainPageMaximize,
|
|
357
|
+
updateSettings,
|
|
358
|
+
globalSettings,
|
|
359
|
+
updateGlobalSettings,
|
|
360
|
+
userSettings,
|
|
361
|
+
updateUserSettings,
|
|
362
|
+
setGlobaleSettingsFlag,
|
|
363
|
+
|
|
364
|
+
getPreferencesAll,
|
|
365
|
+
setPreferencesSetting,
|
|
366
|
+
resetSettings,
|
|
367
|
+
};
|
|
368
|
+
},
|
|
369
|
+
);
|
|
370
|
+
|
|
371
|
+
export default useSettingsStore;
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import type { Tabbar } from '#/tabbar';
|
|
2
|
+
import type { RouteLocationNormalized, RouteRecordRaw } from 'vue-router';
|
|
3
|
+
import { defineStore } from 'pinia';
|
|
4
|
+
import { STORE_NAME } from '../enum';
|
|
5
|
+
import useIframeStore from './iframe';
|
|
6
|
+
import useKeepAliveStore from './keepAlive';
|
|
7
|
+
import useRouteStore from './route';
|
|
8
|
+
import useSettingsStore from './settings';
|
|
9
|
+
|
|
10
|
+
// TODO: 移除createTab函数,返回值变化太多
|
|
11
|
+
const useTabbarStore = defineStore(
|
|
12
|
+
STORE_NAME.TABBAR,
|
|
13
|
+
() => {
|
|
14
|
+
const settingsStore = useSettingsStore();
|
|
15
|
+
const routeStore = useRouteStore();
|
|
16
|
+
const keepAliveStore = useKeepAliveStore();
|
|
17
|
+
const iframeStore = useIframeStore();
|
|
18
|
+
|
|
19
|
+
const list = ref<Tabbar.recordRaw[]>([]);
|
|
20
|
+
const leaveIndex = ref(-1);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 初始化永久标签页。
|
|
24
|
+
*/
|
|
25
|
+
function initPermanentTab() {
|
|
26
|
+
const tabs: Tabbar.recordRaw[] = [];
|
|
27
|
+
|
|
28
|
+
function formatTabs(items: RouteRecordRaw) {
|
|
29
|
+
if (items.children) {
|
|
30
|
+
items.children.forEach((route) => {
|
|
31
|
+
if (route.meta?.permanent && route.meta?.breadcrumbNeste) {
|
|
32
|
+
const fullPath = route.meta.breadcrumbNeste.at(-1)?.path as string;
|
|
33
|
+
const tabId = settingsStore.settings.tabbar.mergeTabsBy === 'activeMenu' ? (route.meta.activeMenu || fullPath) : fullPath;
|
|
34
|
+
tabs.push({
|
|
35
|
+
tabId,
|
|
36
|
+
fullPath,
|
|
37
|
+
routeName: route.name,
|
|
38
|
+
activeMenu: route.meta.activeMenu,
|
|
39
|
+
title: typeof route.meta.title === 'function' ? route.meta.title() : route.meta.title,
|
|
40
|
+
i18n: route.meta.i18n,
|
|
41
|
+
iframe: route.meta.iframe,
|
|
42
|
+
icon: route.meta?.icon ?? route.meta?.breadcrumbNeste?.findLast(item => item.icon)?.icon,
|
|
43
|
+
activeIcon: route.meta?.activeIcon ?? route.meta?.breadcrumbNeste?.findLast(item => item.activeIcon)?.activeIcon,
|
|
44
|
+
name: route.name ? [route.name as string] : [],
|
|
45
|
+
customTitleList: [],
|
|
46
|
+
isPin: false,
|
|
47
|
+
isPermanent: true,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
routeStore.flatSystemRoutes.forEach(formatTabs);
|
|
55
|
+
routeStore.flatRoutes.forEach(formatTabs);
|
|
56
|
+
|
|
57
|
+
// 常驻的标签页添加到标签栏开头
|
|
58
|
+
if (tabs.length) {
|
|
59
|
+
list.value.unshift(...tabs);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 添加标签页
|
|
65
|
+
* @param route 路由对象
|
|
66
|
+
*/
|
|
67
|
+
async function add(route: RouteLocationNormalized) {
|
|
68
|
+
const names: string[] = [];
|
|
69
|
+
route.matched.forEach((v, i) => {
|
|
70
|
+
if (i > 0) {
|
|
71
|
+
if (v.components?.default.name) {
|
|
72
|
+
names.push(v.components.default.name);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const meta = route.matched.at(-1)?.meta;
|
|
77
|
+
const tabId = settingsStore.settings.tabbar.mergeTabsBy === 'activeMenu' ? (meta?.activeMenu ?? route.fullPath) : route.fullPath;
|
|
78
|
+
|
|
79
|
+
if (route.name !== 'Reload') {
|
|
80
|
+
// 记录查找到的标签页
|
|
81
|
+
const findTab = list.value.find((item) => {
|
|
82
|
+
if (settingsStore.settings.tabbar.mergeTabsBy === 'routeName' && item.routeName) {
|
|
83
|
+
return item.routeName === route.name;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return item.tabId === tabId;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// 新增标签页
|
|
90
|
+
if (!findTab) {
|
|
91
|
+
const listItem = {
|
|
92
|
+
tabId,
|
|
93
|
+
fullPath: route.fullPath,
|
|
94
|
+
routeName: route.name!,
|
|
95
|
+
activeMenu: meta?.activeMenu,
|
|
96
|
+
title: typeof meta?.title === 'function' ? meta.title() : meta?.title,
|
|
97
|
+
i18n: meta?.i18n,
|
|
98
|
+
iframe: meta?.iframe,
|
|
99
|
+
icon: meta?.icon ?? meta?.breadcrumbNeste?.findLast(item => item.icon)?.icon,
|
|
100
|
+
activeIcon: meta?.activeIcon ?? meta?.breadcrumbNeste?.findLast(item => item.activeIcon)?.activeIcon,
|
|
101
|
+
name: names,
|
|
102
|
+
customTitleList: [],
|
|
103
|
+
isPin: false,
|
|
104
|
+
isPermanent: false,
|
|
105
|
+
};
|
|
106
|
+
if (leaveIndex.value >= 0) {
|
|
107
|
+
list.value.splice(leaveIndex.value + 1, 0, listItem);
|
|
108
|
+
leaveIndex.value = -1;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
list.value.push(listItem);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// 更新标签页
|
|
115
|
+
else {
|
|
116
|
+
if (settingsStore.settings.tabbar.mergeTabsBy !== '') {
|
|
117
|
+
findTab.tabId = tabId;
|
|
118
|
+
findTab.fullPath = route.fullPath;
|
|
119
|
+
findTab.routeName = route.name!;
|
|
120
|
+
findTab.activeMenu = meta?.activeMenu;
|
|
121
|
+
findTab.title = typeof meta?.title === 'function' ? meta.title() : meta?.title;
|
|
122
|
+
findTab.i18n = meta?.i18n;
|
|
123
|
+
findTab.iframe = meta?.iframe;
|
|
124
|
+
findTab.icon = meta?.icon ?? meta?.breadcrumbNeste?.findLast(item => item.icon)?.icon;
|
|
125
|
+
findTab.activeIcon = meta?.activeIcon ?? meta?.breadcrumbNeste?.findLast(item => item.activeIcon)?.activeIcon;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @desc: 副作用函数清除keepAlive和Iframe
|
|
133
|
+
* @param {Function} condition 满足指定的条件
|
|
134
|
+
*/
|
|
135
|
+
function sideEffect(condition: (v: Tabbar.recordRaw, i: number) => boolean) {
|
|
136
|
+
const keepName: string[] = [];
|
|
137
|
+
const removeName: string[] = [];
|
|
138
|
+
const removeIframe: string[] = [];
|
|
139
|
+
|
|
140
|
+
list.value.forEach((v, i) => {
|
|
141
|
+
if (condition(v, i)) {
|
|
142
|
+
if (v.iframe) {
|
|
143
|
+
removeIframe.push(v.tabId);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
removeName.push(...v.name);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
keepName.push(...v.name);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
keepAliveStore.remove(removeName.filter(v => !keepName.includes(v)));
|
|
155
|
+
iframeStore.close(removeIframe);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* 从选项卡栏中移除一个选项卡。
|
|
160
|
+
* @param tabId 要移除的选项卡的ID。
|
|
161
|
+
*/
|
|
162
|
+
function remove(tabId: Tabbar.recordRaw['tabId']) {
|
|
163
|
+
sideEffect(v => v.tabId === tabId);
|
|
164
|
+
|
|
165
|
+
list.value = list.value.filter((item) => {
|
|
166
|
+
return item.tabId !== tabId;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* 从选项卡栏中移除除指定选项卡以外的所有选项卡。
|
|
172
|
+
* @param tabId 要保留的选项卡的ID。
|
|
173
|
+
*/
|
|
174
|
+
function removeOtherSide(tabId: Tabbar.recordRaw['tabId']) {
|
|
175
|
+
sideEffect(v => v.tabId !== tabId && !v.isPermanent && !v.isPin);
|
|
176
|
+
|
|
177
|
+
list.value = list.value.filter((item) => {
|
|
178
|
+
return item.tabId === tabId || item.isPermanent || item.isPin;
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* 从标签页列表中移除指定路由左侧的标签页。
|
|
184
|
+
* @param tabId 要移除的标签页的ID
|
|
185
|
+
*/
|
|
186
|
+
function removeLeftSide(tabId: Tabbar.recordRaw['tabId']) {
|
|
187
|
+
// 查找指定路由对应在标签页列表里的下标
|
|
188
|
+
const index = list.value.findIndex(item => item.tabId === tabId);
|
|
189
|
+
|
|
190
|
+
sideEffect((v, i) => i < index && !v.isPermanent && !v.isPin);
|
|
191
|
+
|
|
192
|
+
list.value = list.value.filter((item, i) => {
|
|
193
|
+
return i >= index || item.isPermanent || item.isPin;
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* 从指定路由开始,移除右侧的标签页,并执行相应的操作。
|
|
199
|
+
* @param tabId 要移除的标签页的唯一标识符
|
|
200
|
+
*/
|
|
201
|
+
function removeRightSide(tabId: Tabbar.recordRaw['tabId']) {
|
|
202
|
+
// 查找指定路由对应在标签页列表里的下标
|
|
203
|
+
const index = list.value.findIndex(item => item.tabId === tabId);
|
|
204
|
+
|
|
205
|
+
sideEffect((v, i) => i > index && !v.isPermanent && !v.isPin);
|
|
206
|
+
|
|
207
|
+
list.value = list.value.filter((item, i) => {
|
|
208
|
+
return i <= index || item.isPermanent || item.isPin;
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* 将指定的标签固定在标签栏中。
|
|
214
|
+
* @param tabId 要固定的标签的唯一标识符
|
|
215
|
+
*/
|
|
216
|
+
function pin(tabId: Tabbar.recordRaw['tabId']) {
|
|
217
|
+
const index = list.value.findIndex(item => item.tabId === tabId);
|
|
218
|
+
let toIndex = -1;
|
|
219
|
+
list.value.forEach((item, index) => {
|
|
220
|
+
if (item.isPermanent || item.isPin) {
|
|
221
|
+
toIndex = index;
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
if (index > toIndex) {
|
|
225
|
+
list.value.splice(toIndex + 1, 0, list.value[index]);
|
|
226
|
+
list.value.splice(index + 1, 1);
|
|
227
|
+
}
|
|
228
|
+
// 修改状态
|
|
229
|
+
list.value.forEach((item) => {
|
|
230
|
+
if (item.tabId === tabId) {
|
|
231
|
+
item.isPin = true;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* 取消固定指定的选项卡。
|
|
238
|
+
* 将选项卡移动到最后一个固定选项卡之后的下一个可用位置。
|
|
239
|
+
* 更新选项卡的 isPin 属性为 false。
|
|
240
|
+
* 操作完成后更新存储。
|
|
241
|
+
*
|
|
242
|
+
* @param tabId - 要取消固定的选项卡的唯一标识符。
|
|
243
|
+
*/
|
|
244
|
+
function unPin(tabId: Tabbar.recordRaw['tabId']) {
|
|
245
|
+
const index = list.value.findIndex(item => item.tabId === tabId);
|
|
246
|
+
let toIndex = -1;
|
|
247
|
+
list.value.forEach((item, index) => {
|
|
248
|
+
if (item.isPermanent || item.isPin) {
|
|
249
|
+
toIndex = index;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
list.value.splice(toIndex + 1, 0, list.value[index]);
|
|
253
|
+
list.value.splice(index, 1);
|
|
254
|
+
// 修改状态
|
|
255
|
+
list.value.forEach((item) => {
|
|
256
|
+
if (item.tabId === tabId) {
|
|
257
|
+
item.isPin = false;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* 清空列表
|
|
264
|
+
*/
|
|
265
|
+
function clean() {
|
|
266
|
+
list.value = [];
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* 将列表中的元素通过将元素从旧索引移动到新索引来进行排序。
|
|
271
|
+
* @param newIndex - 应该将元素移动到的新索引。
|
|
272
|
+
* @param oldIndex - 应该移动的元素的旧索引。
|
|
273
|
+
*/
|
|
274
|
+
function sort(newIndex: number, oldIndex: number) {
|
|
275
|
+
list.value.splice(newIndex, 0, list.value.splice(oldIndex, 1)[0]);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* 设置自定义标题
|
|
280
|
+
* @param {object} options - 选项参数
|
|
281
|
+
* @param {string} options.tabId - 标签页ID
|
|
282
|
+
* @param {string} options.title - 标题
|
|
283
|
+
*/
|
|
284
|
+
function setCustomTitle({ tabId, title }: {
|
|
285
|
+
tabId: Tabbar.recordRaw['tabId']
|
|
286
|
+
title: string
|
|
287
|
+
}) {
|
|
288
|
+
list.value.forEach((item) => {
|
|
289
|
+
if (item.tabId === tabId) {
|
|
290
|
+
const findItem = item.customTitleList.find(v => v.fullPath === item.fullPath);
|
|
291
|
+
if (findItem) {
|
|
292
|
+
findItem.title = title;
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
item.customTitleList.push({
|
|
296
|
+
fullPath: item.fullPath,
|
|
297
|
+
title,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* 重置自定义标题
|
|
306
|
+
* @param tabId - 标签栏ID
|
|
307
|
+
*/
|
|
308
|
+
function resetCustomTitle(tabId: Tabbar.recordRaw['tabId']) {
|
|
309
|
+
list.value.forEach((item) => {
|
|
310
|
+
if (item.tabId === tabId) {
|
|
311
|
+
const index = item.customTitleList.findIndex(v => v.fullPath === item.fullPath);
|
|
312
|
+
if (index > -1) {
|
|
313
|
+
item.customTitleList.splice(index, 1);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return {
|
|
320
|
+
list,
|
|
321
|
+
leaveIndex,
|
|
322
|
+
initPermanentTab,
|
|
323
|
+
add,
|
|
324
|
+
remove,
|
|
325
|
+
removeOtherSide,
|
|
326
|
+
removeLeftSide,
|
|
327
|
+
removeRightSide,
|
|
328
|
+
pin,
|
|
329
|
+
unPin,
|
|
330
|
+
clean,
|
|
331
|
+
sort,
|
|
332
|
+
setCustomTitle,
|
|
333
|
+
resetCustomTitle,
|
|
334
|
+
};
|
|
335
|
+
},
|
|
336
|
+
);
|
|
337
|
+
|
|
338
|
+
export default useTabbarStore;
|