mirror of
https://gitee.com/dromara/go-view.git
synced 2024-11-30 02:38:30 +08:00
fix: 空间交互失效
This commit is contained in:
parent
0db6976e4a
commit
c2e733aaaa
@ -19,9 +19,9 @@ export const useChartInteract = (
|
||||
return item.interactOn === onEvent
|
||||
})
|
||||
|
||||
if (fnOnEvent.length === 0) return
|
||||
fnOnEvent.forEach(item => {
|
||||
const index = chartEditStore.fetchTargetIndex(item.interactComponents)
|
||||
if (index !== -1) return
|
||||
const { Params, Header } = toRefs(chartEditStore.componentList[index].request.requestParams)
|
||||
Object.keys(item.interactFn).forEach(key => {
|
||||
if (Params.value[key]) {
|
||||
|
@ -31,12 +31,12 @@ const option = shallowReactive({
|
||||
|
||||
const onChange = (v: number | number[]) => {
|
||||
if (v instanceof Array) {
|
||||
const data1 = dayjs(v[0]).format('YYYY-MM-DD')
|
||||
const data2 = dayjs(v[1]).format('YYYY-MM-DD')
|
||||
useChartInteract(props.chartConfig, useChartEditStore, { data1, data2 }, 'change')
|
||||
const dateStart = dayjs(v[0]).format('YYYY-MM-DD')
|
||||
const dateEnd = dayjs(v[1]).format('YYYY-MM-DD')
|
||||
useChartInteract(props.chartConfig, useChartEditStore, { dateStart, dateEnd }, 'change')
|
||||
} else {
|
||||
const data1 = dayjs(v).format('YYYY-MM-DD')
|
||||
useChartInteract(props.chartConfig, useChartEditStore, { data1 }, 'change')
|
||||
const date = dayjs(v).format('YYYY-MM-DD')
|
||||
useChartInteract(props.chartConfig, useChartEditStore, { date }, 'change')
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user