问题
- 当你在中文输入法下输入然后回车后,发现表单提交了。
代码
<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>
结果

解决方法
代码更换
@keyup.enter.native ="submitForm('loginForm')"
||
||
||
||
||
||
\\||//
||
\\//
||
||
||
????
????
????
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
@keypress.enter.native ="submitForm('loginForm')"