Skip to content

Commit 85596b4

Browse files
committed
fix: 默认值导致的BUG
1 parent 713f958 commit 85596b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/EleForm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,12 +599,12 @@ export default {
599599
)
600600
}
601601
602-
this.setValue(field, defaultValue)
602+
setDeepVal(this.formData, field, defaultValue)
603603
}
604604
605605
// 如果隐藏, 则删除值
606606
if (!vif) {
607-
this.setValue(field, defaultValue || null)
607+
setDeepVal(this.formData, field, defaultValue || null)
608608
}
609609
610610
// 5.动态属性 attrs

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ declare module 'vue-ele-form' {
3333
type?: string | LinkageFunction;
3434
label?: string;
3535
default?: any;
36-
attrs?: AnyObj;
36+
attrs?: AnyObj | LinkageFunction;
3737
title?: string;
3838
isShowLabel?: boolean;
3939
labelWidth?: string;

0 commit comments

Comments
 (0)