methods: {
async getList(res) {
this.listLoading = true
如果res为null获取worklist
if(res != null){
this.worklist = [];
如果res里面的获取数据为s或y则绑定不同的值
if(res.projectName == "s"){
this.lastWorklist.data.list.forEach(item => {
if(item.app == res.projectName){
this.worklist.push(item);
}
});
}
else if(res.projectName == "y"){
this.lastWorklist.data.list.forEach(item => {
if(item.app == res.projectName){
this.worklist.push(item);
}
});
}
}
this.listLoading = false
},
然后在getlist2里面在第二个select组件进行传值绑定
getList2(res){
if(res.app=="s"){
this.postForm.projectName = "抖音";
}
else if(res.app == "y"){
this.postForm.projectName = "快手";
}
},