切换为英文

This commit is contained in:
2020-10-25 12:04:26 +08:00
parent 8dbc19250b
commit 7f2d980da6
6 changed files with 55 additions and 14 deletions

View File

@@ -3,7 +3,9 @@
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</div> -->
<router-view/>
<a-config-provider :locale="locale">
<router-view/>
</a-config-provider>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
@@ -12,6 +14,8 @@ import store from './store';
import { getValue } from './utils/common';
import { provideI18n } from "@/utils/i18n"
import i18ninit from "@/i18n/init"
import enUS from 'ant-design-vue/es/locale/en_US';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
export default defineComponent({
setup(){
@@ -22,6 +26,9 @@ export default defineComponent({
}else{
router.push("/")
}
return{
locale: zhCN
}
}
})
</script>