选择
This commit is contained in:
@@ -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})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
border-radius: 50%;
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.selects{
|
||||
background-color: #45C778;
|
||||
}
|
||||
.pic {
|
||||
/* width: 222rpx;
|
||||
height: 222rpx; */
|
||||
|
||||
Reference in New Issue
Block a user