deming/pageB/components/shoplist/index.vue
2020-08-01 17:22:46 +08:00

90 lines
1.9 KiB
Vue

<template>
<u-popup v-model="show" mode="bottom" length="782" border-radius="20">
<view class="top">
<text>全部商品</text>
<u-icon name="close" color="#999999" :size="30" @click="toggerList"></u-icon>
</view>
<scroll-view :scroll-y="true" class="scroll-box">
<view v-for="(item,index) in cartList" :key="index" class="item">
<image :src="item.goods_image" mode="aspectFill"></image>
<view>
<text class="title">{{ item.goods_advword }}</text>
<text class="name">{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}</text>
<text class="price">{{ item.goods_promotion_price }}</text>
</view>
</view>
</scroll-view>
</u-popup>
</template>
<script>
import sitem from "./item"
export default {
name:'shoplist',
props: ['list'],
components:{
sitem
},
data(){
return {
show: true,
cartList: [],
}
},
methods: {
toggerList() {
this.show = false;
}
}
}
</script>
<style lang="scss" scoped>
.top{
height: 88rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
border-bottom: 1rpx solid #ececec;
>text{
font-size: 30rpx;
color: #333;
}
}
.scroll-box {
.item {
display: flex;
padding: 20rpx;
border-bottom: 1px solid #ECECEC;
& > image {
flex-shrink: 0;
width: 160rpx;
height: 160rpx;
margin-right: 14rpx;
border-radius: 10rpx;
}
& > view {
display: flex;
flex-direction: column;
justify-content: space-between;
color: #333;
font-size: 28rpx;
.title {
}
.name {
width: 500rpx;
height: 80rpx;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.price {
color: #FF3131;
}
}
}
}
</style>