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

动态修改数据没有实时渲染 #37

Open
mosheng-L opened this issue Jul 18, 2019 · 3 comments
Open

动态修改数据没有实时渲染 #37

mosheng-L opened this issue Jul 18, 2019 · 3 comments

Comments

@mosheng-L
Copy link

mosheng-L commented Jul 18, 2019

动态改变级联菜单数据怎样才能实时刷新呢 我是在onchange方法里发起新的数据请求更新数据节点

@KuangPF
Copy link
Member

KuangPF commented Jul 18, 2019

抱歉,这个目前不支持,你可以一开始把所有级联的数据请求回来,然后渲染。

@mosheng-L
Copy link
Author

我在change事件中 实时修改了默认值 然后手动调用initPicker 想达到动态刷新的效果 可是在调试中发现initPicker方法中获取的默认值是我上一次操作记录的值 这是什么原因呢

@KuangPF
Copy link
Member

KuangPF commented Jul 19, 2019

不建议在 onChange 的回调函数中调用 initPicker ,在设计级联的时候没有考虑到要动态修改数据并实时渲染,如果你想要实现实时渲染的话,可以自己简单地分装个类似的业务组件,刚开始渲染的时候请求第一级的数据,然后监听第一级的变化,再动态渲染第二级,以此类推。

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