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