diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue index ca518daa2c..a0bc770939 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -539,7 +539,8 @@ const getShapeItemShowStyle = item => { dvModel: dvInfo.value.type, cellWidth: cellWidth.value, cellHeight: cellHeight.value, - curGap: curGap.value + curGap: curGap.value, + showPosition: 'edit' }) } diff --git a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue index 6aa71fcec4..f96d6e05d6 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/ComponentWrapper.vue @@ -16,6 +16,20 @@ const componentEditBarRef = ref(null) const dvMainStore = dvMainStoreWithOut() const downLoading = ref(false) +const commonFilterAttrs = ['width', 'height', 'top', 'left', 'rotate'] +const commonFilterAttrsFilterBorder = [ + 'width', + 'height', + 'top', + 'left', + 'rotate', + 'borderActive', + 'borderWidth', + 'borderRadius', + 'borderStyle', + 'borderColor' +] + const props = defineProps({ active: { type: Boolean, @@ -144,7 +158,7 @@ const getComponentStyleDefault = style => { if (config.value.component.includes('Svg')) { return getStyle(style, ['top', 'left', 'width', 'height', 'rotate', 'backgroundColor']) } else { - return getStyle(style, ['top', 'left', 'width', 'height', 'rotate']) + return getStyle(style, style.borderActive ? commonFilterAttrs : commonFilterAttrsFilterBorder) } } diff --git a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue index 08460a51be..7e0e43281d 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/DePreview.vue @@ -192,14 +192,6 @@ const resetLayout = () => { //div容器获取tableBox.value.clientWidth let canvasWidth = previewCanvas.value.clientWidth let canvasHeight = previewCanvas.value.clientHeight - console.log( - '===canvasId=' + - canvasId.value + - ';canvasWidth =' + - canvasWidth + - ';canvasHeight =' + - canvasHeight - ) scaleWidthPoint.value = (canvasWidth * 100) / canvasStyleData.value.width scaleHeightPoint.value = (canvasHeight * 100) / canvasStyleData.value.height scaleMin.value = isDashboard() @@ -220,6 +212,7 @@ const resetLayout = () => { scaleMin.value, scaleMinHeight ) + scaleMin.value = isMainCanvas(canvasId.value) ? scaleMin.value : outerScale.value * 100 } renderReady.value = true emits('onResetLayout') diff --git a/core/core-frontend/src/components/visualization/common/DeFullscreen.vue b/core/core-frontend/src/components/visualization/common/DeFullscreen.vue index 5ae9de0c68..f197259c4b 100644 --- a/core/core-frontend/src/components/visualization/common/DeFullscreen.vue +++ b/core/core-frontend/src/components/visualization/common/DeFullscreen.vue @@ -21,7 +21,7 @@ const props = defineProps({ default: 'preview' } }) -const { themes, componentType } = toRefs(props) +const { themes } = toRefs(props) const fullscreenChange = () => { if (screenfull.isEnabled) { diff --git a/core/core-frontend/src/custom-component/common/CommonAttr.vue b/core/core-frontend/src/custom-component/common/CommonAttr.vue index 385ce77957..10187f4042 100644 --- a/core/core-frontend/src/custom-component/common/CommonAttr.vue +++ b/core/core-frontend/src/custom-component/common/CommonAttr.vue @@ -187,6 +187,7 @@ const stopEvent = e => { { } let myChart = null const renderG2Plot = async (chart, chartView: G2PlotChartView) => { - myChart?.destroy() - myChart = await chartView.drawChart({ - chartObj: myChart, - container: containerId, - chart: chart, - scale: 1, - action, - quadrantDefaultBaseline - }) - myChart?.render() - if (linkageActiveHistory.value) { - linkageActive() + try { + myChart?.destroy() + myChart = await chartView.drawChart({ + chartObj: myChart, + container: containerId, + chart: chart, + scale: 1, + action, + quadrantDefaultBaseline + }) + myChart?.render() + if (linkageActiveHistory.value) { + linkageActive() + } + } catch (e) { + console.error('renderG2Plot error', e) } }