diff --git a/src/composables/config/tags.ts b/src/composables/config/tags.ts index eaad2b5..b3b95af 100644 --- a/src/composables/config/tags.ts +++ b/src/composables/config/tags.ts @@ -1,4 +1,4 @@ -import type { RouteLocationNormalized, Router } from 'vue-router' +import type { RouteLocationNormalized, Router } from 'vue-router/auto' import { TabActionEnum } from '~/constants' export function useTabs(_router?: Router) { @@ -8,7 +8,7 @@ export function useTabs(_router?: Router) { const { show } = unref(appStore.tabTar) if (!show) { throw new Error( - 'The multi-tab page is currently not open, please open it in the settings!', + 'The multi-tab page is currently not open, please open it in the settings!', ) } return !!show diff --git a/src/composables/page.ts b/src/composables/page.ts index 833469e..6a9cc6c 100644 --- a/src/composables/page.ts +++ b/src/composables/page.ts @@ -1,4 +1,4 @@ -import type { RouteLocationRaw, Router } from 'vue-router' +import type { RouteLocationRaw, Router } from 'vue-router/auto' import { PageEnum, REDIRECT_NAME } from '~/constants' export type PathAsPageEnum = T extends { path: string } ? T & { path: PageEnum } : T @@ -29,13 +29,18 @@ export function useRedo(_router?: Router) { return } if (name && Object.keys(params).length > 0) { + // @ts-expect-error tstype params._redirect_type = 'name' + // @ts-expect-error tstype params.path = String(name) } else { + // @ts-expect-error tstype params._redirect_type = 'path' + // @ts-expect-error tstype params.path = fullPath } + // @ts-expect-error tstype push({ name: REDIRECT_NAME, params, query }).then(() => resolve(true)) }) } diff --git a/src/composables/web/full-content.ts b/src/composables/web/full-content.ts index 3f6a596..963be59 100644 --- a/src/composables/web/full-content.ts +++ b/src/composables/web/full-content.ts @@ -1,4 +1,4 @@ -import { useRouter } from 'vue-router' +import { useRouter } from 'vue-router/auto' export function useFullContent() { const configStore = useAppConfigStore() diff --git a/src/layouts/nlayout/components/breadcrumb/index.vue b/src/layouts/nlayout/components/breadcrumb/index.vue index 2501bc7..7ebe0ae 100644 --- a/src/layouts/nlayout/components/breadcrumb/index.vue +++ b/src/layouts/nlayout/components/breadcrumb/index.vue @@ -1,5 +1,5 @@