mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
perf: 优化交互结构,优化时间选择器组件
This commit is contained in:
@@ -87,16 +87,14 @@ export const useChartDataFetch = (
|
||||
}
|
||||
}
|
||||
|
||||
// 立即调用
|
||||
fetchFn()
|
||||
|
||||
// 组件交互处理监听
|
||||
// 普通初始化与组件交互处理监听
|
||||
watch(
|
||||
() => targetComponent.request,
|
||||
() => {
|
||||
fetchFn()
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
@@ -9,14 +9,13 @@ type ChartEditStoreType = typeof useChartEditStore
|
||||
export const useChartInteract = (
|
||||
chartConfig: CreateComponentType,
|
||||
useChartEditStore: ChartEditStoreType,
|
||||
param: { [name: string]: string },
|
||||
onEvent: string
|
||||
param: { [T: string]: any },
|
||||
interactEventOn: string
|
||||
) => {
|
||||
const chartEditStore = useChartEditStore()
|
||||
const { interactEvents } = chartConfig.events
|
||||
|
||||
const fnOnEvent = interactEvents.filter(item => {
|
||||
return item.interactOn === onEvent
|
||||
return item.interactOn === interactEventOn
|
||||
})
|
||||
|
||||
if (fnOnEvent.length === 0) return
|
||||
@@ -34,3 +33,8 @@ export const useChartInteract = (
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 联动事件触发的 type 变更时,清除当前绑定内容
|
||||
export const clearInteractEvent = (chartConfig: CreateComponentType) => {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user