commit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user