vue element-ui el-select 级联

需求介绍

image.png

  
    
  



  
    
  

data() {
  return{
    operateIdList:[],
    operateTypeIdList:[]
  }
},
methods: {
    operationTypeChange(val){
        console.log(val)
        for (let i = 0, len = this.operateTypeIdList.length; i < len; i++) {
            if(this.operateTypeIdList[i].operationTypeId == val + ""){
                this.operateIdList = this.operateTypeIdList[i].operationList;
                this.$set(this.queryParams, 'operateId', '');
                // 注意:不要使用 this.queryParams.operateId = "" 的形式,这样不管用
            }
        }
    }
}

你可能感兴趣的:(vue element-ui el-select 级联)