<template>
	<view>
		<view class="goods">
			<view class="goods-img">
				<image v-if="item.imgUrl" mode="aspectFit" class="wh-full" :src="item.imgUrl"></image>
				<view v-else class="pic"></view>
			</view>
			<view class="right-info">
				<view class="good-title">{{item.skuName}}</view>
				<view class="w-full flex-a">
					<view class="g-left">
						<view class="spec">{{item.skuProperties}}</view>
						<view class="price">{{item.price}}</view>
					</view>
					<view class="g-right">
						<slot></slot>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "my-goods",
		data() {
			return {
				show: false
			};
		},
		props: {
			item: {
				type: Object,
				required: true
			}
		},
		methods: {
			close() {
				this.show = false;
			}
		}
	}
</script>

<style scoped lang="scss">
	.goods {
		width: 100%;
		display: flex;
		align-items: center;

		.goods-img {
			height: 200rpx;
			width: 200rpx;
			flex-shrink: 0;
			.pic {
				width: 200rpx;
				height: 200rpx;
				background-color: #EEE;
				// 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;
	}


	.my-popup {
		width: 100%;
		max-height: 800rpx;
		overflow: auto;
		padding-bottom: 130rpx;
	}
</style>