You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/components/UiGoodsInfo.vue

83 lines
1.6 KiB

<!--
* @Author: ch
* @Date: 2022-03-31 14:49:33
* @LastEditors: ch
* @LastEditTime: 2022-04-11 11:28:16
* @Description: file content
-->
<template>
<view class="ui-goods">
<view class="ui-goods-item">
<image class="ui-goods-item--image" mode="widthFix" :src="data.productImageUrl" />
<view >
<view class="ui-goods-item--con">
<text class="ui-goods-item--title">{{data.productName}}</text>
<text class="ui-goods-item--pirce">{{data.realAmount}}</text>
</view>
<view class="ui-goods-item--desc">
<text>{{data.skuDescribe}}</text>
<text class="ui-goods-item--num">x{{data.quantity}}</text>
</view>
</view>
</view>
<slot name="operation"></slot>
</view>
</template>
<script>
export default {
props : {
data : {
type : Object,
default : {}
}
}
}
</script>
<style lang="scss" scoped>
.ui-goods{
padding: 30rpx;
border-bottom: 1px solid $color-grey2;
}
.ui-goods-item{
display: flex;
justify-content: space-between;
&--image{
width: 180rpx;
height: 180rpx;
margin-right: 30rpx;
}
&--con{
width: 510rpx;
display: flex;
justify-content: space-between;
font-size: $font-size-base;
color: $color-grey6;
line-height: 39rpx;
}
&--title{
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
&--pirce{
font-size: 22rpx;
margin-left: 60rpx;
}
&--desc{
width: 510rpx;
font-size: $font-size-sm;
color: $color-grey4;
margin-top: 20rpx;
line-height: 39rpx;
display: flex;
justify-content: space-between;
}
&--num{
font-size: $font-size-base;
margin-left: 60rpx;
}
}
</style>