mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
18 lines
460 B
TypeScript
18 lines
460 B
TypeScript
// docs/.vitepress/theme/index.ts
|
|
import DefaultTheme from 'vitepress/theme'
|
|
import {inBrowser, useData} from "vitepress";
|
|
import {watchEffect} from "vue";
|
|
import './style.css';
|
|
|
|
export default {
|
|
...DefaultTheme,
|
|
setup() {
|
|
const { lang } = useData()
|
|
watchEffect(() => {
|
|
if (inBrowser) {
|
|
document.cookie = `nf_lang=${lang.value}; expires=Mon, 1 Jan 2024 00:00:00 UTC; path=/`
|
|
}
|
|
})
|
|
}
|
|
}
|