diff --git a/packages/devui-vue/docs/.vitepress/devui-theme/components/NavBar.vue b/packages/devui-vue/docs/.vitepress/devui-theme/components/NavBar.vue index 7bf7af5888231d0c5e673666dc7074df1cc48b08..0655d4b25a11d9d2d8cd41403d801c68b625446c 100644 --- a/packages/devui-vue/docs/.vitepress/devui-theme/components/NavBar.vue +++ b/packages/devui-vue/docs/.vitepress/devui-theme/components/NavBar.vue @@ -14,12 +14,12 @@ const theme = new Theme('light') const darkMode = ref(false) const defaultLanguage = ref(localStorage.getItem('preferred_lang')) -function useTranslation (target){ +function useTranslation(target) { defaultLanguage.value = target localStorage.setItem('preferred_lang', target) - if (target === 'en-US'){ + if (target === 'en-US') { location.pathname = `/en-US${location.pathname}` - }else if (target === 'zh-CN'){ + } else if (target === 'zh-CN') { location.pathname = `${location.pathname.split('/en-US')[1]}` } } @@ -48,7 +48,11 @@ defineEmits(['toggle'])
-
+
@@ -56,8 +60,13 @@ defineEmits(['toggle'])
- - star + + star
@@ -74,7 +83,7 @@ defineEmits(['toggle']) top: 0; right: 0; left: 0; - z-index: var(--z-index-navbar); + z-index: 20; display: flex; justify-content: space-between; align-items: center; @@ -108,7 +117,8 @@ defineEmits(['toggle']) } .custom-nav-item:hover { - svg, path { + svg, + path { fill: $devui-brand; } }