'配置多语言,配置运行安卓模拟器'
This commit is contained in:
parent
4c8780569f
commit
ac4b921464
13
.hbuilderx/launch.json
Normal file
13
.hbuilderx/launch.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"openVueDevtools" : true,
|
||||
"type" : "uni-app:app-ios"
|
||||
},
|
||||
{
|
||||
"openVueDevtools" : true,
|
||||
"type" : "uni-app:app-android"
|
||||
}
|
||||
]
|
||||
}
|
@ -23,8 +23,9 @@ uni.$showTost = function (title='加载失败!',duration=1500,mask=false) {
|
||||
|
||||
const messages = {
|
||||
en,
|
||||
zh,
|
||||
'zh-Hans': zh,
|
||||
}
|
||||
uni.setLocale('en')
|
||||
let i18nConfig = {
|
||||
locale: uni.getLocale(),// 获取已设置的语言
|
||||
messages
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
const piniaIndex = index()
|
||||
onLoad(() => {
|
||||
|
||||
uni.setLocale('en')
|
||||
})
|
||||
</script>
|
||||
|
||||
|
@ -10,6 +10,9 @@ export default defineConfig(({ command, mode }) => {
|
||||
plugins: [uni()],
|
||||
base: './',
|
||||
define: {
|
||||
__VUE_I18N_FULL_INSTALL__: true,
|
||||
__VUE_I18N_LEGACY_API__: true,
|
||||
__INTLIFY_PROD_DEVTOOLS__: false,
|
||||
__APP_ENV__: env.APP_ENV,
|
||||
MY_APP_CONFIG: {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user