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
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<div class="setting-drawer-content">
|
||||
<div class="setting-drawer-title">
|
||||
<h3 class="drawer-title">{{ $t('common.Theme_style_setting') }}</h3>
|
||||
<h3 class="drawer-title">{{ $t('auto.common.Theme_style_setting') }}</h3>
|
||||
</div>
|
||||
<div class="setting-drawer-block-checbox">
|
||||
<div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-dark')">
|
||||
@@ -51,44 +51,44 @@
|
||||
</div>
|
||||
|
||||
<div class="drawer-item">
|
||||
<span>{{ $t('common.Theme_color') }}</span>
|
||||
<span>{{ $t('auto.common.Theme_color') }}</span>
|
||||
<theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-divider />
|
||||
|
||||
<h3 class="drawer-title">{{ $t('common.System_layout_configuration') }}</h3>
|
||||
<h3 class="drawer-title">{{ $t('auto.common.System_layout_configuration') }}</h3>
|
||||
|
||||
<div class="drawer-item">
|
||||
<span>{{ $t('common.Open') }} TopNav</span>
|
||||
<span>{{ $t('auto.common.Open') }} TopNav</span>
|
||||
<el-switch v-model="topNav" class="drawer-switch" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-item">
|
||||
<span>{{ $t('common.Open') }} Tags-Views</span>
|
||||
<span>{{ $t('auto.common.Open') }} Tags-Views</span>
|
||||
<el-switch v-model="tagsView" class="drawer-switch" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-item">
|
||||
<span>{{ $t('common.Fixation') }} Header</span>
|
||||
<span>{{ $t('auto.common.Fixation') }} Header</span>
|
||||
<el-switch v-model="fixedHeader" class="drawer-switch" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-item">
|
||||
<span>{{ $t('common.Display') }} Logo</span>
|
||||
<span>{{ $t('auto.common.Display') }} Logo</span>
|
||||
<el-switch v-model="sidebarLogo" class="drawer-switch" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-item">
|
||||
<span>{{ $t('common.Dynamic_titles') }}</span>
|
||||
<span>{{ $t('auto.common.Dynamic_titles') }}</span>
|
||||
<el-switch v-model="dynamicTitle" class="drawer-switch" />
|
||||
</div>
|
||||
|
||||
<el-divider />
|
||||
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-document-add" @click="saveSetting">{{ $t('common.Save_settings') }}</el-button>
|
||||
<el-button size="mini" plain icon="el-icon-refresh" @click="resetSetting">{{ $t('common.Reset_settings') }}</el-button>
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-document-add" @click="saveSetting">{{ $t('auto.common.Save_settings') }}</el-button>
|
||||
<el-button size="mini" plain icon="el-icon-refresh" @click="resetSetting">{{ $t('auto.common.Reset_settings') }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -198,7 +198,9 @@ export default {
|
||||
resetSetting() {
|
||||
this.$modal.loading('正在清除设置缓存并刷新,请稍候...')
|
||||
this.$cache.local.remove('layout-setting')
|
||||
setTimeout('window.location.reload()', 1000)
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
</router-link>
|
||||
</scroll-pane>
|
||||
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
|
||||
<li @click="refreshSelectedTag(selectedTag)">{{ $t('common.Refresh') }}</li>
|
||||
<li v-if="!(selectedTag.meta&&selectedTag.meta.affix)" @click="closeSelectedTag(selectedTag)">{{ $t('common.Closes') }}</li>
|
||||
<li v-if="!isFirstView()" @click="closeLeftTags()">{{ $t('common.Closes_l') }}</li>
|
||||
<li v-if="!isLastView()" @click="closeRightTags">{{ $t('common.Closes_r') }}</li>
|
||||
<li @click="closeOthersTags">{{ $t('common.Closes_o') }}</li>
|
||||
<li @click="closeAllTags(selectedTag)">{{ $t('common.Closes_a') }}</li>
|
||||
<li @click="refreshSelectedTag(selectedTag)">{{ $t('auto.common.Refresh') }}</li>
|
||||
<li v-if="!(selectedTag.meta&&selectedTag.meta.affix)" @click="closeSelectedTag(selectedTag)">{{ $t('auto.common.Closes') }}</li>
|
||||
<li v-if="!isFirstView()" @click="closeLeftTags()">{{ $t('auto.common.Closes_l') }}</li>
|
||||
<li v-if="!isLastView()" @click="closeRightTags">{{ $t('auto.common.Closes_r') }}</li>
|
||||
<li @click="closeOthersTags">{{ $t('auto.common.Closes_o') }}</li>
|
||||
<li @click="closeAllTags(selectedTag)">{{ $t('auto.common.Closes_a') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user