mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-07 10:57:19 +00:00
fix: 🐛 use intl
This commit is contained in:
parent
e3ca0bd6cb
commit
a22e66aaf3
@ -15,7 +15,7 @@ import {
|
|||||||
upgradePropConfig,
|
upgradePropConfig,
|
||||||
upgradeConfigure,
|
upgradeConfigure,
|
||||||
} from './upgrade-metadata';
|
} from './upgrade-metadata';
|
||||||
import { globalLocale } from '@ali/lowcode-editor-core';
|
import { intl } from '@ali/lowcode-editor-core';
|
||||||
import { designer } from '../editor';
|
import { designer } from '../editor';
|
||||||
import { uniqueId } from '@ali/lowcode-utils';
|
import { uniqueId } from '@ali/lowcode-utils';
|
||||||
|
|
||||||
@ -258,12 +258,8 @@ class Prototype {
|
|||||||
return this.meta.getMetadata().experimental?.context?.[name];
|
return this.meta.getMetadata().experimental?.context?.[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
getTitle(currentLocale?: string) {
|
getTitle() {
|
||||||
if (isI18nData(this.meta.title)) {
|
return intl(this.meta.title);
|
||||||
const locale = currentLocale || globalLocale.getLocale();
|
|
||||||
return this.meta.title[locale] || this.meta.title;
|
|
||||||
}
|
|
||||||
return this.meta.title;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getComponentName() {
|
getComponentName() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user