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

有没有办法支持 通过parentId 构建的层次数据? #3

Closed
cuiliang opened this issue Sep 26, 2017 · 2 comments
Closed

有没有办法支持 通过parentId 构建的层次数据? #3

cuiliang opened this issue Sep 26, 2017 · 2 comments

Comments

@cuiliang
Copy link

控件写的很不错!
希望可以支持parentId方式,这样就能直接从数据库读出来加载到界面上了。

@1inus
Copy link
Owner

1inus commented Oct 26, 2017

您说的可能是onFold方法:
onFold? : (node?:any) => boolean;,execute before treenode collapse or uncollapse, returns false to

这个方法的作用是:节点被展开和关闭时调用,传入当前被展开的节点对象,如果返回值为false,则不展开或者不关闭。

您可以获得node对象的id然后去加载数据,数据加载完毕后为该节点动态生成children就可以了。

另外推荐一个同系列的弹窗插件:angular2-layer

希望能帮到你

@cuiliang
Copy link
Author

好的,谢谢~

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