element-ui 的使用技巧
element-ui 的使用技巧
1.密码自动填充问题
当el-input设置 type="password"时, 浏览器会自动填充已保存的代码到输入框中,对于登陆功能是没问题的,但是对于注册功能来说,这是我们所不期望的
解决方法:在注册页面多写一个输入密码的input,并且设置display = none
<el-input
v-model="loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleLogin"
style="display: none"
>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon"
/>
</el-input>
2.el-form内表单对齐问题
我们期望el-form的表单可以一行对齐, 并且label和input在同一行,这时候只