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

通过复制按钮得到的字段,修改其默认值JSONEditor未正常显示 #46

Closed
kevinchengchn opened this issue Aug 25, 2021 · 1 comment

Comments

@kevinchengchn
Copy link

image
image

重现步骤:

  1. field_1 设置默认值0.
  2. 复制field_1 得到 field_1_2 ,修改其默认值为1,右边JSONEditor依然显示0
  3. 通过+得到field_3,设置默认值为2,右边JSONEditor正常显示
@wibetter
Copy link
Owner

你好,JSONEditor中如果字段的数值不为空(undefined 或者 “”)则会优先使用json数据(mockData)中的数值,只有当json数据中的数值为空(undefined 或者 “”)才会使用schema中设置的默认值。

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

2 participants