【问题标题】:autocomplete="new-password" displays sugestions from old passwords in v-text-fieldautocomplete="new-password" 在 v-text-field 中显示旧密码的建议
【发布时间】:2021-06-25 08:03:30
【问题描述】:

我有一个 v-text-field 我想在其中写入用户的密码以确认他的帐户,当我尝试制作 autocomplete="new-password" 时,它仍然会提示我已经保存的密码浏览器。我需要设置 autocomplete="new-password" 而不是 autocomplete="off" 因为 autocomplete="off" 会使用用户的密码自动填充文本字段。

我想要清除这些建议。 这是 v-text-field:

            <v-text-field clearable :rules="passwordRules" v-model="password" ref="password" 
            class="form-control" :type="value ? 'password' : 'text'" 
            :label="this.$i18n.t('enterPassword')" outlined dense autocomplete="new-password"
            @keydown.prevent.enter="verifyPassword" @keydown="handlePasswordRuleReset"
            @focus="handlePasswordRuleReset" @blur="handlePasswordRuleReset" @click:append="() 
            => (value = !value)"  :append-icon="value ? 'mdi-eye-off' : 'mdi-eye'">
            </v-text-field>

这就是我所拥有的:

【问题讨论】:

  • 如果输入字段类型为密码,请检查开发者工具,并检查此代码是否返回密码。 :type="value ? 'password' : 'text'"
  • 当我单击眼睛 btn 时,此代码仅返回真或假值。
  • 我有同样的问题,他们有什么解决方案吗?

标签: javascript vue.js vuetify.js


【解决方案1】:

我认为这个问题是由 v-text-field 引起的。我建议改用v-input

【讨论】:

  • ``` v-input ``` 在 ```
    ```
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-12-01
  • 2021-04-30
  • 1970-01-01
  • 2018-06-17
  • 2018-10-15
  • 1970-01-01
  • 2021-08-19
相关资源
最近更新 更多