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

[bug] crud setValue失效 #11453

Open
ranwawa opened this issue Jan 6, 2025 · 2 comments · May be fixed by #11460
Open

[bug] crud setValue失效 #11453

ranwawa opened this issue Jan 6, 2025 · 2 comments · May be fixed by #11460
Labels
bug Something isn't working fix need confirm

Comments

@ranwawa
Copy link
Contributor

ranwawa commented Jan 6, 2025

描述问题:

crud中的bulkActions给crud本身设置值,但设置成功后值并未发生变化

接口返回的demo属性值为demo,点击headtoolbar中的按钮后设置demo的值为123,但是按钮上显示的文字并没有发生变化

但是通过crud外部的按钮进行setValue却能触发更新

截图或视频:

image

如何复现(请务必完整填写下面内容):

粘贴代码到文档即可复现

{"type":"page","body":[{"type":"button","label":"点我-${demo}","onEvent":{"click":{"actions":[{"actionType":"setValue","componentId":"deptTree","args":{"value":{"demo":"333"}}}]}}},{"type":"crud","id":"deptTree","api":{"method":"get","url":"https://mock.apifox.cn/m2/2205290-0-default/66104506","adaptor":"return {data: {demo: \'demo\', rows: []}}"},"columns":[{"name":"label","label":"名称"}],"headerToolbar":[{"type":"button","label":"点我-${demo}","onEvent":{"click":{"actions":[{"actionType":"setValue","componentId":"deptTree","args":{"value":{"demo":"1,2,3"}}}]}}}]}]}
  1. 问题分析
    排查发现store.IRenderer的updateData.demo值已经发生了变化,但是store.crud中的self.data.demo的值还是接口返回的值,并没有变化
    最终定位到是11月这个改动引起. fix: 修复 10126 引发的模型页面编辑器不可拖拽问题
    因为将id向下透传给table,导致事件触发时查找到的组件是table而非crud,最终调用了table的setData属性进行赋值。

是否有其它方法解决编辑器不可拖拽的问题?

Copy link

github-actions bot commented Jan 6, 2025

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@github-actions github-actions bot added bug Something isn't working fix labels Jan 6, 2025
Copy link

github-actions bot commented Jan 6, 2025

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix need confirm
Projects
None yet
1 participant