vite-plugin-theme-preprocessor
vite-plugin-theme-preprocessor copied to clipboard
使用 Ant design Vue 的菜单组件时动画异常
如动态图所示,在菜单含有下拉菜单时,下拉列表中的菜单项和菜单项的背景动画不同步,具体表现为弹出时先有背景,然后菜单项才出现,而退出时相反,菜单项先消失,然后背景再消失,当把 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
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.
https://github.com/wdyyy/bug_reproduction
感谢提供demo复原问题,给你提issues的方式点赞。
这个问题不好调试,动画过渡时间太短,很难找到下拉动画期间添加了哪些calssName,需要去看antd源码找,需要延后些时间。目前工作很忙,望理解。