update
This commit is contained in:
@@ -2,10 +2,17 @@
|
||||
<u-popup v-model="show" mode="bottom" length="782" border-radius="20">
|
||||
<view class="top">
|
||||
<text>全部商品</text>
|
||||
<image></image>
|
||||
<u-icon name="close" color="#999999" :size="30" @click="toggerList"></u-icon>
|
||||
</view>
|
||||
<scroll-view :scroll-y="true" style="padding:0 30rpx;height:692rpx">
|
||||
<sitem v-for="i in 10"></sitem>
|
||||
<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>
|
||||
@@ -13,20 +20,30 @@
|
||||
import sitem from "./item"
|
||||
export default {
|
||||
name:'shoplist',
|
||||
props: ['list'],
|
||||
components:{
|
||||
sitem
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
show: true
|
||||
show: true,
|
||||
cartList: this.list || [],
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
list() {
|
||||
this.cartList = this.list;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggerList() {
|
||||
this.show = false;
|
||||
this.$emit("hideCart",this.show);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
image{
|
||||
background-color: #0f0;
|
||||
}
|
||||
.top{
|
||||
height: 88rpx;
|
||||
width: 100%;
|
||||
@@ -39,9 +56,41 @@ image{
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
>image{
|
||||
width: 33rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
}
|
||||
.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>
|
||||
Reference in New Issue
Block a user