add i18n basic structure

This commit is contained in:
shaohaojiecoder
2020-02-09 17:54:57 +08:00
parent e336b31902
commit 4e0dc1282f
4 changed files with 20 additions and 11 deletions

View File

@@ -3,7 +3,7 @@
<div class="content-box">
<a href="https://github.com/pycook/cmdb" target="_blank">
<span class="action">
源代码 -> <a-icon type="github" style="font-size: 20px; color: #002140"></a-icon>
{{ $t('tip.sourceCode') }} -> <a-icon type="github" style="font-size: 20px; color: #002140"></a-icon>
</span>
</a>
<!-- <a href="https://pro.loacg.com/docs/getting-started" target="_blank">
@@ -39,7 +39,7 @@
</a-menu-item>
</a-menu>
</a-dropdown>
<lang-select />
<lang-select v-if="showLocale" />
</div>
</div>
</template>
@@ -48,12 +48,18 @@
import NoticeIcon from '@/components/NoticeIcon'
import { mapActions, mapGetters } from 'vuex'
import LangSelect from '@/components/tools/LangSelect'
import { showLocale } from '@/locales'
export default {
name: 'UserMenu',
components: {
NoticeIcon, LangSelect
},
data () {
return {
showLocale: showLocale
}
},
methods: {
...mapActions(['Logout']),
...mapGetters(['nickname', 'avatar']),