<template>
<view class="tabbs-content">
<!-- <view class="buzhoutiao" v-for="(item,index) in numList">
{{item.name}}
</view> -->
<view class="buzhoutiao" v-for="(item,index) in numList" @click="nest(item,index)"
:class="{cur:arrlist.indexOf(index) > -1}"
>
<view class="xiahuaxian"
:class="{cur:arrlist.indexOf(index) > -1}"
:style="{border:numList.length - 1 === index ? '0px':''}"
>
</view>
<text>{{item.name}}</text>
<br/>
<text>{{item.a}}</text>
<br/>
<text>{{item.b}}</text>
</view>
<view class="">
<button type="default" @click="addnumlist()">通过</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
numList: [{
name: '下单'
}, {
name: '出库',a:123123
}, {
name: '运输',a:456456,b:7879
}, {
name: '签收'
}, ],
arrlist:[]
}
},
methods:{
nest(item,index){
// console.log(item,index)
if(this.arrlist.indexOf(index) == -1){
this.arrlist.push(index)
}
},
addnumlist(){
this.numList.push({name:{
a:123,b:5456
},name:'123'},{name:'你好'})
}
}
}
</script>
<style scoped lang="scss">
.xiahuaxian{
position: absolute;
left: 0;
top: 60rpx;
width: 2rpx;
height: 120rpx;
border: dashed 2rpx #333333;
}
.buzhoutiao{
margin: 80rpx;
border: solid 2rpx #333333;
position: relative;
}
.cur{
color: red;
}
</style>