refactor: i18n
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
import { useUserStore } from '@/store'
|
||||
import { UserInfo } from '@/typings'
|
||||
import { translate as t } from '@/locales/index'
|
||||
|
||||
type Data<T> = {
|
||||
code: number
|
||||
@@ -9,11 +8,6 @@ type Data<T> = {
|
||||
result: T
|
||||
}
|
||||
|
||||
uni.showModal({
|
||||
title: '菲鸽',
|
||||
content: t('app.name'),
|
||||
})
|
||||
|
||||
// 请求基地址
|
||||
const baseURL = import.meta.env.VITE_SERVER_BASEURL
|
||||
// console.log(import.meta.env)
|
||||
|
||||
@@ -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'),
|
||||
// })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user