diff --git a/__tests__/e2e/.vitepress/config.ts b/__tests__/e2e/.vitepress/config.ts index 65f845ab364d..45b9b2d1480b 100644 --- a/__tests__/e2e/.vitepress/config.ts +++ b/__tests__/e2e/.vitepress/config.ts @@ -159,6 +159,14 @@ export default defineConfig({ lazyLoading: true } }, + locales: { + root: { label: 'English', repo: 'https://github.com/vuejs/vitepress' }, + zh: { + label: '简体中文', + link: 'https://vitepress.dev/zh/', + repo: 'https://github.com/vitejs/vite' + } + }, themeConfig: { nav, sidebar, diff --git a/src/client/theme-default/components/VPMenuLink.vue b/src/client/theme-default/components/VPMenuLink.vue index 52b4fac38ea0..4effdcbac8b6 100644 --- a/src/client/theme-default/components/VPMenuLink.vue +++ b/src/client/theme-default/components/VPMenuLink.vue @@ -8,6 +8,10 @@ defineProps<{ item: DefaultTheme.NavItemWithLink }>() +defineSlots<{ + default: () => void +}>() + const { page } = useData() diff --git a/src/client/theme-default/components/VPNavBarTranslations.vue b/src/client/theme-default/components/VPNavBarTranslations.vue index a92aad8c9a46..15e225f6dc75 100644 --- a/src/client/theme-default/components/VPNavBarTranslations.vue +++ b/src/client/theme-default/components/VPNavBarTranslations.vue @@ -3,9 +3,13 @@ import VPFlyout from './VPFlyout.vue' import VPMenuLink from './VPMenuLink.vue' import { useData } from '../composables/data' import { useLangs } from '../composables/langs' +import VPSocialLink from "./VPSocialLink.vue"; +// import { computed } from 'vue' const { theme } = useData() const { localeLinks, currentLang } = useLangs({ correspondingLink: true }) +// for helping translate +// const repoLink = computed(() => currentLang.value.repo || (localeLinks.value.length > 1 && localeLinks.value.some(l => !!l.repo)))