mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-11 23:41:54 +08:00
Fixed Change Language Direction In Setting Page
This commit is contained in:
25
src/App.vue
25
src/App.vue
@@ -1,27 +1,12 @@
|
||||
<template>
|
||||
<router-view />
|
||||
<router-view />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { i18n, localeDirection } from "./i18n";
|
||||
|
||||
import { setPageLocale } from "./util-frontend";
|
||||
export default {
|
||||
created() {
|
||||
|
||||
this.setPageLocale();
|
||||
created() {
|
||||
setPageLocale();
|
||||
},
|
||||
methods: {
|
||||
setPageLocale() {
|
||||
const html = document.documentElement
|
||||
html.setAttribute('lang', this.$i18n.locale )
|
||||
html.setAttribute('dir', localeDirection() )
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"$i18n.locale"() {
|
||||
this.setPageLocale();
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user