From df0328ddb15d799a65b75df0862edd0f84fb7fee Mon Sep 17 00:00:00 2001 From: "siyue.ld" Date: Sat, 28 Aug 2021 17:15:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20vision=20polyfill=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0icon=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/vision-polyfill/src/panes.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/vision-polyfill/src/panes.ts b/packages/vision-polyfill/src/panes.ts index 47fc38742..0ace2bda1 100644 --- a/packages/vision-polyfill/src/panes.ts +++ b/packages/vision-polyfill/src/panes.ts @@ -1,6 +1,7 @@ import { skeleton, editor } from '@ali/lowcode-engine'; import { ReactElement } from 'react'; import { IWidgetBaseConfig } from '@ali/lowcode-editor-skeleton'; +import { IconType } from '@ali/lowcode-types'; import { uniqueId } from '@ali/lowcode-utils'; import bus from './bus'; @@ -50,6 +51,7 @@ export interface OldPaneConfig { canSetFixed?: boolean; // 是否可以设置固定模式 defaultFixed?: boolean; // 是否默认固定 enableDrag?: boolean; + icon?: IconType; // 支持旧vision pane传icon (menu是title, 并非icon) } function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: string } { @@ -81,6 +83,7 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin height, maxHeight, menu, + icon, isAction, canSetFixed, defaultFixed, @@ -89,6 +92,9 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin if (menu) { newConfig.props.title = menu; } + if (icon) { + newConfig.props.icon = icon; + } if (isAction) { newConfig.type = 'Dock'; } else { From 8a5b8e656801b0db7331cdbeb62243b0019f4c38 Mon Sep 17 00:00:00 2001 From: "siyue.ld" Date: Mon, 30 Aug 2021 09:59:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20title=E6=96=87=E6=9C=AC=E5=8C=85?= =?UTF-8?q?=E4=B8=80=E5=B1=82=EF=BC=8C=E6=96=B9=E4=BE=BF=E5=A4=96=E9=83=A8?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor-core/src/widgets/title/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor-core/src/widgets/title/index.tsx b/packages/editor-core/src/widgets/title/index.tsx index 6374eb2ab..ddbf923cd 100644 --- a/packages/editor-core/src/widgets/title/index.tsx +++ b/packages/editor-core/src/widgets/title/index.tsx @@ -61,7 +61,7 @@ export class Title extends Component<{ title: TitleContent; className?: string; onClick={this.handleClick} > {icon ? {icon} : null} - {title.label ? intl(title.label) : null} + {title.label ? {intl(title.label)} : null} {tip} );