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/UiGoodsInfoMax.vue

96 lines
1.8 KiB

<!--
* @Author: ch
* @Date: 2022-04-22 16:48:11
* @LastEditors: ch
* @LastEditTime: 2022-04-22 20:52:22
* @Description: file content
-->
<template>
<view class="goods-item" @click="$emit('click')">
<image class="goods-item--image" mode="aspectFit" :src="data.productImageUrl" />
<view class="goods-item--con">
<view class="goods-item--title-box">
<text class="goods-item--title">{{data.productName}}</text>
<UiMoney :money="data.realAmount" float prefix suffix/>
<!-- <text class="goods-item--pirce">{{data.realAmount}}</text> -->
</view>
<view class="goods-item--desc">
<text>{{data.skuDescribe}}</text>
<text class="goods-item--num">x{{data.quantity}}</text>
</view>
</view>
</view>
</template>
<script>
import UiMoney from './UiMoney.vue'
export default {
components: { UiMoney },
props : {
data : {
type : Object,
default : ()=> ({})
}
}
}
</script>
<style lang="scss" scoped>
.goods-item{
display: flex;
justify-content: space-between;
padding: 30rpx 0 0;
&--image{
width: 180rpx;
height: 180rpx;
}
&--con{
width: 480rpx;
}
&--title-box{
display: flex;
justify-content: space-between;
font-size: $font-size-base;
color: $color-grey6;
line-height: 39rpx;
}
&--title{
width: 320rpx;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
font-weight: bold;
}
&--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;
}
}
&--num{
font-size: $font-size-base;
margin-left: 60rpx;
}
}
/deep/{
.ui-money{
text{
font-size: $font-size-base;
font-weight: bold;
}
.ui-money--prefix,.ui-money--suffix{
font-size: $font-size-sm;
}
}
}
</style>