问题

  • 当你在中文输入法下输入然后回车后,发现表单提交了。

代码


<el-col :span="14">

<el-input type="text" v-model="loginForm.content" autocomplete="off" @keyup.enter.native ="submitForm('loginForm')" placeholder="图形验证码">

<template slot="prepend"><span class="fa fa-picture-o" style="width: 13px"></span></template>

</el-input>

</el-col>

结果

vue中@keyup.enter.native输入法的回车与消息发送快捷键回车的冲突解决

解决方法

代码更换


@keyup.enter.native ="submitForm('loginForm')"



							||
							||
							||
							||
							||
							||
						  \\||//
							||
						   \\//
							||
							||
							||
							????
							????
							????

    ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓



@keypress.enter.native ="submitForm('loginForm')"

相关文章:

  • 2022-12-23
  • 2021-05-11
  • 2022-12-23
  • 2021-04-20
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2022-01-09
  • 2021-11-09
相关资源
相似解决方案