Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v-model 双向绑定 无法清空数据 #56

Open
zhzhh7378 opened this issue Jun 11, 2022 · 0 comments
Open

v-model 双向绑定 无法清空数据 #56

zhzhh7378 opened this issue Jun 11, 2022 · 0 comments

Comments

@zhzhh7378
Copy link

  1. 如果数据不是JSON格式的话会触发error 如图:
    image
  2. 如果刚开始有默认值的话,挨个删除字符串直至把数据删除完。也会触发error。如图:
    image
    导致的结果:
    在v-model双向绑定的模式下,想要清空传入的变量的话只能赋值null,或者{}。
    期望改进:
    删除是空内容的话也能触发v-model 把变量赋值成{} 或者null。至少不能还保留默认数据。
    比如默认值 {"a":"b"} 如果挨着删除内容的话。变量是不会变的。造成视觉上以为删除成功了。

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant