refactor: i18n

This commit is contained in:
菲鸽
2024-01-29 18:53:57 +08:00
parent f242e5fd41
commit 7e2cda4886
3 changed files with 18 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
import { translate as t } from '@/locales/index'
/**
* test i18n in not .vue file
*/
export const testI18n = () => {
console.log(t('app.name'))
// 下面同样生效
// uni.showModal({
// title: 'i18n 测试',
// content: t('app.name'),
// })
}