opt: 优化首页国际化实现,并优化前端项目
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<Doc class="right-menu-item hover-effect" />
|
||||
</el-tooltip>-->
|
||||
|
||||
<el-tooltip :content="$t('common.fz')" effect="dark" placement="bottom">
|
||||
<el-tooltip :content="$t('auto.common.fz')" effect="dark" placement="bottom">
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
<notice-icon class="right-menu-item" />
|
||||
@@ -31,17 +31,17 @@
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<span style="display:block;" @click="show = true">
|
||||
<el-dropdown-item>
|
||||
{{ $t('common.Layout_setting') }}
|
||||
{{ $t('auto.common.Layout_setting') }}
|
||||
</el-dropdown-item>
|
||||
</span>
|
||||
<router-link to="/user/center">
|
||||
<el-dropdown-item>
|
||||
{{ $t('common.Personal_center') }}
|
||||
{{ $t('auto.common.Personal_center') }}
|
||||
</el-dropdown-item>
|
||||
</router-link>
|
||||
<span style="display:block;" @click="open">
|
||||
<el-dropdown-item divided>
|
||||
{{ $t('common.Log_out') }}
|
||||
{{ $t('auto.common.Log_out') }}
|
||||
</el-dropdown-item>
|
||||
</span>
|
||||
</el-dropdown-menu>
|
||||
@@ -66,9 +66,7 @@ import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import TopNav from '@/components/TopNav'
|
||||
|
||||
import Doc from '@/components/Doc'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import Avatar from '@/assets/images/avatar.png'
|
||||
import NoticeIcon from '@/views/system/notice/NoticeIcon.vue'
|
||||
@@ -81,9 +79,7 @@ export default {
|
||||
Breadcrumb,
|
||||
Hamburger,
|
||||
Screenfull,
|
||||
SizeSelect,
|
||||
Search,
|
||||
Doc,
|
||||
TopNav
|
||||
},
|
||||
data() {
|
||||
@@ -93,10 +89,6 @@ export default {
|
||||
language: '简体中文'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setLang(localStorage.getItem('lang'))
|
||||
this.initWebSocket()
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
@@ -121,6 +113,10 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setLang(localStorage.getItem('lang'))
|
||||
this.initWebSocket()
|
||||
},
|
||||
methods: {
|
||||
// 中英文切换
|
||||
langChange(command) {
|
||||
@@ -142,9 +138,9 @@ export default {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
open() {
|
||||
this.$confirm(this.$t('common.Tip13'), this.$t('common.Tips'), {
|
||||
confirmButtonText: this.$t('common.Confirm'),
|
||||
cancelButtonText: this.$t('common.Cancel'),
|
||||
this.$confirm(this.$t('auto.common.Tip13'), this.$t('auto.common.Tips'), {
|
||||
confirmButtonText: this.$t('auto.common.Confirm'),
|
||||
cancelButtonText: this.$t('auto.common.Cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.logout()
|
||||
@@ -164,7 +160,7 @@ export default {
|
||||
},
|
||||
webSocketOnError(e) {
|
||||
this.$notify({
|
||||
title: this.$t('common.Tip14'),
|
||||
title: this.$t('auto.common.Tip14'),
|
||||
type: 'error',
|
||||
duration: 0
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user