File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ export default function createForm(globalOptions = {}) {
42
42
data ( ) {
43
43
const formData = getDefaultFormState ( this . $props . schema , this . $props . value , this . $props . schema ) ;
44
44
45
- debugger ;
46
45
// 保持v-model双向数据及时性
47
46
this . emitFormDataChange ( formData , this . value ) ;
48
47
@@ -177,6 +176,11 @@ export default function createForm(globalOptions = {}) {
177
176
layoutColumn : ! inline ,
178
177
[ `layoutColumn-${ layoutColumn } ` ] : ! inline
179
178
} ,
179
+ nativeOn : {
180
+ submit ( e ) {
181
+ e . preventDefault ( ) ;
182
+ }
183
+ } ,
180
184
ref : 'genEditForm' ,
181
185
props : {
182
186
model : self . formData ,
Original file line number Diff line number Diff line change @@ -180,6 +180,10 @@ export default function createForm(globalOptions = {}) {
180
180
formData : rootFormData . value
181
181
} ) ;
182
182
} ,
183
+ // 阻止form默认submit
184
+ onSubmit ( e ) {
185
+ e . preventDefault ( ) ;
186
+ } ,
183
187
model : rootFormData ,
184
188
...schemaProps . formProps
185
189
} ,
You can’t perform that action at this time.
0 commit comments