mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-19 00:41:03 +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.position = 'fixed';
|
||||||
p.style.pointerEvents = 'none';
|
p.style.pointerEvents = 'none';
|
||||||
p.style.visibility = 'hidden';
|
p.style.visibility = 'hidden';
|
||||||
p.style.opacity = '0';
|
p.style.width = '0';
|
||||||
document.body.appendChild(p);
|
document.body.appendChild(p);
|
||||||
updateCSS(
|
updateCSS(
|
||||||
`
|
`
|
||||||
:where(.${whereCls}) {
|
:where(.${whereCls}) {
|
||||||
opacity: 0.3 !important;
|
width: 93px !important;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
whereCls,
|
whereCls,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check style
|
// Check style
|
||||||
const { opacity } = getComputedStyle(p);
|
const { width } = getComputedStyle(p);
|
||||||
setSupportWhere(String(opacity) === '0.3');
|
setSupportWhere(String(width) === '93px');
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
document.body.removeChild(p);
|
document.body.removeChild(p);
|
||||||
|
@ -2,6 +2,7 @@ import { getArrowOffset } from '../../style/placementArrow';
|
|||||||
import {
|
import {
|
||||||
initMoveMotion,
|
initMoveMotion,
|
||||||
initSlideMotion,
|
initSlideMotion,
|
||||||
|
initZoomMotion,
|
||||||
slideDownIn,
|
slideDownIn,
|
||||||
slideDownOut,
|
slideDownOut,
|
||||||
slideUpIn,
|
slideUpIn,
|
||||||
@ -418,6 +419,7 @@ const genBaseStyle: GenerateStyle<DropdownToken> = (token) => {
|
|||||||
initSlideMotion(token, 'slide-down'),
|
initSlideMotion(token, 'slide-down'),
|
||||||
initMoveMotion(token, 'move-up'),
|
initMoveMotion(token, 'move-up'),
|
||||||
initMoveMotion(token, 'move-down'),
|
initMoveMotion(token, 'move-down'),
|
||||||
|
initZoomMotion(token, 'zoom-big'),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user