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

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

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

  1. <template>
  2. <div>
  3. <input
  4. v-model="val"
  5. v-bind:type=" visible ? 'text' : 'password' "
  6. style="width: 400px; height: 100px"
  7. />
  8. <div
  9. v-on:click="visible = !visible"
  10. class="button"
  11. >
  12. <text>Toggle to {{ visible ? 'password' : 'text' }}</text>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'PasswordField',
  19. data () {
  20. return {
  21. visible: true,
  22. val: 'Pazzword'
  23. };
  24. },
  25. };
  26. </script>
2w3kk1z5

2w3kk1z51#

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

相关问题