[Android] [weex 0.30.2] Unable to change input type from password to text

atmip9wb  于 4个月前  发布在  Weex
关注(0)|答案(1)|浏览(59)

After upgrade from 0.28 it is impossible to change input field type back to text after changing from text to password : field remains password

<template>
    <div>
        <input
                v-model="val"
                v-bind:type=" visible ? 'text' : 'password' "
                style="width: 400px; height: 100px"
        />
        <div
                v-on:click="visible = !visible"
                class="button"
        >
            <text>Toggle to {{ visible ? 'password' : 'text' }}</text>
        </div>
    </div>
</template>

<script>
export default {
  name: 'PasswordField',
  data () {
    return {
      visible: true,
      val: 'Pazzword'
    };
  },
};
</script>
2w3kk1z5

2w3kk1z51#

改为v-bind:type=" visible ? '' : 'password' "即可

相关问题