<template>
	<view class="search-container">
		<view class="search-box">
			<uv-search :showAction="true" actionText="搜索" placeholder="请输入房源或项目名称" :animation="false"
				v-model="searchValue" @search="search" @custom="search">
			</uv-search>
		</view>
		<view class="search-tag">
			<view class="tag-title">标签列表</view>
			<view class="tag-list">
				<view class="tag-item">
					标签1
				</view>
				<view class="tag-item">
					标签2
				</view>
				<view class="tag-item">
					标签3
				</view>
			</view>
			<view class="tag-title">历史搜索</view>
			<view class="tag-list">
				<view class="tag-item">
					维绿大厦
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchValue: ''
			}
		},
		onShow() {},
		methods: {
			search() {
				this.$navigateTo('/pages/searchlist/searchlist?searchValue=' + this.searchValue);
			}
		}
	}
</script>

<style lang="scss">
	.search-container {
		.search-box {
			border-top: 1px solid $uni-border-1;
			background: #Fff;
			margin-bottom: 20rpx;
			padding: 20rpx 10rpx;
			padding-left: 20rpx;
		}

		.search-tag {
			background: #fff;
			padding: 30rpx 0 0 30rpx;

			.tag-title {
				font-size: 24rpx;
				font-weight: bold;
				color: $uni-base-color;
				margin-bottom: 20rpx;
			}

			.tag-list {
				display: flex;
				flex-wrap: wrap;
			}

			.tag-item {
				background: $uni-background-color;
				padding: 10rpx 20rpx;
				color: $uni-base-color;
				font-weight: 300;
				margin-right: 30rpx;
				margin-bottom: 30rpx;
				font-size: 24rpx;
				border-radius: 8rpx;
			}
		}
	}
</style>