21 lines
740 B
TypeScript
21 lines
740 B
TypeScript
import { createApp } from 'vue'
|
|
import Antd from 'ant-design-vue';//add
|
|
import App from './App.vue'
|
|
import './style.css'
|
|
import 'ant-design-vue/dist/reset.css';
|
|
import {i18n,setupI18n } from './utils/i18n'
|
|
import { initTheme } from './utils/ThemeManager'//add
|
|
import router from './router/index'
|
|
import { GetLanguage } from '../bindings/cmbone/internal/services/appconfigservice'
|
|
|
|
initTheme()
|
|
async function bootstrap(){
|
|
await setupI18n('zh')//默认语言或从后端读取
|
|
createApp(App).use(Antd).use(router).use(i18n).mount('#app')
|
|
router.isReady().then(async () => {
|
|
const lang = await GetLanguage() //从后端读取语言设置 lang as any|| 'zh'
|
|
await setupI18n(lang as any|| 'zh')
|
|
})
|
|
}
|
|
bootstrap()
|