This commit is contained in:
@jyuhsin
2025-08-27 13:57:46 +08:00
parent 1e9e14cc1f
commit 3171c30d43
90 changed files with 4905 additions and 1862 deletions
@@ -9,9 +9,17 @@ function autoEnhanceForm(formVm) {
if (formVm[MARK]) return
formVm[MARK] = true
const vnode = formVm.$vnode
if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs['no-auto-enhance'] !== undefined) {
return
const attrs = formVm.$attrs;
if (attrs && attrs['no-auto-enhance'] !== undefined) {
return; // 有 no-auto-enhance 属性,跳过增强
}
// 如果 $attrs 没有,也可以尝试从 $vnode 回退(兼容旧版)
if (!attrs) {
const vnode = formVm.$vnode;
if (vnode && vnode.data && vnode.data.attrs && vnode.data.attrs['no-auto-enhance'] !== undefined) {
return;
}
}
const originalValidate = formVm.validate