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

anyof 相同属性不更新值时,如果是一个对象,对象内部的属性存在差异导致值无法更新 #77

Closed
lljj-x opened this issue Jun 23, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@lljj-x
Copy link
Owner

lljj-x commented Jun 23, 2021

参见源码:https://github.com/lljj-x/vue-json-schema-form/blob/master/packages/lib/vue2/vue2-core/src/fields/combiningSchemas/SelectLinkageField/index.js#L146

目前只有属性没值,或者是const一定更新外,没考虑是一个复杂数据结构的场景

例如:

oldData = {
  objA: {
  a: 'fasdf'
  }
}

newData = {
  objA: {
  b: 'fasdf' // 没有深层数据对比导致,这里无法感知 b 属性的新增
  }
}

新版本之前,可以在anyOf 每个item都配置一个数据a b 来解决差异可能带来的问题

@lljj-x lljj-x added the bug Something isn't working label Jun 23, 2021
@lljj-x lljj-x closed this as completed Sep 21, 2021
lljj-x added a commit that referenced this issue Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant