fix form default submit behavior.
This commit is contained in:
parent
219e5c9251
commit
d22e36718b
1 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<form :class="classes"><slot></slot></form>
|
||||
<form :class="classes" @submit="formSubmit">
|
||||
<slot></slot>
|
||||
</form>
|
||||
</template>
|
||||
<script>
|
||||
// https://github.com/ElemeFE/element/blob/dev/packages/form/src/form.vue
|
||||
|
@ -75,6 +77,9 @@
|
|||
if (!field) { throw new Error('[iView warn]: must call validateField with valid prop string!'); }
|
||||
|
||||
field.validate('', cb);
|
||||
},
|
||||
formSubmit(event){
|
||||
event.preventDefault();
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
Loading…
Add table
Reference in a new issue