// 定义generateTitle 函数

export function generateTitle(title) {
  const hasKey = this.$te('dongtai.' + title)

  if (hasKey) {
    // $t :this method from vue-i18n, inject in @/lang/index.js
    const translatedTitle = this.$t('dongtai.' + title)

    return translatedTitle
  }
  return title
}