<template>
  <div>
    <van-nav-bar
      :title="label"
      :left-text="returnText"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    />
  </div>
</template>
<script>
import { Toast } from 'vant'
export default {
  props: {
    label: {
      type: String,
      default: '标题'
    },
    returnText: {
      type: String,
      default: ''
    }
  },
  data () {
    return {}
  },
  methods: {
    onClickLeft () {
      window.history.back()
    },
    onClickRight () {
      Toast('按钮')
    }
  }
}
</script>
