diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index e2201acb..5f70638f 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -5,7 +5,7 @@ import Jsx from "@vitejs/plugin-vue-jsx"; // https://vitepress.dev/reference/site-config export default defineConfig({ - // base:'/semi-design-vue/docs/.vitepress/dist/', + base:'/dist/', title: 'semi-design-vue', description: 'Vue3 UI components based on semi-design and Vue', srcDir: 'src', diff --git a/docs/.vitepress/theme/layout/Layout.vue b/docs/.vitepress/theme/layout/Layout.vue index 70bc98c9..1e75f26c 100644 --- a/docs/.vitepress/theme/layout/Layout.vue +++ b/docs/.vitepress/theme/layout/Layout.vue @@ -441,13 +441,12 @@ function gotoGithub() { window.open(theme.value.socialLinks[0].link); } +const {page, site, theme, isDark} = useData(); + function navSelect(v) { - // console.log(v); - router.go(v.itemKey); + router.go((import.meta.env.BASE_URL + v.itemKey).replace('//', '/')); } -const {page, site, theme, isDark} = useData(); - function setThemeMode() { const body = window.document.body;