<template>
	<view class="nav-head">
		<slot name="address"></slot>
		<slot></slot>
		<slot name="bread"></slot>
		<slot name="logo"></slot>
		<image src="../../static/tongyonh/Vector.png" mode="aspectFit" class="back" @tap="back()" v-if="showBack"></image>
	</view>
</template>

<script>
	const COMPONENT_NAME = 'navigation'
	export default {
		name: COMPONENT_NAME,
	    props:{
			showBack: {
				type: Boolean,
				default () {
					return true
				}
			},
			bgnum: {
				type: Boolean,
				default () {
					return false
				}
			},
		},
		data() {
			return {
		
			}
		},
		computed: {
		
		},
		mounted() {
		
		},
		methods: {
		back(){

				// #ifdef H5
					history.back()
				// #endif
				
				// #ifdef APP-PLUS	
				uni.navigateBack()
				// #endif
				}	
	},
	}
</script>

<style scoped lang="scss">

    .item{
    	font-size: 28rpx;
    	text-align: center;
    	width: 234rpx;
    	line-height: 60rpx;
    }
   
	.nav-head{
		line-height: 60rpx;
		// background-color: #fff;
		text-align: center;
		font-weight: 700;
		font-size: 36rpx;
		color: #000;
		position: relative;
		padding: 0 36rpx;
		margin-top: 50rpx;
		display: flex;
		justify-content: center;
		flex-direction: row-reverse;
		align-items: center;
		margin-top: 80rpx;
	}
	.back{
		width: 30rpx;
		height: 30rpx;
		position: absolute;
		left:36rpx;
	    top: 50%;
		transform: translateY(-50%);
	}

</style>
