🎈 perf(销售统计): 优化下拉菜单交互

This commit is contained in:
xuan
2022-10-20 16:53:50 +08:00
parent c5b74e3dd9
commit da5d41cfaa
9 changed files with 34 additions and 15 deletions
+3 -3
View File
@@ -74,7 +74,7 @@ $am-ms: 200ms;
border-radius: 20px 20px 0px 0px;
transform: translate3d(0, 100%, 0);
&-withShadow {
box-shadow: 0px -1px 9px -1px #333;
box-shadow: 0 -2px 11px -3px #333;
}
}
@@ -86,7 +86,7 @@ $am-ms: 200ms;
border-radius: 0 0 20px 20px;
transform: translate3d(0, -100%, 0);
&-withShadow {
box-shadow: 0 1px 9px -1px #333;
box-shadow: 0 2px 5px -3px #333;
}
}
@@ -98,7 +98,7 @@ $am-ms: 200ms;
border-radius: 20px 0 0 20px;
transform: translate3d(100%, 0, 0);
&-withShadow {
box-shadow: -1px 0px 9px -1px #333;
box-shadow: -2 0px 11px -3px #333;
}
}
}
+4 -1
View File
@@ -35,7 +35,7 @@ export default memo(
children,
position = 'bottom',
animationEnd,
customStyle,
customStyle = {},
safeAreaInsetBottom = true,
showOverLay = true,
overlayStyle,
@@ -45,6 +45,7 @@ export default memo(
if (show) {
animationTime.current = setTimeout(() => {
animationEnd?.()
customStyle.overflow = 'unset'
}, 260)
} else {
clearTimeout(animationTime.current)
@@ -60,10 +61,12 @@ export default memo(
return (
<View className={style.drawer_main}>
<View catchMove={true} className={classnames(style.drawer, show ? style.drawer_active : '')} style={customStyle}>
{/* 遮罩层 start */}
<View
className={classnames(style.drawer_mask, { [style.drawer_mask_active]: show, [style['drawer_mask--hidden']]: !showOverLay })}
onClick={onClose}
style={overlayStyle}></View>
{/* 遮罩层 end */}
<View
style={{ position: `${isFixed == true ? 'fixed' : 'absolute'}` }}
className={classnames(style.drawer_container, style['drawer_container_' + position], {