<template>
	<view class="goods">
		<view class="goods-img">
			<image mode="aspectFit" class="wh-full" :src="data.src"></image>
		</view>
		<view class="right-info">
			<view class="good-title">{{data.title}}</view>
			<view class="w-full flex-a">
				<view class="g-left">
					<view class="spec">{{data.spec}}</view>
					<view class="price">{{data.price}}</view>
				</view>
				<view class="g-right">
					<slot></slot>
				</view>
			</view>
			
		</view>
		
	</view>
</template>

<script>
	export default {
		name:"my-goods",
		data() {
			return {
				
			};
		},
		props:{
			data:{}
		}
	}
</script>

<style scoped lang="scss">
.goods{
	width: 100%;
	display: flex;
	align-items: center;
	.goods-img{
		height: 200rpx;
		width: 200rpx;
		flex-shrink: 0;
	}
	.right-info{
		width: calc(100% - 200rpx);
		box-sizing: border-box;
		padding-left: 10rpx;
		.good-title{
			width: 100%;
			text-overflow: ellipsis;
			white-space: nowrap;
			font-size: $uni-font-size-base;
			overflow: hidden;
			padding-bottom: 10rpx;
		}
		.spec{
			height: 50rpx;
			display: flex;
			align-items: center;
			width: 200rpx;
			border-radius: 25px;
			background-color: #EFEFEF;
			font-size: $uni-font-size-sm;
			margin-bottom: 20rpx;
			box-sizing: border-box;
			padding: 0 20rpx;
		}
		
	}
}
.flex-a{
	display: flex;
	justify-content: space-between;
}
</style>