✨ feat(销售统计): 时间选择器组件
This commit is contained in:
@@ -15,6 +15,9 @@ $am-ms: 200ms;
|
||||
&_active {
|
||||
opacity: 1;
|
||||
}
|
||||
&--hidden {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.drawer_main {
|
||||
@@ -32,7 +35,7 @@ $am-ms: 200ms;
|
||||
z-index: 1000;
|
||||
visibility: hidden;
|
||||
transition: visibility $am-ms ease-in-out;
|
||||
|
||||
overflow: hidden;
|
||||
.drawer_container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -22,6 +22,7 @@ export interface Params extends PopupEvent {
|
||||
customStyle?: React.CSSProperties
|
||||
overlayStyle?: React.CSSProperties
|
||||
safeAreaInsetBottom?: boolean // 是否为iphoneX提供小黑条适配
|
||||
showOverLay?: boolean // 是否显示遮罩层
|
||||
}
|
||||
export default memo(
|
||||
({
|
||||
@@ -36,6 +37,7 @@ export default memo(
|
||||
animationEnd,
|
||||
customStyle,
|
||||
safeAreaInsetBottom = true,
|
||||
showOverLay = true,
|
||||
overlayStyle,
|
||||
}: Params) => {
|
||||
const animationTime = useRef<any>(null)
|
||||
@@ -60,9 +62,12 @@ export default memo(
|
||||
<>
|
||||
<View className={style.drawer_main}>
|
||||
<View catchMove={true} className={classnames(style.drawer, show ? style.drawer_active : '')} style={customStyle}>
|
||||
<View className={classnames(style.drawer_mask, { [style.drawer_mask_active]: show })} onClick={onClose} style={overlayStyle}></View>
|
||||
<View
|
||||
style={{ position: `${isFixed == true ? 'fixed' : 'absolute'}`, }}
|
||||
className={classnames(style.drawer_mask, { [style.drawer_mask_active]: show, [style['drawer_mask--hidden']]: !showOverLay })}
|
||||
onClick={onClose}
|
||||
style={overlayStyle}></View>
|
||||
<View
|
||||
style={{ position: `${isFixed == true ? 'fixed' : 'absolute'}` }}
|
||||
className={classnames(style.drawer_container, style['drawer_container_' + position], { [style.drawer_container_active]: show })}
|
||||
onClick={e => e.stopPropagation()}>
|
||||
{showTitle && <View className={style.drawer_container_title}>{title}</View>}
|
||||
|
||||
Reference in New Issue
Block a user