<template>
	<view>
		<image :src="navbg" class="navbg"></image>
		<uni-nav-bar :left-icon="leftflag?'left':''" :title="navtit" color="#ffffff"  :background-color="bgColor" :border="navborder" statusBar='true' fixed="true" @clickLeft='getBack'>
			<!-- <block slot="default">
				<view class="navtit">
					<view>{{navtit}}</view>
				</view>
			</block> -->
		</uni-nav-bar>
	</view>
</template>

<script>
	export default{
		props:{
			bgColor:{
				type: String,
				default () {
					return 'transparent'
				}
			},
			navborder:{
				type: Boolean,
				default () {
					return false
				}
			},
			navtit:'',
			leftflag:{
				type: Boolean,
				default () {
					return false
				}
			}
		},
		data(){
			return{
				navbg:require("@/static/images/navbg.png"),
				backgroundColor: "transparent",
			}
		},
		methods:{
			getBack(){
				if(this.leftflag){
					uni.navigateBack({
						delta:1
					})
				}
				
			},
		}
	}
</script>

<style scoped lang="scss">
.navbg{width: 100%;height: 692rpx;position: fixed;left: 0;right: 0;top: 0;z-index: 1;}
.navtit{display: flex;align-items: center;justify-content: center;font-size: 30rpx;color: #ffffff;width: 100%;
}	
</style>