diff --git a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue index d39590b522..795cdd1e5e 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/Shape.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/Shape.vue @@ -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(() => { diff --git a/core/core-frontend/src/components/plugin/src/PluginComponent.vue b/core/core-frontend/src/components/plugin/src/PluginComponent.vue index 72433e52d3..b0e2fc2894 100644 --- a/core/core-frontend/src/components/plugin/src/PluginComponent.vue +++ b/core/core-frontend/src/components/plugin/src/PluginComponent.vue @@ -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) } } diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 37786e0e67..22daf42a6a 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -354,7 +354,7 @@ const realQuota = computed(() => { }) provide('quotaData', realQuota) -const startToMove = (e, item) => { +const startToMove = (e: DragEvent, item) => { e.dataTransfer.setData( 'dimension', JSON.stringify( @@ -1533,6 +1533,14 @@ const singleDragStart = (e: DragEvent, ele, type) => { if (!activeChild.value.length) { activeChild.value = [ele] } + e.dataTransfer.setData( + 'quota', + JSON.stringify( + activeQuota.value + .filter(ele => ele.id) + .map(ele => ({ ...cloneDeep(unref(ele)), datasetId: view.value.tableId })) + ) + ) } const dragEnd = () => { @@ -1594,16 +1602,6 @@ const deleteChartFieldItem = id => { fieldLoading.value = false }) } - -const callMethod = (method, ...args) => { - editorInstance?.setupState[method](...args) -} - -let editorInstance = null -onMounted(() => { - editorInstance = getCurrentInstance() - console.log(editorInstance) -})