增加切换语言的提示

Former-commit-id: a423a8fe82cc4ff64df9dd2212344511ea11c7f8 [formerly a423a8fe82cc4ff64df9dd2212344511ea11c7f8 [formerly a423a8fe82cc4ff64df9dd2212344511ea11c7f8 [formerly a423a8fe82cc4ff64df9dd2212344511ea11c7f8 [formerly 319022bfb134dadf880e2b88d28c51d786f49f3c [formerly 91c17e694478273a1821479aa6e87f076be6f093]]]]]
Former-commit-id: 61ceaa0a0a9cce136f6d5fdaf88b117ceee4142f
Former-commit-id: 3a9a01dd36aa7647ee078b720805bd020ab6916c
Former-commit-id: 30f1bca33407cec7ddd32fe4f8be78f8d8c5eede [formerly c464bae7e84f1fd259e7713223d3992f3e50b44d]
Former-commit-id: fdcc501d3e9c2fc5dababecbd71fb102c74291df
Former-commit-id: 25288c55c896077ebef0a0b7a128a88dceca3f59
Former-commit-id: be755159f7082cfa51ec616b8e5c9bb0f7c595e2
Former-commit-id: 323ed9517c64628190f44ab248fd55dd2dbf69e4
Former-commit-id: dc4740efa69f4852ce0f7df881a3ba010b34fff0
This commit is contained in:
FairyEver
2019-08-14 14:02:29 +08:00
parent 1f7c043dc5
commit d065b1245b

View File

@@ -2,7 +2,7 @@
<el-dropdown
placement="bottom"
size="small"
@command="command => $i18n.locale = command">
@command="onChangeLocale">
<el-button class="d2-mr btn-text can-hover" type="text">
<d2-icon name="language" style="font-size: 16px;"/>
</el-button>
@@ -17,3 +17,18 @@
</el-dropdown-menu>
</el-dropdown>
</template>
<script>
export default {
methods: {
onChangeLocale (command) {
this.$i18n.locale = command
this.$notify({
title: '提示',
dangerouslyUseHTMLString: true,
message: `当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]<br/>仅提供切换功能,没有具体的语言设置`
})
}
}
}
</script>