选择完成
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<view class="item">
|
||||
<image></image>
|
||||
<view class="title u-line-1" ></view>
|
||||
<view class="item" @click="xuanzhongs">
|
||||
<image :src="image"></image>
|
||||
<view class="title u-line-1" >{{title}}</view>
|
||||
<view class="info">
|
||||
<text></text>
|
||||
<text></text>
|
||||
<text>{{price}}</text>
|
||||
<text>销量:{{num}}</text>
|
||||
</view>
|
||||
<u-checkbox class="xuanzhong" active-color="#FF7A15" :name="sid" v-model="xuanzhong" @change="xuanzhongs">
|
||||
</u-checkbox>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@@ -13,7 +15,14 @@ export default {
|
||||
name:"shop-item",
|
||||
data(){
|
||||
return {
|
||||
|
||||
xuanzhong:true,
|
||||
}
|
||||
},
|
||||
props:['image','title','price','num','sid'],
|
||||
methods:{
|
||||
xuanzhongs(){
|
||||
this.xuanzhong = !this.xuanzhong
|
||||
this.$emit("xuanzhong")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +30,11 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.item{
|
||||
width: 214rpx;
|
||||
height: 297rpx;
|
||||
// height: 297rpx;
|
||||
background-color: #fff;
|
||||
border-radius:10rpx 10rpx 0 0;
|
||||
padding-bottom: 14rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
>image{
|
||||
width: 100%;
|
||||
@@ -49,5 +62,10 @@ export default {
|
||||
|
||||
}
|
||||
}
|
||||
.xuanzhong{
|
||||
position: absolute;
|
||||
left: 8rpx;
|
||||
top: 8rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user