<template>
	<view class="cart">
		<view class="leftImg">
			<u-image :src="info.pagodaMainImg" :width="width" :height="height" mode="scaleToFill" border-radius="12rpx"></u-image>
		</view>
<!-- 		<image :style="{width: width, height:height}" class="u-m-l-36" mode="scaleToFill"
			:src="info.pagodaMainImg"></image> -->
		<view class="center">
			<view class="name">
				{{info.pagodaName}}
			</view>
			<view class="positon">
				{{info.graveNum}}墓穴 | {{info.floor}}层
			</view>
			<!-- 	<view class="link">
				链上查看
			</view> -->
			<view class="location">
				<view class="icon">

				</view>
				<view class="text">
					{{info.address}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			width: {
				type: String,
				default: "100%"
			},
			height: {
				type: String,
				default: "100%"
			},
			info: {
				type: Object,
				default: () => {
					return {
						imgUrl: "../../static/banner.png",
						name: '云凌藏隐陵园002号神塔',
						position: '72墓穴｜5层',
						link: ''
					}
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.cart {
		display: flex;
		align-items: center;
		.center {
			margin-left: 24rpx;
			flex: 1;
		}

		.name {
			margin-top: 20rpx;
			color: #303133;
			font-size: 28rpx;
			line-height: 32rpx;
		}

		.positon {
			color: #909399;
			font-size: 24rpx;
			margin-top: 5rpx;
		}

		.link {
			margin-top: 12rpx;
			// width: 114rpx;
			height: 44rpx;
			background-color: #edf5ff;
			color: #509EFA;
			font-size: 20rpx;
			text-align: center;
			line-height: 44rpx;
			border-radius: 8rpx;
		}

		.location {
			margin-top: 38rpx;
			color: #909399;
			display: flex;
			.icon {
				width: 24rpx;
				height: 24rpx;
				background-image: url(../static/pos.png);
				background-size: 100% 100%;
				transform: translateY(8rpx);
				margin-right: 10rpx;
			}

			.text {
				overflow: hidden;
				/*文本超出隐藏*/
				text-overflow: ellipsis;
				/*文本超出显示省略号*/
				white-space: nowrap;
				/*超出的空白区域不换行*/
				width: 90%;
			}
		}
	}
</style>
