Bro-List.vue 1.7 KB
<template>
	<view class="Bro-List">
		<scroll-view class="otherNorms" scroll-y="true">
			<!-- 规格1 -->
			<view class="norms size28">{{datas.group_name}}</view>
			<view class="flex norderDetailBox">
				<view :class="[activIndex == index ? 'normDetailActive' : 'normDetail']"  v-for="(item,index) in datas.spec_items" :key="index" @click="normOne(index,item.item_id)">
					{{item.spec_value}}
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
export default {
	name: 'Bro-List',
	props:{
		datas:{
			type:Object,
			default:()=>{
				return {}
			}
		},
		ay:{
			type:Number,
			default:0
		}
	},
	data() {
		return {
			activIndex:0
		};
	},
	methods:{
		normOne(index,id){
			this.activIndex = index;
			this.$emit('ItemList',id,this.ay)
		}
	}
};
</script>

<style lang="scss" scoped>
.otherNorms {
	height: 150rpx;
	box-sizing: border-box;
}

.norderDetailBox {
	margin-bottom: 34rpx;
	flex-wrap: wrap;
	margin-top: 16rpx;
}
.norderDetailBox:last-child {
	margin-bottom: 0;
}

.norms {
	color: #5c5c5c;
	padding-left: 16rpx;
	box-sizing: border-box;
}
.bottomNum {
	border-top: 2rpx solid #f2f3f5;
	height: 144rpx;
	padding: 0 16rpx;
	box-sizing: border-box;
}
.normDetail {
	padding: 8rpx 32rpx;
	box-sizing: border-box;
	border-radius: 24rpx;
	background-color: #f1f1f3;
	margin-left: 16rpx;
	margin-bottom: 16rpx;
	color: #5c5c5c;
	font-size: 24rpx;
}
.normDetailActive {
	padding: 8rpx 32rpx;
	box-sizing: border-box;
	border-radius: 24rpx;
	background-color: #f4fffc;
	margin-left: 16rpx;
	margin-bottom: 16rpx;
	color: #3e554e;
	font-size: 24rpx;
	border: 2rpx solid #3e554e;
}
.numText {
	color: #5c5c5c;
}
.mumBox {
	width: 56rpx;
	height: 56rpx;
	background-color: #f2f3f5;
	border-radius: 8rpx;
	margin-left: 4rpx;
}
</style>