fix: 处理直接进入project不走watch的问题

This commit is contained in:
zhangyu
2020-08-20 09:40:15 +08:00
parent 2283194ecd
commit 5bca796040
4 changed files with 22 additions and 4 deletions

View File

@@ -178,7 +178,9 @@
}
},
mounted(){
console.log(this.obj);
if(this.obj.id){
this.getProjectData(this.obj);
}
},
methods:{
getProjectData(n){
@@ -187,14 +189,18 @@
this.$get('project/info', {id:n.id}).then(response => {
if (response.code === 200) {
this.projectInfo={...this.projectInfo,...response.data.basic,moduleMum:response.data.module.length}
this.$nextTick(()=>{
this.projectInfo.loading=false;
})
}
});
//获取所有asset
this.alertData.loading=true;
setTimeout(()=>{
this.$nextTick(()=>{
this.alertData.loading=false;
})
},300)
},
focusInput() {

View File

@@ -524,6 +524,17 @@
}
return false
});
this.network.on("resize", function (params) {//检测resize
console.log(1111);
setTimeout(()=>{
this_.modelTopUpdate();
this_.selNodeArrUpdate();
if(this_.networkPopShow){
this_.setPopPosition(this_.selNodeId);
}
})
return false
});
})
}
}

View File

@@ -96,6 +96,7 @@
{id: 5,from: 1, to: 7, dashes:[15,15],label:"hahah",arrows:'from;to',smooth:true, color: {color:'#1e90ff',highlight:'#1e90ff',hover:'#1e90ff',opacity:1.0}},
],
dragTitleShow:false,
dropdownMenuShow:false,
}
},

View File

@@ -606,7 +606,7 @@
//resize时刷新左侧列表滚动条
let vm = this;
window.onresize = function() {
vm.$refs.leftScrollbar.update();
// vm.$refs.leftScrollbar.update();
};
},
computed: {