<template>
	<view class="label">
		<view class="box">
			<view class="list">
				<view class="item" v-for="(item,index) in listImgArr" :key="index">
					<view class="icon-car" >
						<text>{{item.text}}</text>
						<image :src="item.src" @click="GoTo(item.text)"></image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"labelBox",
		data() {
			return {
				listImgArr: [
					{text:'轿车' , src : "../../static/AllCar/icon-car/jiaoche.png"},
					{text:'SUV' , src : "../../static/AllCar/icon-car/SUV.png"},
					{text:'跑车' , src : "../../static/AllCar/icon-car/paoche.png"},
					{text:'微面' , src : "../../static/AllCar/icon-car/weimian.png"},
					
				]
			};
		},
		methods:{
			GoTo:function(e){
				uni.navigateTo({
					url:'../../pages/TextIndex/TextIndex?text='+e,
					success:function(res){
						console.log(e)
					},
					fail:function(res){
						// console.log(this.listImgArr.text)
					}
				})
			}
		}
	}
</script>

<style lang="scss">
.label{
	margin-top: 37.73rpx;
	.box{
		margin: auto;
		// padding: 10px 10px;
		// text-align: center;
		width: 93%;
		// background-color: $uni-bg-color-box;
		border: 1.88rpx solid black;
		border-radius: 18.86rpx;
		.list{
			text-align: center;
			width: 98%;
			margin: auto;
			padding: 18.86rpx 0px;
			// background-color: $uni-bg-color-box;
			.item{
				display: inline-block;
				// border-radius: 75.47rpx;
				// background-color: blue;
				margin: 5px;
				.icon-car{
					width: 150.94rpx;
					height: 150.94rpx;
					// border-radius: 75.47rpx;
					position: relative;
					text{
						font-size: 26.41rpx;
						position: absolute;
						top: 150.47rpx;
						left: 75.47rpx;
						transform: translate(-50%,-50%);
						color: #000000;
						z-index: 99;
					}
					image{
						width: 150.94rpx;
						height: 150.94rpx;
						// border-radius: 75.47rpx;
					}
				}
			}
		}
	}
}
</style>
