<template>
  <div>
    <van-nav-bar
      :title="title || $route.meta.title"
      left-arrow
      @click-left="onNavBack"
      fixed
    />
    <div class="fixht"></div>
  </div>
</template>

<script>
import { NavBar } from "vant";
export default {
  props: {
    title: {
      type:String,
      default:""
    },
    url:{
      type:String,
      default:""
    }
  },
  data() {
    return {};
  },
  methods:{
    onNavBack(){
      // console.log(this.url);
      if(this.url!=''){
        this.$router.push(this.url)
        return
      }
      this.$router.go(-1);
    }
  }
};
</script>
<style>
.van-nav-bar{
  z-index: 999!important;
}
.fixht{
  height: 92px;position: relative;
}
.van-nav-bar .van-icon{
  color: #000!important;
}
</style>
