<template>
	<navigationStyle :titles="titles" :bgcolor="bgcolor" :color="color"></navigationStyle>
	<view class="addchepai">
		<chepai @numString="numString" :chuanzi='chuanzi'></chepai>
	</view>
	<view class="explain" v-if="isShows===0">
	
		<view class="explain-box" scroll-y="true">
	
			<view class="explain-box-title">
				次卡说明
			</view>
			<scroll-view class="explain-box-body" scroll-y="true">
				<text class="txt">
					添加成功
				</text>
			</scroll-view>
			<view class="explain-btn" @click="btns">
				我知道了
			</view>
		</view>
	
	</view>
</template>

<script setup>
	import { ref } from 'vue';
	import {onLoad} from '@dcloudio/uni-app'
	const titles = ref('添加车牌')
	const bgcolor = ref('#fff')
	const color = ref('#000')
	const chepais = ref(null)
	const isShows = ref(1)
		const chuanzi = ref([{
				id: 1,
				as: "京"
			},
			{
				id: 2,
				as: "A"
			},
			{
				id: 3,
				as: "6"
			},
			{
				id: 4,
				as: "6"
			},
			{
				id: 5,
				as: "6"
			},
			{
				id: 6,
				as: "6"
			},
			{
				id: 7,
				as: "6"
			},
			{
				id: 8,
				as: "6"
			}
		])
	const numString = (val)=>{
		isShows.value=0
		chepais.value =val
		console.log(chepais.value);
	}
	const btns = ()=>{
		uni.navigateBack()
	}
</script>

<style lang="scss">
	.addchepai{
		width: 100%;
		height: 100%;
		position: absolute;
	}
	.explain {
		position: fixed;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.2);
	
		.explain-box {
			border-radius: 20rpx 20rpx 20rpx 20rpx;
			width: 500rpx;
			height:360rpx;
			background-color: #fff;
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
	
			.explain-box-title {
				width: 100%;
				height: 100rpx;
				line-height: 100rpx;
				text-align: center;
				font-size: 26rpx;
			}
	
			.explain-box-body {
				width: 80%;
				height: 100rpx;
				margin-left: 50%;
				transform: translateX(-50%);
				text-align: center;
				line-height: 100rpx;
				// background-color: red;
	
				.txt {
					display: block;
					width: 100%;
					font-size: 26rpx;
					word-wrap: break-word;
				}
			}
			.explain-btn{
				width: 300rpx;
				height: 70rpx;
				background-color: #d9001b;
				text-align: center;
				position: relative;
				margin-left: 50%;
				transform: translateX(-50%);
				line-height: 70rpx;
				margin-top: 40rpx;
				color: white;
				border-radius: 20rpx 20rpx 20rpx 20rpx;
			}
		}
	}

</style>
