修复进入通道页面时导航显示异常
parent
04f3511fb3
commit
a0b5468189
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="UiHeader">
|
<div id="UiHeader">
|
||||||
<el-menu router :default-active="this.$route.path" menu-trigger="click" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" mode="horizontal">
|
<el-menu router :default-active="activeIndex" menu-trigger="click" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" mode="horizontal">
|
||||||
<el-menu-item index="/">控制台</el-menu-item>
|
<el-menu-item index="/">控制台</el-menu-item>
|
||||||
<el-menu-item index="/deviceList">设备列表</el-menu-item>
|
<el-menu-item index="/deviceList">设备列表</el-menu-item>
|
||||||
<el-menu-item index="/pushVideoList">推流列表</el-menu-item>
|
<el-menu-item index="/pushVideoList">推流列表</el-menu-item>
|
||||||
|
@ -29,6 +29,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
alarmNotify: true,
|
alarmNotify: true,
|
||||||
sseSource: null,
|
sseSource: null,
|
||||||
|
activeIndex: this.$route.path,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
@ -88,6 +89,11 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created(){
|
||||||
|
if (this.$route.path.startsWith("/channelList")){
|
||||||
|
this.activeIndex = "/deviceList"
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
|
||||||
// window.addEventListener('unload', e => this.unloadHandler(e))
|
// window.addEventListener('unload', e => this.unloadHandler(e))
|
||||||
|
|
Loading…
Reference in New Issue