fix:居中导航栏图标 以及 解决切换后project 列表依旧被的选择的问题

This commit is contained in:
zhangyu
2021-01-13 18:58:50 +08:00
parent 0504296213
commit 1b75ab629c
17 changed files with 65 additions and 18 deletions

View File

@@ -902,8 +902,10 @@
*/
},
beforeDestroy(){
if(this.scrollbarWrap){
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
}
}
}

View File

@@ -488,7 +488,9 @@
beforeDestroy(){
document.querySelector("#tableList").removeEventListener("mouseenter", this.tableListEnter);
document.querySelector("#tableList").removeEventListener("mouseleave", this.tableListLeave);
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
}
}
</script>

View File

@@ -611,7 +611,7 @@
}
.header .el-menu--horizontal>.icon-menu-item .el-submenu__title {
min-width: 50px !important;
line-height: 46px;
line-height: 50px;
/*margin-right:20px;*/
}
.header .vertical-line{

View File

@@ -218,6 +218,7 @@
if (this.currentProject && this.currentProject.id && this.showProjectPanel) {
this.detailProject(this.currentProject);
}
this.changeCurrentModule('');
}
},
},
@@ -258,6 +259,9 @@
getParentMenu(route) {
let parentMenu = "";
let end = false;
if (route != '/project'){
this.changeCurrentModule('');
}
if (route != '/project' && route != '/asset') {
this.$store.getters.menuList.forEach(menu => {
if (!end) {

View File

@@ -524,7 +524,9 @@
bus.$off("alert-rule-list-change");
bus.$off("dc-list-change");
bus.$off('alert-message-change');
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
},
created(){
//是否存在分页缓存

View File

@@ -851,7 +851,9 @@
beforeDestroy() {
bus.$off("asset-filter-change");
bus.$off('alert-message-change');
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
}
}
</script>

View File

@@ -436,7 +436,9 @@
}
},
beforeDestroy() {
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
},
computed: {
isCurrentUser() {

View File

@@ -531,7 +531,9 @@
},
beforeDestroy(){
bus.$off("dc-list-change");
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
},
created(){
//是否存在分页缓存

View File

@@ -342,7 +342,9 @@
this.getTableData();
},
beforeDestroy() {
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
}
}
</script>

View File

@@ -380,7 +380,9 @@
this.getTableData();
},
beforeDestroy() {
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
}
}
</script>

View File

@@ -383,7 +383,9 @@
}
},
beforeDestroy() {
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
}
}
</script>

View File

@@ -281,7 +281,9 @@
},
},
beforeDestroy() {
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
},
computed: {
isCurrentUser() {

View File

@@ -434,7 +434,9 @@
}
},
beforeDestroy() {
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
},
watch: {

View File

@@ -319,7 +319,9 @@
}
},
beforeDestroy() {
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
},
mounted() {
//初始化表头

View File

@@ -289,7 +289,9 @@
},
},
beforeDestroy() {
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
},
created(){
//是否存在分页缓存

View File

@@ -770,7 +770,9 @@
document.querySelector("#tableList").removeEventListener("mouseenter", this.tableListEnter);
document.querySelector("#tableList").removeEventListener("mouseleave", this.tableListLeave);
}
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
}
}
</script>

View File

@@ -226,6 +226,11 @@
facade,
'delete-button':deleteButton,
},
computed:{
currentProjectChange() {
return this.$store.state.currentProject;
}
},
data(){
return {
rightBox:{
@@ -844,14 +849,22 @@
if (n.length === 0 && this.endpointPageObj.pageNo > 1) {
this.endpointPageNo(this.endpointPageObj.pageNo-1);
}
if(!this.delFlag){ // 不是删除时回到顶部 以及修改时
if(!this.delFlag&&this.pageType==='endpoint'){ // 不是删除时回到顶部 以及修改时
this.$refs.endpointTable.bodyWrapper.scrollTop = 0
}else{
this.delFlag=false;
}
}
},
currentProject: {
handler(n, o) {
console.log(n);
if (n && o.id != this.currentProject.id) {
this.pageType='project';
}
},
},
},
beforeDestroy() {
bus.$off("project-page-type");
bus.$off("current-project-change");
@@ -860,7 +873,9 @@
bus.$off("module-list-change");
bus.$off("endpoint-list-change");
bus.$off('alert-message-change');
if(this.scrollbarWrap){
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
};
},
}
</script>