5.27 运行修复

This commit is contained in:
2026-05-27 11:15:16 +08:00
parent 4d442ecc77
commit 0209577bcd
2 changed files with 9 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ import {
defineRule,
configure
} from 'vee-validate'
import all from '@vee-validate/rules'
import * as all from '@vee-validate/rules'
import allValid from '@/utils/validate'
import '@/assets/style/global.scss'
import '@/assets/style/icon.scss'
@@ -34,7 +34,9 @@ configure({
validateOnModelUpdate: true // controls if `update:modelValue` events should trigger validation with `handleChange` handler
})
Object.keys(all).forEach(rule => {
defineRule(rule, all[rule])
if (typeof all[rule] === 'function') {
defineRule(rule, all[rule])
}
})
Object.keys(allValid).forEach(rule => {
defineRule(rule, allValid[rule])

View File

@@ -79,5 +79,9 @@ module.exports = {
headers: {
'Access-Control-Allow-Origin': '*' // 解决跨域问题
}
}
},
transpileDependencies: [
'birpc',
'@vue/devtools-kit' // 如果仍然报错,把上游也加上
]
}