Merge pull request #2183 from dataease/pr@dev@fix_tabs_scroll

fix: tabs选项卡过多右侧滚动被遮挡
This commit is contained in:
fit2cloud-chenyw 2022-04-26 11:09:54 +08:00 committed by GitHub
commit fd348d7d22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -6,10 +6,13 @@
type="card" type="card"
style-type="radioGroup" style-type="radioGroup"
class="de-tabs-height" class="de-tabs-height"
:class="isEdit ? 'de-tabs-edit' : ''"
:font-color="fontColor" :font-color="fontColor"
:active-color="activeColor" :active-color="activeColor"
:border-color="borderColor" :border-color="borderColor"
:border-active-color="borderActiveColor" :border-active-color="borderActiveColor"
:addable="isEdit"
@tab-add="addTab"
@tab-click="handleClick" @tab-click="handleClick"
> >
<!-- <plugin-com ref="dataease-tabs" v-model="activeTabName" type="card" class="de-tabs" component-name="dataease-tabs" @tab-click="handleClick"> --> <!-- <plugin-com ref="dataease-tabs" v-model="activeTabName" type="card" class="de-tabs" component-name="dataease-tabs" @tab-click="handleClick"> -->
@ -400,6 +403,9 @@ export default {
this.$store.dispatch('chart/setViewId', null) this.$store.dispatch('chart/setViewId', null)
this.styleChange() this.styleChange()
}, },
addTab() {
this.addNewTab(this.element.id)
},
addNewTab(componentId) { addNewTab(componentId) {
if (!componentId || componentId !== this.element.id) return if (!componentId || componentId !== this.element.id) return

View File

@ -143,7 +143,9 @@ div:focus {
height: 100vh !important; height: 100vh !important;
} }
} }
.de-tabs-edit {
padding-right: 50px !important;
}
.de-tabs { .de-tabs {
.el-tabs__header { .el-tabs__header {
margin: 0 0 0 0 !important; margin: 0 0 0 0 !important;