问题
- 当你在中文输入法下输入然后回车后,发现表单提交了。
代码
<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>
结果
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/5240720e35da88e736a73b83005b2c30.png)
解决方法
代码更换
@keyup.enter.native ="submitForm('loginForm')"
||
||
||
||
||
||
\\||//
||
\\//
||
||
||
?
?
?
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
@keypress.enter.native ="submitForm('loginForm')"