From d54d7161974bf18f24c94067c31d8eb32ca056ce Mon Sep 17 00:00:00 2001 From: zjwmiao <1723168479@qq.com> Date: Fri, 24 Jan 2025 19:32:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20header=E9=80=82=E9=85=8D=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/euler/components.d.ts | 4 ++++ packages/euler/src/router.ts | 7 ++++--- packages/gauss/components.d.ts | 2 ++ packages/gauss/src/router.ts | 7 ++++--- packages/gauss/vite.config.js | 2 +- packages/mindspore/src/router.ts | 7 ++++--- 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/packages/euler/components.d.ts b/packages/euler/components.d.ts index 2addf9e..6ffaf08 100644 --- a/packages/euler/components.d.ts +++ b/packages/euler/components.d.ts @@ -24,10 +24,14 @@ declare module 'vue' { ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElInput: typeof import('element-plus/es')['ElInput'] + ElOption: typeof import('element-plus/es')['ElOption'] + ElPagination: typeof import('element-plus/es')['ElPagination'] ElProgress: typeof import('element-plus/es')['ElProgress'] ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] + ElSelect: typeof import('element-plus/es')['ElSelect'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] diff --git a/packages/euler/src/router.ts b/packages/euler/src/router.ts index dbc434b..82ba9e3 100644 --- a/packages/euler/src/router.ts +++ b/packages/euler/src/router.ts @@ -366,14 +366,15 @@ router.beforeEach((to) => { // 首次进入判断移动端 const cancel = router.beforeEach((to) => { cancel(); + const isPhone = testIsPhone(); + const useCommon = useCommonStore(); + useCommon.setDevice(!isPhone); if ( to.path.endsWith('/overview') && !to.path.includes('/mobile') && - testIsPhone() + isPhone ) { - const useCommon = useCommonStore(); const path = useCommon.language === 'zh' ? '/zh/mobile' : '/en/mobile'; - useCommon.setDevice(false); return { path }; } }); diff --git a/packages/gauss/components.d.ts b/packages/gauss/components.d.ts index 597cdb4..2d7c9e6 100644 --- a/packages/gauss/components.d.ts +++ b/packages/gauss/components.d.ts @@ -19,7 +19,9 @@ declare module 'vue' { ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] + ElInput: typeof import('element-plus/es')['ElInput'] ElOption: typeof import('element-plus/es')['ElOption'] + ElPagination: typeof import('element-plus/es')['ElPagination'] ElProgress: typeof import('element-plus/es')['ElProgress'] ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] diff --git a/packages/gauss/src/router.ts b/packages/gauss/src/router.ts index 1ac145b..d1a99f9 100644 --- a/packages/gauss/src/router.ts +++ b/packages/gauss/src/router.ts @@ -220,14 +220,15 @@ router.beforeEach((to) => { // 首次进入判断移动端 const cancel = router.beforeEach((to) => { cancel(); + const isPhone = testIsPhone(); + const useCommon = useCommonStore(); + useCommon.setDevice(!isPhone); if ( to.path.endsWith('/overview') && !to.path.includes('/mobile') && - testIsPhone() + isPhone ) { - const useCommon = useCommonStore(); const path = useCommon.language === 'zh' ? '/zh/mobile' : '/en/mobile'; - useCommon.setDevice(false); return { path }; } }); diff --git a/packages/gauss/vite.config.js b/packages/gauss/vite.config.js index f6e917c..7cff627 100644 --- a/packages/gauss/vite.config.js +++ b/packages/gauss/vite.config.js @@ -44,7 +44,7 @@ export default defineConfig({ server: { proxy: { '/query': { - target: 'https://omapi.osinfra.cn/', + target: 'https://dsapi.osinfra.cn/', changeOrigin: true, }, '/ip-api/': { diff --git a/packages/mindspore/src/router.ts b/packages/mindspore/src/router.ts index d11be47..b28d5fb 100644 --- a/packages/mindspore/src/router.ts +++ b/packages/mindspore/src/router.ts @@ -85,14 +85,15 @@ export const router = createRouter({ // 首次进入判断移动端 const cancel = router.beforeEach((to) => { cancel(); + const isPhone = testIsPhone(); + const useCommon = useCommonStore(); + useCommon.setDevice(!isPhone); if ( to.path.endsWith('/overview') && !to.path.includes('/mobile') && - testIsPhone() + isPhone ) { - const useCommon = useCommonStore(); const path = useCommon.language === 'zh' ? '/zh/mobile' : '/en/mobile'; - useCommon.setDevice(false); return { path }; } }); -- Gitee