Closed
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.0.0-alpha.5
Environment
Windows 10 Pro 19043.1288 | Microsoft Edge 95.0.1020.30 | Google Chrome 92.0.4515.107 | Vue 3.2.11 |
Reproduction link
https://github.com/beiifeng/vue3-report
Steps to reproduce
1、 download reproduction.
2、yarn
3、yarn serve
4、open link http://localhost:8080
5、input username
and password
with anything.
6、waiting seconds and menu will be load.
7、ISSUE: click left-top MenuFold icon, it tooks a long time to effect.
下载项目启动,进入网页,账号密码随便输入,登录后,进去正常页面。稍等片刻菜单加载出来,点击侧边栏的折叠展开按钮巨卡,反应很慢。
如果 将 src/layouts/data.js
中的菜单删除一半,响应速度就可以。
不是我故意要整这么多菜单,是项目上就有这么多菜单,我也不知道他们怎么制造出来的。从react转过来,vue2上面的性能没有试验过。看了一下pro-layout,感觉封装东西太多,反倒不适合我们,所以照着https://next.antdv.com/components/menu-cn
及 https://next.antdv.com/components/layout-cn
自己写的。
通过DevTool 调试,发现展开折叠时内存飙升。
请大佬指教 ^。^
What is expected?
点击菜单展开折叠时不那么卡顿
What is actually happening?
展开折叠时很卡