You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
338 B
12 lines
338 B
// translate router.meta.title, be used in breadcrumb sidebar tagsview
|
|
export function generateTitle(title) {
|
|
const hasKey = this.$te('route.' + title)
|
|
|
|
if (hasKey) {
|
|
// $t :this method from vue-i18n, inject in @/lang/index.js
|
|
const translatedTitle = this.$t('route.' + title)
|
|
|
|
return translatedTitle
|
|
}
|
|
return title
|
|
}
|
|
|