import i18n from '@/utils/i18n'
export default {
  methods: {
    generateTitle() {
      return this.genTitle(this.$route.name, this.$route.meta.title)
    },
    genTitle(name, title) {
      return i18n.generateTitle(name, title)
    },
    onBack() {
      if (window.history.length <= 1) {
        this.$router.push({ path: '/' })
      } else {
        this.$router.go(-1)
      }
    }
  }
}
