Merge branch 'feat/vision-polyfill-icon' into 'feat/0.16.10'

Feat/vision polyfill icon



See merge request !1382183
This commit is contained in:
力皓 2021-09-01 10:40:30 +08:00
commit c6cd178f4c
2 changed files with 7 additions and 1 deletions

View File

@ -61,7 +61,7 @@ export class Title extends Component<{ title: TitleContent; className?: string;
onClick={this.handleClick}
>
{icon ? <b className="lc-title-icon">{icon}</b> : null}
{title.label ? intl(title.label) : null}
{title.label ? <span className="lc-title-txt">{intl(title.label)}</span> : null}
{tip}
</span>
);

View File

@ -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 {