element-plus/docs/.vitepress/vitepress/composables/navbar-locale.ts
qiang a4063fd8d2
docs: accessibility improvement (#11825)
* docs: accessibility improvement for navbar

* docs: accessibility improvement for demo

* refactor: replace ElPopover with ElDropdown

* docs: accessibility improvement for nav-full

* docs: accessibility improvement for back-to-top

* feat: add skip link that jump to the content
2023-03-10 14:43:22 +08:00

10 lines
263 B
TypeScript

import { computed } from 'vue'
import navbarLocale from '../../i18n/component/navbar.json'
import { useLang } from './lang'
export function useNavbarLocale() {
const lang = useLang()
return computed<Record<string, string>>(() => navbarLocale[lang.value])
}