mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 17:08:14 +00:00
Merge branch 'feat/vision-polyfill-icon' into 'feat/0.16.10'
Feat/vision polyfill icon See merge request !1382183
This commit is contained in:
commit
c6cd178f4c
@ -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>
|
||||
);
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user