As shown in the gif picture and video, when the menu contains a drop-down menu-item, animations for the menu item and the menu item are not synchronized. When the themePreprocessorPlugin and themePreprocessorHmrPlugin in vite.config.ts are commented, the animation come back normal. I also made a repository reproducing this problem to help you to locate this bug.
如动态图所示,在菜单含有下拉菜单时,下拉列表中的菜单项和菜单项的背景动画不同步,具体表现为弹出时先有背景,然后菜单项才出现,而退出时相反,菜单项先消失,然后背景再消失,当把 vite.config.ts中的
themePreprocessorPlugin
和themePreprocessorHmrPlugin
注释掉后,动画就恢复正常了。如果图片看不清的话,这里还有慢放的视频
https://user-images.githubusercontent.com/30600711/159701291-a65eeb84-0e1c-4198-a2ef-17c948ef6710.mp4
我还创建了一个复现这个bug的仓库,希望您抽空看一下,谢谢
https://github.com/wdyyy/bug_reproduction
As shown in the gif picture and video, when the menu contains a drop-down menu-item, animations for the menu item and the menu item are not synchronized. When the
themePreprocessorPlugin
andthemePreprocessorHmrPlugin
in vite.config.ts are commented, the animation come back normal. I also made a repository reproducing this problem to help you to locate this bug.https://github.com/wdyyy/bug_reproduction