<li v-for="(item,i) in satisfyLabels" class="itemList" :key="i">
<span v-if="item.condition && item.condition.conditionType=='MUlTI_NEST'" class="treeLong">
<Tree :data="item.values | toTree" @on-check-change="changeTree" show-checkbox class="treeInner"></Tree>
</span>
<span v-if="item.condition && item.condition.conditionType=='NUM_RANGE'">
<Input placeholder="不限" style="width: 100px" v-model="item.value[0]" @on-keyup="changeRangeFront(item.value)" @on-blur="stopTime"></Input> -
<Input placeholder="不限" style="width: 100px" v-model="item.value[1]" @on-keyup="changeRangeFront(item.value)" @on-blur="stopTime"></Input>
</span>
<span v-if="item.condition && item.condition.conditionType=='MUlTI'">
<Select v-model="item.value" multiple @on-change="changeSelMulity">
<Option v-for="itemC in item.values" :value="itemC.configValue" :key="itemC.id">{{ itemC.configName }}</Option>
</Select>
</span>
</li>
在循环中判断类型然后看是否展示为tree,循环以后可能有多个tree,如何在提交的时候拿到每个tree的选中节点呢?请大神帮忙看看
后来搜到给具有默认参数的方法传参
@check="(v,check)=>{changeTree(v,check,item,i)}"
如此,默认参数可直接返回被选中的节点,将该节点赋值给item的某个属性,就能拿到每个树菜单的选中的节点