mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
Change language for base layout.
This commit is contained in:
parent
1478bda974
commit
6f42852ca3
1 changed files with 19 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<a-config-provider :locale="zh_CN">
|
<a-config-provider :locale="lang">
|
||||||
<a-layout style="min-height: 100%;">
|
<a-layout style="min-height: 100%;">
|
||||||
<a-drawer
|
<a-drawer
|
||||||
v-show="clientWidth<512"
|
v-show="clientWidth<512"
|
||||||
|
@ -49,8 +49,9 @@ import SideBar from './SideBar'
|
||||||
import FooterLayout from './FooterLayout'
|
import FooterLayout from './FooterLayout'
|
||||||
import PageHeader from '@/components/PageHeader/PageHeader'
|
import PageHeader from '@/components/PageHeader/PageHeader'
|
||||||
import zh_CN from 'ant-design-vue/es/locale/zh_CN'
|
import zh_CN from 'ant-design-vue/es/locale/zh_CN'
|
||||||
|
import zh_TW from 'ant-design-vue/es/locale/zh_TW'
|
||||||
|
import en_US from 'ant-design-vue/es/locale/en_US'
|
||||||
|
|
||||||
// TODO: Change language for base layout.
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BaseLayout',
|
name: 'BaseLayout',
|
||||||
data() {
|
data() {
|
||||||
|
@ -72,7 +73,21 @@ export default {
|
||||||
HeaderLayout,
|
HeaderLayout,
|
||||||
FooterLayout
|
FooterLayout
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {},
|
||||||
|
computed: {
|
||||||
|
lang: {
|
||||||
|
get() {
|
||||||
|
switch (this.$language.current) {
|
||||||
|
case 'zh_CN':
|
||||||
|
return zh_CN
|
||||||
|
case 'zh_TW':
|
||||||
|
return zh_TW
|
||||||
|
default:
|
||||||
|
return en_US
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
@ -143,7 +158,7 @@ p {
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-card-bordered {
|
.ant-card-bordered {
|
||||||
border: unset;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-notice-wrapper .ant-tabs-content {
|
.header-notice-wrapper .ant-tabs-content {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue