Skip to content

v-model绑定值类型异常 #71

@maoxuner

Description

@maoxuner

Before you start, please make sure to:

  • Read the doc
  • Have tried the latest version
  • Search to see if your issue already exists
  • Look for / ask questions on Stack Overflow
  • Reproduce the bug in incognito/private mode to avoid interference from browser extensions

Link to minimal reproduction

https://cloydlau.github.io/demo/json-editor-vue.html

Steps to reproduce

打开默认示例,不做其他任何操作

  1. 直接点击“Print binding value in the Console”,输出的值是对象类型
  2. 切换到text模式,编辑任意内容,再点击“Print binding value in the Console”,输出的值是字符类型
  3. 切换到tree模式,不做任何操作,“Print binding value in the Console”,输出的值是字符类型
  4. tree模式,编辑任意内容,再点击“Print binding value in the Console”,输出的值是对象类型

绑定值需要是对象类型,输出值也应该一直是对象类型才对

What is expected?

输入输出类型应该保持一致,要么同为字符串,要么同为对象

What is actually happening?

输入输出类型不一致

System Info

浏览器名字	Chrome
浏览器版本	116.0.0.0
系统平台	Linux
原始UA信息	Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Package Manager

npm

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions