From a22e66aaf35601ccb5ea4dacaea279ae62152ccc Mon Sep 17 00:00:00 2001 From: YJSON Date: Thu, 16 Jul 2020 12:59:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20use=20intl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor-preset-vision/src/bundle/prototype.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/editor-preset-vision/src/bundle/prototype.ts b/packages/editor-preset-vision/src/bundle/prototype.ts index 7e0dc857e..00cdeae29 100644 --- a/packages/editor-preset-vision/src/bundle/prototype.ts +++ b/packages/editor-preset-vision/src/bundle/prototype.ts @@ -15,7 +15,7 @@ import { upgradePropConfig, upgradeConfigure, } from './upgrade-metadata'; -import { globalLocale } from '@ali/lowcode-editor-core'; +import { intl } from '@ali/lowcode-editor-core'; import { designer } from '../editor'; import { uniqueId } from '@ali/lowcode-utils'; @@ -258,12 +258,8 @@ class Prototype { return this.meta.getMetadata().experimental?.context?.[name]; } - getTitle(currentLocale?: string) { - if (isI18nData(this.meta.title)) { - const locale = currentLocale || globalLocale.getLocale(); - return this.meta.title[locale] || this.meta.title; - } - return this.meta.title; + getTitle() { + return intl(this.meta.title); } getComponentName() {