<el-table v-show="isSwitch==true" :data="distributorArr"
部分代码。应该看得懂吧 :data是绑值
<template slot-scope="scope"> <el-select v-model="scope.row.id" multiple filterable allow-create @change="((val) => {distributorGroup(val, scope.$index)})" default-first-option placeholder="分销商分组"> <el-option v-for="item in descriptionGroupList" :key="item.id" :label="item.level" :value="item.id"> </el-option> </el-select> </template>
distributorGroup(value, index) { var group = [] for (var i = 0; i < value.length; i++) { var obj = {} obj.id = value[i] group.push(obj) } this.distributorArr[index].groupList = group },