This commit is contained in:
2019-12-20 09:51:28 +08:00
parent edc8983853
commit 3cf388faed
6 changed files with 31 additions and 6 deletions

View File

@@ -10,7 +10,9 @@ Component({
price: Number,
pic: String,
gid:Number,
num:Number
num:Number,
select:Boolean,
index:Number
},
/**
@@ -58,6 +60,9 @@ Component({
}).then((res)=>{
})
},
sel(){
this.triggerEvent('sel', {index:this.data.index,select:this.data.select})
}
}

View File

@@ -1,5 +1,5 @@
<view class="shoppingitem">
<view class="select"></view>
<view class="select {{select ? 'selects':''}}" bind:tap="sel"></view>
<view class="pic">
<image src="{{pic}}"></image>
</view>

View File

@@ -12,7 +12,9 @@
border-radius: 50%;
margin: auto 0;
}
.selects{
background-color: #45C778;
}
.pic {
/* width: 222rpx;
height: 222rpx; */