feat: 解决关闭编辑页面但是没有关闭左侧面板

This commit is contained in:
fit2cloud-chenyw 2021-04-22 13:46:59 +08:00
parent 12f2148030
commit 69f5a09cdc
3 changed files with 12 additions and 5 deletions

View File

@ -87,7 +87,10 @@ export default {
},
methods: {
closePanelEdit() {
bus.$emit('PanelSwitchComponent', { name: 'PanelMain' })
this.$emit('close-left-panel')
this.$nextTick(() => {
bus.$emit('PanelSwitchComponent', { name: 'PanelMain' })
})
},
goFile() {
this.$refs.files.click()

View File

@ -6,7 +6,7 @@
名称{{ panelInfo.name || '测试仪表板' }}
</span>
<!--横向工具栏-->
<Toolbar />
<Toolbar @close-left-panel="closeLeftPanel" />
</el-row>
</el-header>
<de-container>
@ -44,10 +44,10 @@
</div>
<div ref="leftPanel" :class="{show:show}" class="leftPanel-container">
<div />
<div v-show="show" class="leftPanel">
<div v-if="show" class="leftPanel">
<div class="leftPanel-items">
<view-select v-show=" showIndex===0" />
<view-select v-show="show && showIndex===0" />
<filter-group v-show="show && showIndex===1" />
</div>
</div>
@ -349,6 +349,10 @@ export default {
this.currentWidget = ApplicationContext.getService(serviceName)
this.currentFilterCom = this.curComponent
this.openFilterDiolog()
},
closeLeftPanel() {
this.show = false
this.beforeDestroy()
}
}
}

View File

@ -1,5 +1,5 @@
<template>
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]" style="background-color: #f7f8fa">
<de-container v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<de-main-container>
<component :is="component" :param="param" />
</de-main-container>