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

👑 [需求]pro-layout组件中,希望可以加入展开目录树的回调函数 #206

Closed
PluviaCon opened this issue Aug 14, 2020 · 4 comments
Labels

Comments

@PluviaCon
Copy link

🥰 需求描述

antdtree组件中,就有onExpandonSelect 方法来提供回调函数,而在pro-layout就没有相应的方法
具体来说,在pro-layout生成的树节点里,只能根据已有的route来生成,而不可以只点击树节点右侧的箭头展开来异步获取

🧐 解决方案

可以考虑antd tree组件的回调方式实现一下

🚑 其他信息

antdtree回调

@chenshuai2144
Copy link
Contributor

chenshuai2144 commented Aug 15, 2020

 handleOpenChange?: (openKeys: string[]) => void;
 openKeys?: WithFalse<string[]> | undefined;

有这个的。

@PluviaCon
Copy link
Author

 handleOpenChange?: (openKeys: string[]) => void;
 openKeys?: WithFalse<string[]> | undefined;

有这个的。

我只找到了menuProps里的onOpenChange方法,你说的那个能举个例子吗?

@PluviaCon
Copy link
Author

在源码里,他们是不是指向同一个方法?
选区_009

@chenshuai2144
Copy link
Contributor

是个别名,可以只在 layout 上配置

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

2 participants