mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-23 17:31:11 +01:00
13 lines
339 B
JavaScript
13 lines
339 B
JavaScript
// 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
|
|
}
|