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

菜单展开或者收缩响应速度问题 #2701

Closed
daihy8759 opened this issue Aug 13, 2016 · 17 comments
Closed

菜单展开或者收缩响应速度问题 #2701

daihy8759 opened this issue Aug 13, 2016 · 17 comments
Assignees

Comments

@daihy8759
Copy link

为何Menu组件的展开和收缩会那么慢,官网左侧菜单就是例子

@afc163
Copy link
Member

afc163 commented Aug 13, 2016

官网确实有点慢。Menu 的演示我看着应该还行?

@daihy8759
Copy link
Author

演示的还行,之前github看的一个项目的例子也是慢,响应都要4到5s的样子

@afc163
Copy link
Member

afc163 commented Aug 13, 2016

貌似和 react-router 配合的缘故。

@daihy8759
Copy link
Author

@afc163 额,好像的确都是用了 react-router

@jljsj33
Copy link
Member

jljsj33 commented Aug 14, 2016

官网的左侧导航展开和收缩是事件没触发,点了之后鼠标放着不动是永。。。移出了 lits 刷新 props 了才执行动画的。。不是响应慢的问题 。。。 我不是跟你说过了??@afc163

@benjycui
Copy link
Contributor

的确是要鼠标移开才开始执行动画。

@jljsj33 无法优化?

@jljsj33
Copy link
Member

jljsj33 commented Aug 15, 2016

这里的问题吧。。。shouldComponentUpdate

@wadeDra
Copy link

wadeDra commented Aug 15, 2016

我也碰到了打开缓慢的问题,不过我没有使用router,但是在里面添加了配置项openKeys,在部分电脑上打开比较缓慢。对了,也出现了点击后,鼠标移开才可以展开的问题。

@benjycui
Copy link
Contributor

benjycui commented Aug 15, 2016

rc-menu 的问题:受控模式下还是会响应用户操作,而且是在 onMouseLeave 时响应。

@jljsj33
Copy link
Member

jljsj33 commented Aug 15, 2016

不知道啥情况。。。看到这里是直接等于的。。。改成this.setState就没事了。。。。。https://github.com/react-component/menu/blob/master/src/Menu.jsx#L151

@benjycui
Copy link
Contributor

ref: #1600

@afc163
Copy link
Member

afc163 commented Aug 22, 2016

react-component/menu#48

@afc163
Copy link
Member

afc163 commented Aug 28, 2016

主站问题还是没法修复,老的 rc-menu 发个 fix 版本?

@benjycui
Copy link
Contributor

之前的版本不好修 react-component/menu#48

@benjycui
Copy link
Contributor

然后应该可以等 2.0 发布?毕竟不是功能性的 bug。。

@batouy
Copy link

batouy commented Nov 14, 2016

收藏一下

@lock
Copy link

lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants