<template>
	<view class="top">
		<view class="back">
			<image class="back" :src="`${imgUrl}/icon/back.png`" mode="aspectFit" @tap="toback">
			</image>
		</view>
		<view class="text">
			{{text}}
		</view>
	</view>
</template>

<script setup>
	import {
		imgUrl
	} from '@/common/config';
	import {
		router
	} from '../utils/router';
	const props = defineProps(['text'])
	const toback = () => {
		router.back()
	}
</script>

<style scoped lang="scss">
	.top {
		width: 750rpx;
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		background-color: #fff;
		position: relative;

		.back {
			position: absolute;
			display: inline-block;
			height: 40rpx;
			width: 40rpx;
			top: 50%;
			left: 40rpx;
			transform: translate(-50%, -50%);
		}

		.text {
			vertical-align: top;
			display: inline-block;
			width: 750rpx;
			height: 100%;
		}
	}
</style>