Bro-List.vue
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<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>