方式一:

<form  autocomplete="off" @submit.prevent="onSubmit">
   <input type="text" />
</form>
methods: {
      onSubmit(){return false;}
}

方式二(当使用UI框架时):

<Form  autocomplete="off" v-on:submit.native="onSubmit">
   <Input type="text" />
</Form>
methods: {
      onSubmit(e){
            e.preventDefault();
      }
}    

 

相关文章:

  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
相关资源
相似解决方案