生产监控前端
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.

13 lines
403 B

2 years ago
// translate router.meta.title, be used in breadcrumb sidebar tagsview
import i18n from '@/lang/index';
export function translateRouteTitleI18n(title: any) {
// 判断是否存在国际化配置,如果没有原生返回
const hasKey = i18n.global.te('route.' + title);
if (hasKey) {
const translatedTitle = i18n.global.t('route.' + title);
return translatedTitle;
}
return title;
}