Commit 45c4131d authored by 卢均锐's avatar 卢均锐

chore: 修复dateselect不能从缓存中正常回现

parent cbd723a9
......@@ -12,13 +12,13 @@ export enum DATE_SELECT_TYPE {
}
const getPrevTime = (num, flag) => {
return moment().subtract(num, flag).valueOf()
return moment().startOf('day').subtract(num, flag).valueOf()
}
const DateSelect = (props) => {
const { value, mutators } = props
const todayStartTime = moment().startOf('day').format('x')
const nowTime = moment().format('x').valueOf()
const nowTime = moment().endOf('day').format('x')
const dateMemo = useMemo(() => [
{ label: '今天', value: `${todayStartTime},${nowTime}`},
{ label: '一周内', value: `${getPrevTime(1, 'week')},${nowTime}`},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment