<template>
	<!-- 顶部导航栏 -->
	<uni-nav-bar
		:left-icon="showLeft?left:''"
		:title="title"
		@clickLeft="goBack"
		fixed
		color="#8B2316"
		height="180rpx"
		:border="false"
		backgroundColor="#eeeeee"
	/>
</template>

<script setup>
	import { ref } from 'vue';
	import { onShow } from "@dcloudio/uni-app";
	const props=defineProps({
		showLeft:{
			type:Boolean,
			default:true
		},
		title:{
			type:String,
			default:''
		}
	})
	// 方法
	const goBack = () => {
		uni.navigateBack({
			fail() {
				uni.redirectTo({
					url: '/pages/index/index'
				});
			}
		});
	};
</script>

<style scoped>

</style>
