Merge pull request #4219 from dataease/pr@dev@fix_tab-switch

fix(仪表板): 修复从收藏tab切换至仪表板tab页面右侧没有内容显示
This commit is contained in:
王嘉豪 2022-12-28 12:30:09 +08:00 committed by GitHub
commit 92044889c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 35 deletions

View File

@ -635,6 +635,11 @@ export default {
}
},
methods: {
activeLastNode() {
this.$nextTick(() => {
document.querySelector('.is-current').firstChild.click()
})
},
toTop(data, node) {
panelToTop(data.id).then(() => {
this.defaultTree()

View File

@ -104,6 +104,9 @@ export default {
if (tab.name === 'panels_star') {
this.refreshEnshrine()
}
if (tab.name === 'PanelList') {
this.$refs.panelList.activeLastNode()
}
},
refreshShare() {
this.showShare = false
@ -154,20 +157,25 @@ export default {
min-width: 260px;
max-width: 460px;
}
.ms-main-container {
height: calc(100vh - 56px);
padding: 0px;
}
.tab-panel {
height: 100%;
overflow-y: auto;
}
.tab-panel ::v-deep .el-tabs__nav-wrap {
padding: 0 10px;
}
.tab-panel ::v-deep .el-tabs__nav-wrap::after {
height: 1px;
}
.tab-panel ::v-deep .el-tabs__item {
/* width: 10px; */
padding: 0 10px;