mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 08:12:49 +08:00
!157 fix:修复[时间选择器无法获取实际所选时间范围]Bug并且设置默认值
Merge pull request !157 from dingxs/dev-fix
This commit is contained in:
commit
8f82c1fa59
@ -39,9 +39,9 @@ const onChange = (v: number | number[]) => {
|
|||||||
props.chartConfig,
|
props.chartConfig,
|
||||||
useChartEditStore,
|
useChartEditStore,
|
||||||
{
|
{
|
||||||
[ComponentInteractParamsEnum.DATE_START]: v[0] | dayjs().valueOf(),
|
[ComponentInteractParamsEnum.DATE_START]: v[0] || dayjs().valueOf(),
|
||||||
[ComponentInteractParamsEnum.DATE_END]: v[1] | dayjs().valueOf(),
|
[ComponentInteractParamsEnum.DATE_END]: v[1] || dayjs().valueOf(),
|
||||||
[ComponentInteractParamsEnum.DATE_RANGE]: `${v[0]}-${v[1]}`
|
[ComponentInteractParamsEnum.DATE_RANGE]: `${v[0] || dayjs().valueOf()}-${v[1] || dayjs().valueOf()}`
|
||||||
},
|
},
|
||||||
InteractEventOn.CHANGE
|
InteractEventOn.CHANGE
|
||||||
)
|
)
|
||||||
@ -50,7 +50,7 @@ const onChange = (v: number | number[]) => {
|
|||||||
useChartInteract(
|
useChartInteract(
|
||||||
props.chartConfig,
|
props.chartConfig,
|
||||||
useChartEditStore,
|
useChartEditStore,
|
||||||
{ [ComponentInteractParamsEnum.DATE]: v },
|
{ [ComponentInteractParamsEnum.DATE]: v || dayjs().valueOf() },
|
||||||
InteractEventOn.CHANGE
|
InteractEventOn.CHANGE
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user