<template>
	<view class="custom-nav" :style="{ borderTopColor: statusBarColor, backgrounf: bgColor }">
		<text class="back cuIcon-back" @tap="back"></text>
		<text class="title">{{ title }}</text>
	</view>
</template>

<script>
	//自定义导航栏组件
	export default {
		props: {
			title: String,
			statusBarColor: String,
			bgColor: String
		},
		methods: {
			back () {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.custom-nav {
		position: fixed;
		z-index: 2;
		top: 0;
		width: 100%;
		height: $custom-nav-height;
		box-sizing: border-box;
		border-top: 34rpx solid #FFFFFF;
		padding-left: 30rpx;
		display: flex;
		align-items: center;
		font-size: 40rpx;
		line-height: 40rpx;
		color: #2A2A2A;
		background: #FFFFFF;
		.back {
			font-size: 42rpx;
			line-height: 42rpx;
			margin-right: 8rpx;
		}
	}
</style>
