依赖升级:
- element-plus 2.2.28 -> 2.13.5
- vue 3.2.45 -> 3.5.30
- vue-router 4.0.11 -> 4.6.4
- axios 0.22 -> 1.13.6
- echarts 5.2.1 -> 5.6.0
- hls.js 1.3 -> 1.6.15
- typescript 4.5.5 -> 5.9.3
破坏性变更修复:
- axios 1.x: config.headers.token= 改为 config.headers.set()
- element-plus locale 路径: lib/ -> es/
- Article.vue: Node 改为具名导入 { Node }
- main.ts: 路由守卫参数补全显式类型声明
- SystemConfig.vue: 移除废弃的 clearValidate 包装函数
TypeScript 配置修复 (tsconfig.json):
- moduleResolution: node -> bundler (支持 exports 字段, 解决 vue-router .mts 类型文件)
- 新增 skipLibCheck: true (规避第三方库内部类型冲突)
- 新增 vuex paths 映射 (vuex exports 字段缺少 types 条件)
样式适配 (common.less):
- el-dialog 新增 padding: 0, 消除升级后产生的白边
- el-form--inline 内 el-select 补 min-width: 160px, 修复搜索栏下拉框过窄问题
清理:
- 删除 src/vuex.d.ts (已无用的 vuex store 类型扩充文件)
24 lines
588 B
JSON
24 lines
588 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "esnext",
|
|
"useDefineForClassFields": true,
|
|
"module": "esnext",
|
|
"moduleResolution": "bundler",
|
|
"strict": true,
|
|
"skipLibCheck": true,
|
|
"jsx": "preserve",
|
|
"sourceMap": true,
|
|
"resolveJsonModule": true,
|
|
"esModuleInterop": true,
|
|
"experimentalDecorators": true,
|
|
"lib": ["esnext", "dom"],
|
|
"allowJs": true,
|
|
"baseUrl": "./",
|
|
"paths": {
|
|
"@/*": ["src/*"],
|
|
"vuex": ["node_modules/vuex/types/index.d.ts"]
|
|
}
|
|
},
|
|
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
|
|
}
|