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 b08e47106a..5058dd97cb 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -200,7 +200,17 @@ const start = ref({ const width = ref(0) const height = ref(0) const isShowArea = ref(false) -const svgFilterAttrs = ['width', 'height', 'top', 'left', 'rotate', 'backgroundColor'] +const svgFilterAttrs = [ + 'width', + 'height', + 'top', + 'left', + 'rotate', + 'backgroundColor', + 'borderWidth', + 'borderStyle', + 'borderColor' +] const commonFilterAttrs = ['width', 'height', 'top', 'left', 'rotate'] const commonFilterAttrsFilterBorder = [ 'width', @@ -1569,6 +1579,23 @@ defineExpose({ :dv-info="dvInfo" :canvas-active="canvasActive" /> + { const getComponentStyleDefault = style => { if (config.value.component.includes('Svg')) { - return getStyle(style, ['top', 'left', 'width', 'height', 'rotate', 'backgroundColor']) + return getStyle(style, [ + 'top', + 'left', + 'width', + 'height', + 'rotate', + 'backgroundColor', + 'borderWidth', + 'borderStyle', + 'borderColor' + ]) } else { return getStyle(style, style.borderActive ? commonFilterAttrs : commonFilterAttrsFilterBorder) } diff --git a/core/core-frontend/src/custom-component/common/CommonBorderSetting.vue b/core/core-frontend/src/custom-component/common/CommonBorderSetting.vue index 308c11994a..075b517fbb 100644 --- a/core/core-frontend/src/custom-component/common/CommonBorderSetting.vue +++ b/core/core-frontend/src/custom-component/common/CommonBorderSetting.vue @@ -8,7 +8,7 @@ import { COLOR_PANEL } from '@/views/chart/components/editor/util/chart' const dvMainStore = dvMainStoreWithOut() const snapshotStore = snapshotStoreWithOut() -const { canvasStyleData } = storeToRefs(dvMainStore) +const { canvasStyleData, curComponent } = storeToRefs(dvMainStore) const props = withDefaults( defineProps<{ @@ -63,6 +63,10 @@ const sizeChange = key => { changeStyle({ key: key, value: styleInfo.value[key] }) } +const isSvgComponent = computed( + () => curComponent.value && curComponent.value.component === 'SvgTriangle' +) + watch( () => styleInfo.value, () => { @@ -78,85 +82,126 @@ watch( +