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

89 lines
1.7 KiB

<!--
* @Author: ch
* @Date: 2022-03-31 14:49:33
* @LastEditors: ch
* @LastEditTime: 2022-04-21 16:27:29
* @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 class="ui-goods-item--right">
<view class="ui-goods-item--con">
<text class="ui-goods-item--title">{{data.productName}}</text>
<UiMoney :money="data.realAmount"></UiMoney>
</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>
import UiMoney from './UiMoney.vue'
export default {
components: { UiMoney },
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: 140rpx;
height: 140rpx;
}
&--right{
width: 474rpx;
}
&--con{
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{
margin-top: 20rpx;
line-height: 39rpx;
display: flex;
justify-content: space-between;
text{
font-size: $font-size-sm;
color: $color-grey4;
&.ui-goods-item--num{
font-size: $font-size-base;
margin-left: 60rpx;
}
}
}
}
</style>