From aa3fd371feba65b19c1c92607b1d5fc1134277e5 Mon Sep 17 00:00:00 2001 From: yaoyun8 Date: Tue, 8 Oct 2024 01:56:36 -0700 Subject: [PATCH] fix: dynamic attr name --- packages/canvas/container/src/CanvasContainer.vue | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/canvas/container/src/CanvasContainer.vue b/packages/canvas/container/src/CanvasContainer.vue index b284963bd..c757c4278 100644 --- a/packages/canvas/container/src/CanvasContainer.vue +++ b/packages/canvas/container/src/CanvasContainer.vue @@ -13,17 +13,9 @@ @@ -83,6 +75,7 @@ export default { const loading = computed(() => useCanvas().isLoading()) let showSettingModel = ref(false) let target = ref(null) + const srcAttrName = computed(() => (props.canvasSrc ? 'src' : 'srcdoc')) const setCurrentNode = async (event) => { const { clientX, clientY } = event @@ -251,7 +244,8 @@ export default { target, showSettingModel, insertPosition, - loading + loading, + srcAttrName } } }