vue 阻止表单默认的提交事件
form
<form autocomplete="off" @submit.prevent="onSubmit"> <input type="text" /> </form>
方法
methods: { onSubmit(){return false;} }
form
<form autocomplete="off" @submit.prevent="onSubmit"> <input type="text" /> </form>
方法
methods: { onSubmit(){return false;} }