列表demo

在这里插入图片描述
列表样式demo

<view class="staff_box" v-else>
	<view class="team_box" v-for=" (list,n) in staffList">
		<view >
			<view class="team_title" @click="list.checkClass = !list.checkClass">
				<text>{{list.class}}</text>
				<image :src="list.open?require('../../../static/live-camera/down.png'):require('../../../static/live-camera/up.png') " mode=""></image>
			</view>
			<view class="team_list" v-if="list.arr">
				<view class="item" v-for="(item,n) in list.arr " @click="checkBtn(item)">
					<view class="circle" v-if="checkeIndex !== item.id"></view>
						<image src="../../../static/live-camera/success.png" mode="" v-else></image>
						<view class="name">{{item.name}}</view>
						</view>
					</view>
				</view>
				<!-- 如果还有嵌套,把整个team_box 组件加到这里-->
			</view>
		</view>
</view>

<script>
data(){
	return{
		staffList:[
			{
				class:'1组',
				open:false,
				arr:[
					{
						name:'王琳',
						check:false,
						id:999,
					}
				]
			},
			{
				class:'2组',
				open:false,
				arr:[
					{
						name:'王可',
						check:false,
						id:999,
					}
				]
			},
			{
				class:'3组',
				open:false,
				arr:[
					{
						name:'刘琳',
						check:false,
						id:999,
					}
				]
			}
		],
		checkeIndex:null,
	}
},

methods:{
	checkBtn(obj){
		if(this.checkeIndex == obj.id){
			this.checkeIndex = null
		}
	}
}
</script>

<style lang="scss">
  .assistance {
	box-sizing: border-box;
	height: calc(100vh - 138px) !important;
	.assistance_staff {
		margin-top: 16rpx;
		background: #fff;
		.staff_box {
			max-height: 100%;
			overflow-y: auto;
			.team_box{
				.team_title{
					height: 90rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 0 30rpx;
					border-bottom: 1rpx solid #D8D8D8;
					text{
						font-size: 30rpx;
						font-weight: 400;
						color: #333333;
						line-height: 42rpx;
					}
					image{
						width: 44rpx;
						height: 38rpx;
					}
				}
				
				.team_list{
					.item{
						height: 124rpx;
						display: flex;
						align-items: center;
						padding: 0 30rpx;
						border-bottom: 1rpx solid #D8D8D8;
						.circle{
							width: 32rpx;
							height: 32rpx;
							border: 2rpx solid #DCDEE0;
							border-radius: 50%;
						}
						image{
							width: 36rpx;
							height: 36rpx;
						}
						.name{
							margin-left: 25rpx;
						}
					}
				}
			}
		}
	}
  }
</style>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值