@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,210 @@
|
|
|
1
|
+
import type { AxiosRequestHeaders } from 'axios';
|
|
2
|
+
import type { LocationQueryValue } from 'vue-router';
|
|
3
|
+
import { postAuthChangeLoginOrg, postAuthLogin } from '@/api/modules/auth';
|
|
4
|
+
import { getRbacResourceGrantedResources, getRbacUserUserEntireInfo, putRbacUserChangePassword } from '@/api/modules/rbac';
|
|
5
|
+
import { usePubinfoContext } from '@/context';
|
|
6
|
+
import { getEncryptedData } from '@/utils';
|
|
7
|
+
import { find } from 'lodash-es';
|
|
8
|
+
import { defineStore } from 'pinia';
|
|
9
|
+
import { STORE_NAME } from '../enum';
|
|
10
|
+
|
|
11
|
+
const useUserStore = defineStore(
|
|
12
|
+
STORE_NAME.USER,
|
|
13
|
+
() => {
|
|
14
|
+
const { router } = usePubinfoContext();
|
|
15
|
+
|
|
16
|
+
const user = reactive<User>({
|
|
17
|
+
account: '',
|
|
18
|
+
userId: '',
|
|
19
|
+
token: '',
|
|
20
|
+
avatar: '',
|
|
21
|
+
refreshToken: '',
|
|
22
|
+
orgList: [],
|
|
23
|
+
orgId: '',
|
|
24
|
+
permissions: [],
|
|
25
|
+
department: '',
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description
|
|
30
|
+
* 判断用户是否已登录
|
|
31
|
+
* @returns {boolean} 返回一个布尔值,表示用户是否已登录
|
|
32
|
+
*/
|
|
33
|
+
const isLogin = computed(() => !!user.token);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 计算属性,返回用户的组织名称。
|
|
37
|
+
* 如果用户有 orgId,则在 orgList 中找到对应的 orgName。
|
|
38
|
+
* 如果用户没有 orgId,则找到 orgList 中主要组织的 orgName。
|
|
39
|
+
* 如果找不到 orgName,则返回空字符串。
|
|
40
|
+
*/
|
|
41
|
+
const userOrgName = computed(() => {
|
|
42
|
+
let orgName: string | undefined;
|
|
43
|
+
if (user.orgId) {
|
|
44
|
+
const check = find(user.orgList, ['orgId', user.orgId]);
|
|
45
|
+
orgName = check?.orgName;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
const main = find(user.orgList, ['main', true]);
|
|
49
|
+
orgName = main?.orgName;
|
|
50
|
+
}
|
|
51
|
+
return orgName || '';
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 用户登录函数
|
|
56
|
+
* @param data 登录所需的数据
|
|
57
|
+
* @param data.account 账号
|
|
58
|
+
* @param data.password 密码
|
|
59
|
+
* @param data.captchas 验证码
|
|
60
|
+
* @param data.captchaHash 验证码哈希值
|
|
61
|
+
* @param data.loginType 登录类型,默认为 'password'
|
|
62
|
+
*/
|
|
63
|
+
async function login(data: {
|
|
64
|
+
account: string
|
|
65
|
+
password: string
|
|
66
|
+
captchas: string
|
|
67
|
+
captchaHash: string
|
|
68
|
+
loginType?: 'password'
|
|
69
|
+
}) {
|
|
70
|
+
const {
|
|
71
|
+
account: loginName,
|
|
72
|
+
password,
|
|
73
|
+
captchaHash: codeHash,
|
|
74
|
+
captchas: code,
|
|
75
|
+
loginType = 'password',
|
|
76
|
+
} = data;
|
|
77
|
+
const loginPwd = await getEncryptedData(password);
|
|
78
|
+
const result = await postAuthLogin({
|
|
79
|
+
loginType,
|
|
80
|
+
loginName,
|
|
81
|
+
loginPwd,
|
|
82
|
+
codeHash,
|
|
83
|
+
code,
|
|
84
|
+
});
|
|
85
|
+
const { accessToken, refreshToken } = result.data as Required<API.LoginTokenVo>;
|
|
86
|
+
await setToken(accessToken, refreshToken);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 执行用户注销操作,并跳转到登录页面。
|
|
91
|
+
* @param _redirect - 注销后的重定向路径,默认为当前页面的完整路径。
|
|
92
|
+
*/
|
|
93
|
+
async function logout(_redirect = router?.currentRoute.value.fullPath) {
|
|
94
|
+
router?.push({
|
|
95
|
+
name: 'Login',
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* 清空用户信息和相关状态。
|
|
101
|
+
*/
|
|
102
|
+
function clean() {
|
|
103
|
+
user.account = '';
|
|
104
|
+
user.userId = '';
|
|
105
|
+
user.token = '';
|
|
106
|
+
user.refreshToken = '';
|
|
107
|
+
user.avatar = '';
|
|
108
|
+
user.permissions = [];
|
|
109
|
+
user.orgId = '';
|
|
110
|
+
user.orgList = [];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* 获取用户信息
|
|
115
|
+
*/
|
|
116
|
+
async function getUserInfo() {
|
|
117
|
+
const res = await getRbacUserUserEntireInfo();
|
|
118
|
+
const userData = res.data as Required<API.PubUserBo>;
|
|
119
|
+
user.account = userData.realName || userData.loginName;
|
|
120
|
+
user.avatar = userData.userPic;
|
|
121
|
+
user.userId = userData.id;
|
|
122
|
+
user.orgList = userData.userOrgList!;
|
|
123
|
+
if (userData.userOrgList?.length && !user.orgId) {
|
|
124
|
+
user.orgId = find(userData.userOrgList, ['main', true])!.orgId!;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 修改用户密码
|
|
130
|
+
* @param form - 包含要修改的密码和令牌的表单数据
|
|
131
|
+
* @returns 修改密码的结果
|
|
132
|
+
*/
|
|
133
|
+
async function changeUserPassword(form: API.putRbacUserChangePasswordParams & { token?: LocationQueryValue | LocationQueryValue[] }) {
|
|
134
|
+
const headers = {} as AxiosRequestHeaders;
|
|
135
|
+
if (form.token) {
|
|
136
|
+
headers.authorization = form.token;
|
|
137
|
+
}
|
|
138
|
+
const encryptedOldpassword = await getEncryptedData(form.oldPassword);
|
|
139
|
+
const encryptedNewpassword = await getEncryptedData(form.newPassword);
|
|
140
|
+
const res = await putRbacUserChangePassword({
|
|
141
|
+
oldPassword: encryptedOldpassword,
|
|
142
|
+
newPassword: encryptedNewpassword,
|
|
143
|
+
}, {
|
|
144
|
+
headers,
|
|
145
|
+
});
|
|
146
|
+
return res;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 设置令牌
|
|
151
|
+
* @param accessToken 访问令牌
|
|
152
|
+
* @param refreshToken 刷新令牌数据
|
|
153
|
+
*/
|
|
154
|
+
async function setToken(accessToken: string, refreshToken: string) {
|
|
155
|
+
user.token = accessToken;
|
|
156
|
+
user.refreshToken = refreshToken;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* 获取用户权限列表
|
|
161
|
+
* @returns 用户权限列表
|
|
162
|
+
*/
|
|
163
|
+
async function getPermissions() {
|
|
164
|
+
const res = await getRbacResourceGrantedResources();
|
|
165
|
+
user.permissions = res.data!;
|
|
166
|
+
return user.permissions;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* 更改组织
|
|
171
|
+
* @param changeOrgId - 要更改的组织ID
|
|
172
|
+
*/
|
|
173
|
+
async function changeOrg(changeOrgId: string) {
|
|
174
|
+
const res = await postAuthChangeLoginOrg({ orgId: changeOrgId });
|
|
175
|
+
const { accessToken, refreshToken } = res.data as Required<API.LoginTokenVo>;
|
|
176
|
+
await setToken(accessToken, refreshToken);
|
|
177
|
+
user.orgId = changeOrgId;
|
|
178
|
+
router?.push({
|
|
179
|
+
path: '/',
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
async function phoneLogin(phone: string, verify: string) {
|
|
184
|
+
// message.success(`${phone}登录成功`);
|
|
185
|
+
// await setToken(accessToken, refreshTokenData);
|
|
186
|
+
// await getUserInfo();
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
user,
|
|
191
|
+
isLogin,
|
|
192
|
+
login,
|
|
193
|
+
logout,
|
|
194
|
+
phoneLogin,
|
|
195
|
+
getPermissions,
|
|
196
|
+
changeUserPassword,
|
|
197
|
+
userOrgName,
|
|
198
|
+
changeOrg,
|
|
199
|
+
setToken,
|
|
200
|
+
getUserInfo,
|
|
201
|
+
clean,
|
|
202
|
+
...toRefs(user),
|
|
203
|
+
};
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
persist: true,
|
|
207
|
+
},
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
export default useUserStore;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Pinia } from 'pinia';
|
|
2
|
+
import type { PersistedStateFactoryOptions, Serializer } from 'pinia-plugin-persistedstate';
|
|
3
|
+
import { storage } from '@/utils';
|
|
4
|
+
import { createPersistedState } from 'pinia-plugin-persistedstate';
|
|
5
|
+
|
|
6
|
+
export function customSerializer(): Serializer {
|
|
7
|
+
return {
|
|
8
|
+
deserialize: (value) => {
|
|
9
|
+
return JSON.parse(value);
|
|
10
|
+
},
|
|
11
|
+
serialize: (value) => {
|
|
12
|
+
return JSON.stringify(value);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function createPersistedStateOptions(): PersistedStateFactoryOptions {
|
|
18
|
+
return {
|
|
19
|
+
storage: storage.local,
|
|
20
|
+
key: id => `_${id}`,
|
|
21
|
+
serializer: customSerializer(),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function registerPiniaPersistPlugin(pinia: Pinia) {
|
|
26
|
+
pinia.use(createPersistedState(createPersistedStateOptions()));
|
|
27
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PiniaPluginContext } from 'pinia';
|
|
2
|
+
import { cleanup, cleanupWithoutUser } from '@/utils';
|
|
3
|
+
import { STORE_NAME } from '../../enum';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 登出和切换组织时,触发清理状态
|
|
7
|
+
*/
|
|
8
|
+
export function createCleanupPlugin({ store }: PiniaPluginContext) {
|
|
9
|
+
if (store.$id === STORE_NAME.USER) {
|
|
10
|
+
store.$onAction(({ name }) => {
|
|
11
|
+
if (name === 'logout') {
|
|
12
|
+
cleanup();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (name === 'changeOrg') {
|
|
16
|
+
cleanupWithoutUser();
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { PiniaPluginContext } from 'pinia';
|
|
2
|
+
import type useFavoritesStore from '../../modules/favorites';
|
|
3
|
+
import { GetAPIFavorites, GetAPIFavoritesEdit } from '@/api/system/user';
|
|
4
|
+
import { storage } from '@/utils';
|
|
5
|
+
import { STORE_NAME } from '../../enum';
|
|
6
|
+
import { getfavoritesMemoryKey } from '../../helper';
|
|
7
|
+
import useSettingsStore from '../../modules/settings';
|
|
8
|
+
import useUserStore from '../../modules/user';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 收藏夹持久化插件
|
|
12
|
+
*/
|
|
13
|
+
export function createFavoritesStoragePlugin({ store }: PiniaPluginContext) {
|
|
14
|
+
if (store.$id === STORE_NAME.FAVORITES) {
|
|
15
|
+
const favoritesStore = store as ReturnType<typeof useFavoritesStore>;
|
|
16
|
+
const favoritesId = computed(() => useUserStore().account);
|
|
17
|
+
const settingsStore = useSettingsStore();
|
|
18
|
+
|
|
19
|
+
// list 变化时更新存储
|
|
20
|
+
watch(
|
|
21
|
+
() => favoritesStore.list,
|
|
22
|
+
() => {
|
|
23
|
+
updateStorage();
|
|
24
|
+
},
|
|
25
|
+
{ deep: true },
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
/** 更新存储 */
|
|
29
|
+
async function updateStorage() {
|
|
30
|
+
if (settingsStore.settings.favorites.storageTo === 'local') {
|
|
31
|
+
const favoritesMemoryKey = getfavoritesMemoryKey();
|
|
32
|
+
const favoritesData = storage.local.has(favoritesMemoryKey) ? JSON.parse(storage.local.get(favoritesMemoryKey) as string) : {};
|
|
33
|
+
favoritesData[favoritesId.value] = favoritesStore.list;
|
|
34
|
+
storage.local.set(favoritesMemoryKey, JSON.stringify(favoritesData));
|
|
35
|
+
}
|
|
36
|
+
else if (settingsStore.settings.favorites.storageTo === 'server') {
|
|
37
|
+
await GetAPIFavoritesEdit(JSON.stringify(favoritesStore.list));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** 从存储中恢复收藏夹数据 */
|
|
42
|
+
async function recoveryStorage() {
|
|
43
|
+
if (!settingsStore.settings.favorites.enable) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (settingsStore.settings.favorites.storageTo === 'local') {
|
|
48
|
+
const favoritesMemoryKey = getfavoritesMemoryKey();
|
|
49
|
+
if (storage.local.has(favoritesMemoryKey)) {
|
|
50
|
+
favoritesStore.list = JSON.parse(storage.local.get(favoritesMemoryKey) as string)[favoritesId.value] || [];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else if (settingsStore.settings.favorites.storageTo === 'server') {
|
|
54
|
+
const res = await GetAPIFavorites();
|
|
55
|
+
favoritesStore.list = JSON.parse(res.data.favorites || '[]');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 给 favoritesStore 增加方法
|
|
60
|
+
store.recoveryStorage = recoveryStorage;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { PiniaPluginContext } from 'pinia';
|
|
2
|
+
import type useIframeStore from '../../modules/iframe';
|
|
3
|
+
import { STORE_NAME } from '../../enum';
|
|
4
|
+
import useSettingsStore from '../../modules/settings';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 最大缓存数量检测,超过缓存数量则关闭最早打开的 iframe
|
|
8
|
+
*/
|
|
9
|
+
export function createIframeCachePlugin({ store }: PiniaPluginContext) {
|
|
10
|
+
if (store.$id === STORE_NAME.IFRAME) {
|
|
11
|
+
const iframeStore = store as ReturnType<typeof useIframeStore>;
|
|
12
|
+
const settingsStore = useSettingsStore();
|
|
13
|
+
|
|
14
|
+
store.$onAction(({ name }) => {
|
|
15
|
+
if (name === 'open') {
|
|
16
|
+
let count = 0;
|
|
17
|
+
iframeStore.recentPathList.forEach((item) => {
|
|
18
|
+
if (iframeStore.list.find(v => v.path === item)?.isOpen) {
|
|
19
|
+
count++;
|
|
20
|
+
}
|
|
21
|
+
if (count > settingsStore.settings.mainPage.iframeCacheMax) {
|
|
22
|
+
const idx = iframeStore.list.findIndex(v => v.path === item);
|
|
23
|
+
if (~idx) {
|
|
24
|
+
iframeStore.list[idx].isOpen = false;
|
|
25
|
+
iframeStore.list[idx].isLoading = true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Pinia } from 'pinia';
|
|
2
|
+
import { createCleanupPlugin } from './cleanup';
|
|
3
|
+
import { createFavoritesStoragePlugin } from './favoritesStorage';
|
|
4
|
+
import { createIframeCachePlugin } from './iframeCache';
|
|
5
|
+
import { createTabbarStoragePlugin } from './tabbarStorage';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 各个store的副作用插件集合
|
|
9
|
+
*/
|
|
10
|
+
export function registerPiniaSideEffectPlugin(pinia: Pinia) {
|
|
11
|
+
pinia.use(createCleanupPlugin);
|
|
12
|
+
pinia.use(createFavoritesStoragePlugin);
|
|
13
|
+
pinia.use(createIframeCachePlugin);
|
|
14
|
+
pinia.use(createTabbarStoragePlugin);
|
|
15
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { PiniaPluginContext } from 'pinia';
|
|
2
|
+
import type useTabbarStore from '../../modules/tabbar';
|
|
3
|
+
import { GetAPITabbar, GetAPITabbarEdit } from '@/api/system/user';
|
|
4
|
+
import { storage } from '@/utils';
|
|
5
|
+
import { cloneDeep } from 'lodash-es';
|
|
6
|
+
import { STORE_NAME } from '../../enum';
|
|
7
|
+
import { getTabbarMemoryKey } from '../../helper';
|
|
8
|
+
import useSettingsStore from '../../modules/settings';
|
|
9
|
+
import useUserStore from '../../modules/user';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 选项卡持久化插件
|
|
13
|
+
*/
|
|
14
|
+
export function createTabbarStoragePlugin({ store }: PiniaPluginContext) {
|
|
15
|
+
if (store.$id === STORE_NAME.TABBAR) {
|
|
16
|
+
const tabbarStore = store as ReturnType<typeof useTabbarStore>;
|
|
17
|
+
const tabbarId = computed(() => useUserStore().account);
|
|
18
|
+
const settingsStore = useSettingsStore();
|
|
19
|
+
|
|
20
|
+
// list 变化时更新存储
|
|
21
|
+
watch(
|
|
22
|
+
() => tabbarStore.list,
|
|
23
|
+
() => {
|
|
24
|
+
updateStorage();
|
|
25
|
+
},
|
|
26
|
+
{ deep: true },
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 更新存储
|
|
31
|
+
*/
|
|
32
|
+
async function updateStorage() {
|
|
33
|
+
if (settingsStore.settings.tabbar.storageTo === 'local') {
|
|
34
|
+
const tabbarMemoryKey = getTabbarMemoryKey();
|
|
35
|
+
const pinData = storage.local.has(tabbarMemoryKey) ? JSON.parse(storage.local.get(tabbarMemoryKey) as string) : {};
|
|
36
|
+
pinData[tabbarId.value] = cloneDeep(tabbarStore.list.filter((item) => {
|
|
37
|
+
return item.isPin;
|
|
38
|
+
})).map((item) => {
|
|
39
|
+
// 不存储自定义标题
|
|
40
|
+
item.customTitleList = [];
|
|
41
|
+
return item;
|
|
42
|
+
});
|
|
43
|
+
storage.local.set(tabbarMemoryKey, JSON.stringify(pinData));
|
|
44
|
+
}
|
|
45
|
+
else if (settingsStore.settings.tabbar.storageTo === 'server') {
|
|
46
|
+
await GetAPITabbarEdit(JSON.stringify(cloneDeep(tabbarStore.list.filter((item) => {
|
|
47
|
+
return item.isPin;
|
|
48
|
+
})).map((item) => {
|
|
49
|
+
// 不存储自定义标题
|
|
50
|
+
item.customTitleList = [];
|
|
51
|
+
return item;
|
|
52
|
+
})));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (settingsStore.settings.tabbar.enableMemory) {
|
|
56
|
+
// 将非固定和非常驻标签页记录到 sessionStorage
|
|
57
|
+
const tabbarMemoryKey = getTabbarMemoryKey();
|
|
58
|
+
const unpinData = storage.session.has(tabbarMemoryKey) ? JSON.parse(storage.session.get(tabbarMemoryKey) as string) : {};
|
|
59
|
+
unpinData[tabbarId.value] = cloneDeep(tabbarStore.list.filter((item) => {
|
|
60
|
+
return !item.isPin && !item.isPermanent;
|
|
61
|
+
})).map((item) => {
|
|
62
|
+
// 不存储自定义标题
|
|
63
|
+
item.customTitleList = [];
|
|
64
|
+
return item;
|
|
65
|
+
});
|
|
66
|
+
storage.session.set(tabbarMemoryKey, JSON.stringify(unpinData));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 从存储中恢复标签栏数据
|
|
72
|
+
*/
|
|
73
|
+
async function recoveryStorage() {
|
|
74
|
+
if (!settingsStore.settings.tabbar.enable) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const tabbarMemoryKey = getTabbarMemoryKey();
|
|
79
|
+
|
|
80
|
+
if (settingsStore.settings.tabbar.storageTo === 'local') {
|
|
81
|
+
if (storage.local.has(tabbarMemoryKey)) {
|
|
82
|
+
tabbarStore.list.push(...(JSON.parse(storage.local.get(tabbarMemoryKey) as string)[tabbarId.value] || []));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else if (settingsStore.settings.tabbar.storageTo === 'server') {
|
|
86
|
+
const res = await GetAPITabbar();
|
|
87
|
+
tabbarStore.list.push(...(JSON.parse(res.data.tabbar || '[]')));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (settingsStore.settings.tabbar.enableMemory && storage.session.has(tabbarMemoryKey)) {
|
|
91
|
+
tabbarStore.list.push(...(JSON.parse(storage.session.get(tabbarMemoryKey) as string)[tabbarId.value] || []));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// 给 tabbarStore 增加方法
|
|
96
|
+
store.recoveryStorage = recoveryStorage;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useMenuStore, useRouteStore, useTabbarStore, useUserStore } from '@/stores';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 清理所有 store 中的状态
|
|
5
|
+
*/
|
|
6
|
+
export function cleanup() {
|
|
7
|
+
useUserStore().clean();
|
|
8
|
+
useTabbarStore().clean();
|
|
9
|
+
useRouteStore().removeRoutes();
|
|
10
|
+
useMenuStore().setActived(0);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 清理 userStore 以外的所有 store 状态
|
|
15
|
+
*/
|
|
16
|
+
export function cleanupWithoutUser() {
|
|
17
|
+
useTabbarStore().clean();
|
|
18
|
+
useRouteStore().removeRoutes();
|
|
19
|
+
useMenuStore().setActived(0);
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getAuthLoginKey } from '@/api/modules/auth';
|
|
2
|
+
import JSEncrypt from 'jsencrypt';
|
|
3
|
+
import { template } from 'lodash-es';
|
|
4
|
+
|
|
5
|
+
export function compilePublicKey(key: string) {
|
|
6
|
+
const compiled = template('-----BEGIN PUBLIC KEY-----\n<%= publickKey %>\n-----END PUBLIC KEY-----');
|
|
7
|
+
return compiled({ publickKey: key });
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export async function getPem() {
|
|
11
|
+
const { data } = await getAuthLoginKey();
|
|
12
|
+
const key = compilePublicKey(data!);
|
|
13
|
+
return key;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export async function encryptWithPublicKey(publicKey: string, data: string) {
|
|
17
|
+
const encryptor = new JSEncrypt();
|
|
18
|
+
encryptor.setPublicKey(publicKey);
|
|
19
|
+
const encrypted = encryptor.encrypt(data);
|
|
20
|
+
return encrypted as string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function getEncryptedData(str: string) {
|
|
24
|
+
const key = await getPem();
|
|
25
|
+
const value = await encryptWithPublicKey(key, str);
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Description:
|
|
3
|
+
* @Author: wsy
|
|
4
|
+
* @Date: 2023-11-20 09:08:32
|
|
5
|
+
* @LastEditTime: 2024-12-03 10:24:57
|
|
6
|
+
* @LastEditors: Werheng vhang97@163.com
|
|
7
|
+
*/
|
|
8
|
+
// TODO 优化掉
|
|
9
|
+
import mitt from 'mitt';
|
|
10
|
+
|
|
11
|
+
interface MittTypes {
|
|
12
|
+
[key: PropertyKey]: any
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default mitt<MittTypes>();
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Primitive } from 'type-fest';
|
|
2
|
+
import { isArray, isEmpty, isObject, reduce } from 'lodash-es';
|
|
3
|
+
import path from 'path-browserify';
|
|
4
|
+
|
|
5
|
+
type ConditionalExceptType<T extends Record<PropertyKey, any>, Type> = {
|
|
6
|
+
[P in keyof T]: Exclude<T[P], Type>
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export function resolveRoutePath(basePath?: string, routePath?: string) {
|
|
10
|
+
return basePath ? path.resolve(basePath, routePath ?? '') : routePath ?? '';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function normalizePrimitiveToFunction<T extends Record<PropertyKey, any>>(options: T): ConditionalExceptType<T, Primitive> {
|
|
14
|
+
for (const key in options) {
|
|
15
|
+
if (typeof options[key] !== 'function') {
|
|
16
|
+
const value = options[key]
|
|
17
|
+
;(options[key] as () => typeof value) = () => value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return options;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function objectToPaths(obj: Record<string, any>, prefix = '') {
|
|
24
|
+
return reduce(obj, (result, value, key) => {
|
|
25
|
+
const fullPath = prefix.length ? `${prefix}.${key}` : key;
|
|
26
|
+
if (isObject(value) && !isArray(value) && !isEmpty(value)) {
|
|
27
|
+
// 如果是非空对象,递归调用
|
|
28
|
+
result = result.concat(objectToPaths(value, fullPath));
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// 否则,添加当前路径到结果数组
|
|
32
|
+
result.push(fullPath);
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
}, [] as string[]);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export * from './cleanup';
|
|
39
|
+
export * from './crypto';
|
|
40
|
+
export { default as eventBus } from './eventBus';
|
|
41
|
+
export * from './injectionKeys';
|
|
42
|
+
export { default as storage } from './storage';
|
|
43
|
+
export * from './utils';
|
|
44
|
+
export { default as watermark } from './watermark';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { getSettings } from '@/config';
|
|
2
|
+
|
|
3
|
+
function getStoragePrefix() {
|
|
4
|
+
const settings = getSettings();
|
|
5
|
+
return settings?.app?.storagePrefix;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const storage = {
|
|
9
|
+
local: {
|
|
10
|
+
has: (key: string) => {
|
|
11
|
+
return Object.prototype.hasOwnProperty.call(localStorage, `${getStoragePrefix()}${key}`);
|
|
12
|
+
},
|
|
13
|
+
get: (key: string) => {
|
|
14
|
+
return localStorage.getItem(`${getStoragePrefix()}${key}`);
|
|
15
|
+
},
|
|
16
|
+
set: (key: string, value: string) => {
|
|
17
|
+
localStorage.setItem(`${getStoragePrefix()}${key}`, value);
|
|
18
|
+
},
|
|
19
|
+
remove: (key: string) => {
|
|
20
|
+
localStorage.removeItem(`${getStoragePrefix()}${key}`);
|
|
21
|
+
},
|
|
22
|
+
clear: () => {
|
|
23
|
+
localStorage.clear();
|
|
24
|
+
},
|
|
25
|
+
getItem: (key: string) => {
|
|
26
|
+
return localStorage.getItem(`${getStoragePrefix()}${key}`);
|
|
27
|
+
},
|
|
28
|
+
setItem: (key: string, value: string) => {
|
|
29
|
+
localStorage.setItem(`${getStoragePrefix()}${key}`, value);
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
session: {
|
|
33
|
+
has: (key: string) => {
|
|
34
|
+
return Object.prototype.hasOwnProperty.call(sessionStorage, `${getStoragePrefix()}${key}`);
|
|
35
|
+
},
|
|
36
|
+
get: (key: string) => {
|
|
37
|
+
return sessionStorage.getItem(`${getStoragePrefix()}${key}`);
|
|
38
|
+
},
|
|
39
|
+
set: (key: string, value: string) => {
|
|
40
|
+
sessionStorage.setItem(`${getStoragePrefix()}${key}`, value);
|
|
41
|
+
},
|
|
42
|
+
remove: (key: string) => {
|
|
43
|
+
sessionStorage.removeItem(`${getStoragePrefix()}${key}`);
|
|
44
|
+
},
|
|
45
|
+
clear: () => {
|
|
46
|
+
sessionStorage.clear();
|
|
47
|
+
},
|
|
48
|
+
getItem: (key: string) => {
|
|
49
|
+
return sessionStorage.getItem(`${getStoragePrefix()}${key}`);
|
|
50
|
+
},
|
|
51
|
+
setItem: (key: string, value: string) => {
|
|
52
|
+
sessionStorage.setItem(`${getStoragePrefix()}${key}`, value);
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export default storage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type AsyncFlatten<T extends unknown[]> = T extends (infer U)[]
|
|
2
|
+
? Exclude<Awaited<U>, U[]>[]
|
|
3
|
+
: never;
|
|
4
|
+
|
|
5
|
+
export async function asyncFlatten<T extends unknown[]>(
|
|
6
|
+
arr: T,
|
|
7
|
+
): Promise<AsyncFlatten<T>> {
|
|
8
|
+
do {
|
|
9
|
+
arr = (await Promise.all(arr)).flat(Infinity) as any;
|
|
10
|
+
} while (arr.some((v: any) => v?.then));
|
|
11
|
+
return arr as unknown[] as AsyncFlatten<T>;
|
|
12
|
+
}
|