opt: 优化首页国际化实现,并优化前端项目

This commit is contained in:
yanps
2023-12-14 14:58:26 +08:00
parent d5f9fc472b
commit 870f926fc6
43 changed files with 698 additions and 686 deletions

View File

@@ -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)
}
}
}