//火狐浏览器在未输入密码的情况下,密码输入框会把placeholder的内容显示为圆点,所以根据输入框有值与否动态绑定类no-autofill-pwd
<el-input v-model="password" type="text" clearable placeholder="请输入密码" :class="{'no-autofill-pwd': password}"></el-input>
<style lang="scss" scoped>
.no-autofill-pwd {
/deep/ .el-input__inner {
-webkit-text-security: disc !important;
}
}
</style>
感觉这个方案不存在浏览器兼容性问题。