<el-select v-model="item.rewardType" class="cell_width" @change="((val)=>{changeRewardType(val,index)})">
<el-option
v-for="itemOpt in rewardTypeList"
:key="itemOpt.value"
:label="itemOpt.label"
:value="itemOpt.value"
></el-option>
</el-select>
<div v-if="index!=divList.length-1" style="line-height: 114pxfont-size:32pxcursor: pointer" @click="removeSetter(index)">-</div>
<div v-else style="line-height: 114pxfont-size:32pxcursor: pointer" @click="addSetter">+</div>
</div>
data(){
return{divList:[{rewardType:''}]}
}
addSetter(){
this.divList.push({rewardType:''})
},
removeSetter(i){
this.divList.splice(i,1)
}
单个子组件时直接ref=‘name’,在js中this. refs.后面是不能直接跟变量的,很简单that.$refs.name[0].scrollIntoView()加上[0]就能取到动态的节点了,然后滚动到改动态节点位置。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)