mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
fix: Dropdown sub-menu missing motion (#39235)
* chore: fix dropdown motion miss * fix: dropdown missing motion & site check
This commit is contained in:
parent
3d9046d079
commit
fe60528e84
@ -30,20 +30,20 @@ export default function InfoNewVersion() {
|
||||
p.style.position = 'fixed';
|
||||
p.style.pointerEvents = 'none';
|
||||
p.style.visibility = 'hidden';
|
||||
p.style.opacity = '0';
|
||||
p.style.width = '0';
|
||||
document.body.appendChild(p);
|
||||
updateCSS(
|
||||
`
|
||||
:where(.${whereCls}) {
|
||||
opacity: 0.3 !important;
|
||||
width: 93px !important;
|
||||
}
|
||||
`,
|
||||
whereCls,
|
||||
);
|
||||
|
||||
// Check style
|
||||
const { opacity } = getComputedStyle(p);
|
||||
setSupportWhere(String(opacity) === '0.3');
|
||||
const { width } = getComputedStyle(p);
|
||||
setSupportWhere(String(width) === '93px');
|
||||
|
||||
return () => {
|
||||
document.body.removeChild(p);
|
||||
|
@ -2,6 +2,7 @@ import { getArrowOffset } from '../../style/placementArrow';
|
||||
import {
|
||||
initMoveMotion,
|
||||
initSlideMotion,
|
||||
initZoomMotion,
|
||||
slideDownIn,
|
||||
slideDownOut,
|
||||
slideUpIn,
|
||||
@ -418,6 +419,7 @@ const genBaseStyle: GenerateStyle<DropdownToken> = (token) => {
|
||||
initSlideMotion(token, 'slide-down'),
|
||||
initMoveMotion(token, 'move-up'),
|
||||
initMoveMotion(token, 'move-down'),
|
||||
initZoomMotion(token, 'zoom-big'),
|
||||
],
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user