Code Monkey home page Code Monkey logo

Comments (4)

HughHzWu avatar HughHzWu commented on September 20, 2024

请使用级联dataSet来新增数据, 还不是用record.set

from choerodon-ui.

Xeonice avatar Xeonice commented on September 20, 2024

请使用级联dataSet来新增数据, 还不是用record.set

@HughHzWu 级联 DataSet 初始化时只读入了 current 绑定的数据,get 可以通过 getCascadeRecord,但是如何 set 其余 Record 下的数据?

from choerodon-ui.

HughHzWu avatar HughHzWu commented on September 20, 2024

请使用级联dataSet来新增数据, 还不是用record.set

@HughHzWu 级联 DataSet 初始化时只读入了 current 绑定的数据,get 可以通过 getCascadeRecord,但是如何 set 其余 Record 下的数据?

可以通过record.getCascadeRecords(childName)获得 级联的record数组,再定位到某条record进行set数据

from choerodon-ui.

HughHzWu avatar HughHzWu commented on September 20, 2024

image
image
image

如上图所示,点击新增列时会对 dataSet 下的所有数据中 childComponent 新增一个对象,但是操作结束时,console 中打印出的第一条 record 未经过修改
版本:0.8.41
如何复现:请参考下图 DataSet
image
PS:删除该 children 定义后即可恢复正常
初步推测:childrencurrent(默认第一条数据)绑定了 dataSet,导致第一条数据的修改只能从 children 指定的 dataSet 进行修改,而其他的数据则不受影响
期望结果:修改原始数据时,能够映射至 children 中的 DataSet

你这个数据结构是有问题的,组件之间应该用树状结构来维护,而不是用级联来维护。

from choerodon-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.