chrome设置【auto-complete=off】属性无效的解决办法

针对chrome设置【auto-complete=off】属性无效问题进行了搜索,解决办法基于以下搜索记录(因搜索结果的方法实测在【搜索1:无输入内容时获取焦点依然会有密码提示框问题,搜索2也是该问题】,但是给我提供了思路,故记录一下此坑

 
  
inputType: "text"

'form.password': {
        immediate: true,
        handler(val) {
          this.inputChange(val);
        }
   }
inputChange(val) {
        if (!val) {
          this.inputType = "text";
        } else {
          this.inputType = "password";
        }
        // console.log('val', val, this.inputType);
        this.$nextTick(() => {
          if (this.$refs[this.inputType]) {
            this.$refs[this.inputType].$refs.input.focus();
          }
        });
      }

搜索结果如下:chrome设置【auto-complete=off】属性无效的解决办法_第1张图片
结果1:https://blog.csdn.net/ta_huang/article/details/126852363
结果2:https://www.cnblogs.com/linjiangxian/p/15817796.html

你可能感兴趣的:(vue开发,js,element-ui,前端,javascript,elementui)