From fa2efef91ce58bf8070d839eaa0b0e92923d7522 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 16 Nov 2021 16:49:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BC=98=E5=8C=96=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/components/Editor/VideoLinks.vue | 15 +++++++- .../canvas/custom-component/DeVideo.vue | 35 +++++++------------ .../canvas/custom-component/component-list.js | 5 +++ 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/VideoLinks.vue b/frontend/src/components/canvas/components/Editor/VideoLinks.vue index 1be5b099ee..d0dc3de5e7 100644 --- a/frontend/src/components/canvas/components/Editor/VideoLinks.vue +++ b/frontend/src/components/canvas/components/Editor/VideoLinks.vue @@ -61,8 +61,18 @@ export default { ] } }, + watch: { + linkInfo: { + handler: function() { + this.init() + }, + deep: true + } + }, + created() { + this.init() + }, mounted() { - this.linkInfoTemp = deepCopy(this.linkInfo) }, computed: { ...mapState([ @@ -70,6 +80,9 @@ export default { ]) }, methods: { + init() { + this.linkInfoTemp = deepCopy(this.linkInfo) + }, onSubmit() { this.curComponent.videoLinks = this.linkInfoTemp this.$store.state.styleChangeTimes++ diff --git a/frontend/src/components/canvas/custom-component/DeVideo.vue b/frontend/src/components/canvas/custom-component/DeVideo.vue index 252fc79897..41cd8b33f2 100644 --- a/frontend/src/components/canvas/custom-component/DeVideo.vue +++ b/frontend/src/components/canvas/custom-component/DeVideo.vue @@ -1,7 +1,8 @@