1.父组件中的方法】
isopened(comp){
var j=0;
for(var i = 0; i <this.modules.length; i++){
if(comp.component==this.modules[i].component){
j+=1;
}
}
if(j==1){
return true;
}else{
return false;
}
},
2.子组件中调用父组件的方法】
if(this.$main.isopened({
component: "AddInputInformation", title: "新增存款信息"
})){
this.$confirm("您已经打开新增页面");
}else{
this.$confirm("进入存款新增页面");
}