fix form default submit behavior.

This commit is contained in:
marvinwilliam 2017-05-20 17:55:08 +08:00
parent 219e5c9251
commit d22e36718b

View file

@ -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: {
@ -93,4 +98,4 @@
});
}
};
</script>
</script>