refactor(图表): 插件逻辑重构

This commit is contained in:
wisonic 2024-07-12 17:11:20 +08:00
parent fc0daad7ce
commit 91e3115faa
4 changed files with 733 additions and 680 deletions

View File

@ -304,7 +304,7 @@ const boardMoveActive = computed(() => {
'symbolic-map',
'heat-map'
]
return CHARTS.includes(element.value.innerType)
return element.value.isPlugin || CHARTS.includes(element.value.innerType)
})
const dashboardActive = computed(() => {

View File

@ -94,7 +94,7 @@ const invokeMethod = param => {
if (pluginProxy.value['invokeMethod']) {
pluginProxy.value['invokeMethod'](param)
} else {
pluginProxy.value[param.methodName](param.args)
pluginProxy.value[param.methodName]?.(...param.args)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -242,7 +242,7 @@ watch([() => resultMode.value], () => {
watch([() => scale.value], () => {
nextTick(() => {
chartComponent?.value?.renderChart(view.value)
chartComponent?.value?.renderChart?.(view.value)
})
})