refactor:项目升级Vue3+uView Plus

- 改造入口文件、全量替换组件引入
- 过滤器迁移混入,更新忽略配置,新增迁移文档
This commit is contained in:
lifenlong
2026-06-06 22:51:10 +08:00
parent d5663cfb4d
commit f4337fd030
269 changed files with 1956 additions and 42350 deletions

View File

@@ -0,0 +1,33 @@
const fs = require('fs')
const path = require('path')
const root = path.join(__dirname, '..')
function walk(dir, files = []) {
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
if (['node_modules', '.git', 'scripts'].includes(entry.name)) continue
const full = path.join(dir, entry.name)
if (entry.isDirectory()) walk(full, files)
else if (entry.name.endsWith('.vue')) files.push(full)
}
return files
}
function process(content) {
return content
.replace(/u-verification-code/g, 'u-code')
.replace(/<u-cell-item/g, '<u-cell')
.replace(/<\/u-cell-item>/g, '</u-cell>')
.replace(/:arrow="false"/g, ':isLink="false"')
}
walk(root).forEach((file) => {
const original = fs.readFileSync(file, 'utf8')
const updated = process(original)
if (updated !== original) {
fs.writeFileSync(file, updated)
console.log('updated', path.relative(root, file))
}
})
console.log('uview component aliases updated')