From 8ba9cca3cab8d600242d1bf6656dfdc74322a357 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Tue, 19 Apr 2022 14:05:50 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20tab=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=E9=80=89=E6=8B=A9=E5=85=B6=E4=BB=96=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../canvas/components/Editor/FrameLinks.vue | 15 +-
.../components/Editor/StreamMediaLinks.vue | 15 +-
.../canvas/components/Editor/VideoLinks.vue | 17 +-
.../components/canvas/components/TextAttr.vue | 25 +-
.../canvas/custom-component/component-list.js | 27 ++
.../src/components/widget/DeWidget/DeTabs.vue | 139 ++++++++--
frontend/src/lang/en.js | 4 +-
frontend/src/lang/tw.js | 4 +-
frontend/src/lang/zh.js | 4 +-
frontend/src/store/index.js | 8 +-
.../panel/AssistComponent/tabUseList.vue | 245 ++++++++++++++++++
frontend/src/views/panel/list/PanelList.vue | 1 -
12 files changed, 466 insertions(+), 38 deletions(-)
create mode 100644 frontend/src/views/panel/AssistComponent/tabUseList.vue
diff --git a/frontend/src/components/canvas/components/Editor/FrameLinks.vue b/frontend/src/components/canvas/components/Editor/FrameLinks.vue
index c0e3b21497..390fbc773e 100644
--- a/frontend/src/components/canvas/components/Editor/FrameLinks.vue
+++ b/frontend/src/components/canvas/components/Editor/FrameLinks.vue
@@ -35,6 +35,12 @@ export default {
linkInfo: {
type: Object,
required: true
+ },
+ // 属性所属组件位置
+ attrPosition: {
+ type: String,
+ required: false,
+ default: 'panel'
}
},
data() {
@@ -63,7 +69,8 @@ export default {
},
computed: {
...mapState([
- 'curComponent'
+ 'curComponent',
+ 'curActiveTabInner'
])
},
methods: {
@@ -72,7 +79,11 @@ export default {
},
onSubmit() {
this.linkInfoTemp.src = checkAddHttp(this.linkInfoTemp.src)
- this.curComponent.frameLinks = this.linkInfoTemp
+ if (this.attrPosition === 'panel') {
+ this.curComponent.frameLinks = this.linkInfoTemp
+ } else {
+ this.curActiveTabInner.frameLinks = this.linkInfoTemp
+ }
this.$store.state.styleChangeTimes++
bus.$emit('frameLinksChange-' + this.curComponent.id)
this.popoverClose()
diff --git a/frontend/src/components/canvas/components/Editor/StreamMediaLinks.vue b/frontend/src/components/canvas/components/Editor/StreamMediaLinks.vue
index e2f433cc37..02e782cf2f 100644
--- a/frontend/src/components/canvas/components/Editor/StreamMediaLinks.vue
+++ b/frontend/src/components/canvas/components/Editor/StreamMediaLinks.vue
@@ -58,6 +58,12 @@ export default {
linkInfo: {
type: Object,
required: true
+ },
+ // 属性所属组件位置
+ attrPosition: {
+ type: String,
+ required: false,
+ default: 'panel'
}
},
data() {
@@ -86,7 +92,8 @@ export default {
},
computed: {
...mapState([
- 'curComponent'
+ 'curComponent',
+ 'curActiveTabInner'
])
},
methods: {
@@ -95,7 +102,11 @@ export default {
},
onSubmit() {
this.streamMediaInfoTemp[this.streamMediaInfoTemp.videoType].url = checkAddHttp(this.streamMediaInfoTemp[this.streamMediaInfoTemp.videoType].url)
- this.curComponent.streamMediaLinks = this.streamMediaInfoTemp
+ if (this.attrPosition === 'panel') {
+ this.curComponent.streamMediaLinks = this.streamMediaInfoTemp
+ } else {
+ this.curActiveTabInner.streamMediaLinks = this.streamMediaInfoTemp
+ }
this.$store.state.styleChangeTimes++
bus.$emit('streamMediaLinksChange-' + this.curComponent.id)
this.popoverClose()
diff --git a/frontend/src/components/canvas/components/Editor/VideoLinks.vue b/frontend/src/components/canvas/components/Editor/VideoLinks.vue
index c839335f03..7620a293e6 100644
--- a/frontend/src/components/canvas/components/Editor/VideoLinks.vue
+++ b/frontend/src/components/canvas/components/Editor/VideoLinks.vue
@@ -43,13 +43,19 @@
import { mapState } from 'vuex'
import { deepCopy } from '@/components/canvas/utils/utils'
import { checkAddHttp } from '@/utils/urlUtils'
-import bus from "@/utils/bus";
+import bus from '@/utils/bus'
export default {
props: {
linkInfo: {
type: Object,
required: true
+ },
+ // 属性所属组件位置
+ attrPosition: {
+ type: String,
+ required: false,
+ default: 'panel'
}
},
data() {
@@ -78,7 +84,8 @@ export default {
},
computed: {
...mapState([
- 'curComponent'
+ 'curComponent',
+ 'curActiveTabInner'
])
},
methods: {
@@ -87,6 +94,12 @@ export default {
},
onSubmit() {
this.linkInfoTemp[this.linkInfoTemp.videoType].sources[0].src = checkAddHttp(this.linkInfoTemp[this.linkInfoTemp.videoType].sources[0].src)
+
+ if (this.attrPosition === 'panel') {
+ this.curComponent.videoLinks = this.linkInfoTemp
+ } else {
+ this.curActiveTabInner.videoLinks = this.linkInfoTemp
+ }
this.curComponent.videoLinks = this.linkInfoTemp
this.$store.state.styleChangeTimes++
bus.$emit('videoLinksChange-' + this.curComponent.id)
diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue
index 8b3c8d8278..e482550d12 100644
--- a/frontend/src/components/canvas/components/TextAttr.vue
+++ b/frontend/src/components/canvas/components/TextAttr.vue
@@ -156,6 +156,24 @@