1
0
forked from dyf/dyf-vue-ui

多租户平台

This commit is contained in:
2025-06-26 15:29:07 +08:00
commit 796acccf16
355 changed files with 27974 additions and 0 deletions

16
src/utils/i18n.ts Normal file
View File

@ -0,0 +1,16 @@
// translate router.meta.title, be used in breadcrumb sidebar tagsview
import i18n from '@/lang/index';
/**
* 获取国际化路由,如果不存在则原生返回
* @param title 路由名称
* @returns {string}
*/
export const translateRouteTitle = (title: string): string => {
const hasKey = i18n.global.te('route.' + title);
if (hasKey) {
const translatedTitle = i18n.global.t('route.' + title);
return translatedTitle;
}
return title;
};