'配置多语言,配置运行安卓模拟器'
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 = {
|
const messages = {
|
||||||
en,
|
en,
|
||||||
zh,
|
'zh-Hans': zh,
|
||||||
}
|
}
|
||||||
|
uni.setLocale('en')
|
||||||
let i18nConfig = {
|
let i18nConfig = {
|
||||||
locale: uni.getLocale(),// 获取已设置的语言
|
locale: uni.getLocale(),// 获取已设置的语言
|
||||||
messages
|
messages
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
const piniaIndex = index()
|
const piniaIndex = index()
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
uni.setLocale('en')
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -10,6 +10,9 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
base: './',
|
base: './',
|
||||||
define: {
|
define: {
|
||||||
|
__VUE_I18N_FULL_INSTALL__: true,
|
||||||
|
__VUE_I18N_LEGACY_API__: true,
|
||||||
|
__INTLIFY_PROD_DEVTOOLS__: false,
|
||||||
__APP_ENV__: env.APP_ENV,
|
__APP_ENV__: env.APP_ENV,
|
||||||
MY_APP_CONFIG: {
|
MY_APP_CONFIG: {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user