<template>
	<!-- 搜索 -->
	<view class="search" @click="handleSearch">
		<input type="text" :placeholder="name" />
		<image src="/static/28.png"></image>
	</view>
</template>

<script>
	export default {
		name: "search",
		data() {
			return {};
		},
		props: {
			name: {
				type: String,
				default: ''
			}
		},
		methods: {
			// 搜索
			handleSearch() {
				uni.switchTab({
					url: '/pages/search/search'
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.search {
		width: 100%;
		position: fixed;
		left: 0;
		top: 0;
		padding-bottom: 35px;
		padding-top: 10px;
		background-color: $maincolor;


		input {
			width: calc(100% - 40px);
			background: #fff;
			height: 39px;
			line-height: 38px;
			border-radius: 10px;
			padding: 0 10px;
			margin: 0 10px;
		}

		.input:hover {
			box-shadow: 0 1rpx 20rpx #ccc;
		}

		image {
			width: 25px;
			height: 25px;
			position: absolute;
			right: 20px;
			top: 18px;
			z-index: 99;
		}
	}
</style>