vue给表单添加enter回车事件
@keyup.enter.native="login()" @keyup监听键盘事件 .enter为vue定义的按键码的别名 .native覆盖原有的keyup事件 <el-input type="password" v-model="ruleForm.password" :placeholder="$t('loginLang.pass')" @keyup.enter.native="login()"> </el-input> 来源: CSDN 作者: LLL_LH 链接: https://blog.csdn.net/LLL_liuhui/article/details/103469096