From 6543f06df726ae609ed1742ed21dc4f1d349edba Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 26 Apr 2022 11:07:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20tabs=E9=80=89=E9=A1=B9=E5=8D=A1=E8=BF=87?= =?UTF-8?q?=E5=A4=9A=E5=8F=B3=E4=BE=A7=E6=BB=9A=E5=8A=A8=E8=A2=AB=E9=81=AE?= =?UTF-8?q?=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/widget/DeWidget/DeTabs.vue | 6 ++++++ frontend/src/styles/index.scss | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index 79a443eded..a0cedc4081 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -6,10 +6,13 @@ type="card" style-type="radioGroup" class="de-tabs-height" + :class="isEdit ? 'de-tabs-edit' : ''" :font-color="fontColor" :active-color="activeColor" :border-color="borderColor" :border-active-color="borderActiveColor" + :addable="isEdit" + @tab-add="addTab" @tab-click="handleClick" > @@ -400,6 +403,9 @@ export default { this.$store.dispatch('chart/setViewId', null) this.styleChange() }, + addTab() { + this.addNewTab(this.element.id) + }, addNewTab(componentId) { if (!componentId || componentId !== this.element.id) return diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 3d7703f73c..ca8f3457e0 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -143,7 +143,9 @@ div:focus { height: 100vh !important; } } - +.de-tabs-edit { + padding-right: 50px !important; +} .de-tabs { .el-tabs__header { margin: 0 0 0 0 !important;