uni-app icon indicating copy to clipboard operation
uni-app copied to clipboard

APP和H5中input输入框设置type为password时再设置password属性则不能动态修改密码的显示与隐藏

Open Rich4st opened this issue 2 years ago • 0 comments

问题描述 input输入框设置type为password时再设置password属性不能动态修改密码的显示与隐藏,与文档所说的设置了password属性type属性就失效不符合

复现步骤 [复现问题的步骤]

<template>
  <view>
    <input v-model="foo" type="password" :password="showLoginPassword" />
    <button @click="showLoginPassword = !showLoginPassword">SHOW</button>
  </view>
</template>

<script>
export default {
  data() {
    return {
      foo: "",
      showLoginPassword: true,
    };
  },
};
</script>

Snipaste_2022-08-08_09-49-04

预期结果 点击button动态修改密码的显示与隐藏

实际结果 密码始终为隐藏状态,不能动态

系统信息:

  • 发行平台: [H5平台、App]
  • 操作系统 [Android 11.0]
  • HBuilderX版本 [3.5.4.20220805-alpha]
  • uni-app版本 [ v3.3.11]
  • 设备信息 [红米 K20 Pro Premium Edition]

补充信息 [可选] 只需要把type属性设置为非password或不设置就不会出现该问题,只是问题与文档所说的不符合。

Rich4st avatar Aug 08 '22 01:08 Rich4st