<template>
	<view class="activity-recommend">
		<view v-if="recommendType === 'home'" class="activity-tab">
			<u-tabs :active.sync="tabActive" :tabs="tabs" tab-style="default" @change="tabChange"/>
		</view>
		<view class="activity-list">
			<template v-for="(item, index) in [1, 2, 3]">
					<view class="activity-item" :key="index">
						<view class="activity-title">KOSHINE 新品上线,解锁防脱生发新方式</view>
						<view class="activity-time">2024年03月20日 | E1馆二楼M16会议室</view>
						<view class="activity-summary">
							<view class="text">Kostal推出第四种机型的太阳能并网逆变器 2008年7月5日:KOSTAL公司原来只有PIKO系列太阳能并网逆变器10.1和5.5,中间没有其他功率段的产品。</view>
							<van-button class="btn-to-detail" type="primary">
								<template>
									<view>了解详情</view> <view class="arrow iconfont icon-right-s"></view>
								</template>
							</van-button>
						</view>
					</view>
			</template>
		</view>
	</view>
</template>

<script>
	
	export default {
		options: {
			styleIsolation: 'shared'
		},
		components: {
		},
		props: {
			recommendType: {
				type: String,
				default: 'home'
			}
		},
		data() {
			return {
				tabActive: '1',
				tabs: [{
					label: '展会新闻',
					value: 1
				}, {
					label: '展商新闻',
					value: 2
				}]
			}
		},
		created() {
		},
		methods: {
			tabChange() {
				
			}
		}
	}
</script>
<style lang="scss">
	.activity-list{
		display: grid;
		grid-template-columns: 1fr;
		grid-row-gap: 18rpx;
		margin-top: 28rpx;
	}
	.activity-item{
		display: flex;
		flex-direction: column;
		height: 210rpx;
		background-color: #F6F6F6;
		border-radius: 10rpx;
		padding: 24rpx 30rpx;
	}
	.activity-title{
		@extend .text-ellipsis-line;
		font-family: Arial, Arial;
		font-weight: bold;
		font-size: $fontSize2;
		line-height: 35rpx;
	}
	.activity-time{
		font-size: $fontSize1;
		color: #333333;
		margin: 12rpx 0;
	}
	.activity-summary{
		display: flex;
		align-items: center;
		font-size: 18rpx;
		line-height: 25rpx;
		.btn-to-detail{
			flex-shrink: 0;
			.van-button__text{
				display: flex!important;
				align-items: center;
				font-size: 18rpx;
			}
		}
		.text{
			padding-right: 30rpx;
			color: #555555;
			@extend .text-ellipsis-line;
			-webkit-line-clamp: 2;  
		}
		.arrow{
			margin-left: 12rpx;
			font-size: $fontSize0;
		}
	}
	
	.activity-tab{
		van-button{
			margin-right: 13rpx;
		}
	}
</style>