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

请教下ant design的tree与dva的结合问题 #363

Closed
logyLiang opened this issue Dec 7, 2016 · 7 comments
Closed

请教下ant design的tree与dva的结合问题 #363

logyLiang opened this issue Dec 7, 2016 · 7 comments
Labels

Comments

@logyLiang
Copy link

antd异步加载的tree感觉是局部页面刷新,而不是整个组件刷新,也就是说是否不适用于dva脚手架的component、route、model三层?没思路了,按三层做蒙圈了

@sorrycc
Copy link
Member

sorrycc commented Dec 7, 2016

state 放 component state 还是 dva model 的区别,局部刷新是 react 做的,所以渲染上不会有差别。

@logyLiang
Copy link
Author

不是很理解。感觉后台程序猿一弄复杂的组件就萎了。有参考的链接么?

@sorrycc
Copy link
Member

sorrycc commented Dec 7, 2016

没有。建议参考 dva 的文档把概念理解清楚了,Tree 和其他组件并没啥区别。

@logyLiang
Copy link
Author

好吧

@sorrycc sorrycc closed this as completed Dec 7, 2016
@jindada
Copy link
Contributor

jindada commented May 15, 2017

我也遇到了同样的疑问 @logyLiang @sorrycc 怎么才能dispatch action之后在执行 resolve() 那

const onLoadData = (treeNode) => {
    return new Promise((resolve) => {
      dispatch({ type: 'demo/filter' });
      resolve();
    });
  }

<Tree loadData={onLoadData}>

@xufei
Copy link
Contributor

xufei commented May 15, 2017

@jindada #175

需要把resolve放在action上传进去……

@jindada
Copy link
Contributor

jindada commented May 15, 2017

嗯嗯 刚刚已经想到了 谢谢你

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants