fix(测试跟踪): 测试计划报告统计目录和左侧导航栏重叠

--bug=1018459 --user=陈建星 【测试跟踪】测试计划-报告统计-目录和左侧导航栏重叠 https://www.tapd.cn/55049933/s/1268757
This commit is contained in:
chenjianxing 2022-10-19 20:50:13 +08:00 committed by jianxing
parent 8a81279a7c
commit 9272e3307b
2 changed files with 17 additions and 11 deletions

View File

@ -162,6 +162,7 @@ export default {
}
localStorage.removeItem('app-fixed');
localStorage.setItem('app-fixed', this.isFixed);
this.$EventBus.$emit('appFixedChange', this.isFixed);
},
collapseOpen() {
this.isCollapse = false;

View File

@ -24,9 +24,7 @@
import MsDrawer from "metersphere-frontend/src/components/MsDrawer";
import {DEFAULT_LANGUAGE, EN_US, ZH_CN} from "metersphere-frontend/src/utils/constants";
import {getCurrentUser} from "metersphere-frontend/src/utils/token";
// import {useStore} from "@/store";
// const store = useStore();
export default {
name: "TestPlanReportNavigationBar",
components: {MsDrawer},
@ -96,11 +94,6 @@ export default {
uiEnable() {
this.setData();
},
// 'store.appFixed'(newVal){
// if (this.needMoveBar) {
// this.toggleMoveBarClass(newVal);
// }
// },
},
computed: {
navBtnClass() {
@ -119,10 +112,20 @@ export default {
},
},
mounted() {
let isFixed = localStorage.getItem('app-fixed') === 'true' || false;
if (this.$EventBus) {
//
this.$EventBus.$on("appFixedChange", this.toggleMoveBarClass);
}
this.setData();
// if (this.needMoveBar) {
// this.toggleMoveBarClass(store.appFixed);
// }
if (this.needMoveBar) {
this.toggleMoveBarClass(isFixed);
}
},
destroyed() {
if (this.$EventBus) {
this.$EventBus.$off("appFixedChange", this.toggleMoveBarClass);
}
},
methods: {
setData() {
@ -142,10 +145,12 @@ export default {
});
},
toggleMoveBarClass(val) {
if (this.needMoveBar) {
this.moveBarClass = val ? 'fixed-move-bar' : 'move-bar';
}
}
}
}
</script>
<style scoped>