● fix: 修复 Vite 8 前端编译及运行时错误

- main.js: 修复 createApp/mount 缺失导致 app 未定义
  - chineseMedicineDialog: defineModel → props+emit 兼容 Vue 3.5
  - el-form-nan-plugin: 修正 try/catch 括号匹配
  - vite.config: CSS 压缩器切换为 esbuild
This commit is contained in:
wangjian963
2026-06-03 13:09:04 +08:00
parent 207516ee86
commit 7ca0b89cb2
4 changed files with 21 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
import {createApp} from 'vue';
import {createApp, nextTick} from 'vue';
import VxeUIAll from 'vxe-table';
import 'vxe-table/lib/style.css';
@@ -104,6 +104,8 @@ console.error = (...args) => {
_origError.apply(console, args);
};
const app = createApp(App);
// 全局方法挂载
app.config.globalProperties.useDict = useDict;
app.config.globalProperties.download = download;
@@ -165,7 +167,8 @@ window.addEventListener("error", (e) => {
}, true);
// 应用启动后初始化公告弹窗功能
import { nextTick } from 'vue'
nextTick(() => {
initNoticePopupAfterLogin()
})
app.mount('#app')