<!--  -->
<template>
  <div class="nav-bar">
    <van-nav-bar
      :title="title"
      :left-text="leftText"
      :right-text="rightText"
      :left-arrow="leftArrow"
      @click-left="onClickLeft"
      @click-right="onClickRight"
    ></van-nav-bar>
  </div>
</template>

<script>
export default {
  name: 'NavBar',
  props: {
    title: {
      type: String,
      default: ''
    },
    leftText: {
      type: String,
      default: '' || '返回'
    },
    rightText: {
      type: String,
      default: ''
    },
    leftArrow: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {
    onClickLeft(value) {
      this.$emit('on-click-left', value);
    },
    onClickRight(value) {
      this.$emit('on-click-right', value);
    }
  }
};
</script>
<style scoped lang="scss">
.nav-bar {
  position: absolute !important;
  left: 0;
  top: 0;
  height: 100px;
  width: 100%;
}

/* @import url(); 引入css类 */
</style>
