✨ feat(销售统计): 时间选择器组件

This commit is contained in:
Haiyi
2022-09-30 10:00:08 +08:00
parent 82c87b75d9
commit b878c5ea9d
23 changed files with 526 additions and 51 deletions
+3 -5
View File
@@ -7,15 +7,13 @@ import dayjs from 'dayjs'
type DateArg = string | number | Date
interface Props {
showTime: boolean
closePopup?: () => void
end?: DateArg
start?: DateArg
onSelectDate?: (any) => void
}
export default memo((props: Props) => {
let { showTime = false, closePopup, start = '', end = '', onSelectDate } = props
let { start = '', end = '', onSelectDate } = props
const [time, setTime] = useState<any>({})
const handTime = (e) => {
@@ -33,7 +31,7 @@ export default memo((props: Props) => {
return (
<Popup title={'选择时间'} show={showTime} onClose={() => closePopup?.()}>
<>
<View className='time-box'>
<AtCalendar
isMultiSelect
@@ -48,6 +46,6 @@ export default memo((props: Props) => {
<View className='sure-box' onClick={() => onSelectDate?.(time)}>
确认
</View>
</Popup>
</>
)
})