17 lines
498 B
Plaintext
17 lines
498 B
Plaintext
// 简化的main.uts,移除i18n依赖
|
||
import { createSSRApp } from 'vue'
|
||
import App from './App.uvue'
|
||
|
||
export function createApp() {
|
||
const app = createSSRApp(App)
|
||
|
||
// 注册 i18n 全局属性,使组件可以使用 $t 方法
|
||
app.config.globalProperties.$t = (key: string, values?: any, locale?: string): string => {
|
||
// 临时方案:移除对未定义 i18n 的引用,直接返回 Key
|
||
// 如果之后需要 i18n,应正确导入并初始化
|
||
return key
|
||
}
|
||
|
||
return { app }
|
||
}
|