Explorar el Código

Bind enter event for login

lin-xin hace 9 años
padre
commit
c9c051278a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/components/page/Login.vue

+ 1 - 1
src/components/page/Login.vue

@@ -7,7 +7,7 @@
                     <el-input v-model="ruleForm.username"></el-input>
                 </el-form-item>
                 <el-form-item label="password" prop="password">
-                    <el-input type="password" v-model="ruleForm.password"></el-input>
+                    <el-input type="password" v-model="ruleForm.password" @keyup.enter.native="submitForm('ruleForm')"></el-input>
                 </el-form-item>
                 <div class="login-btn">
                     <el-button type="primary" @click="submitForm('ruleForm')">登录</el-button>