mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-20 07:14:23 +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}
|
onClick={this.handleClick}
|
||||||
>
|
>
|
||||||
{icon ? <b className="lc-title-icon">{icon}</b> : null}
|
{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}
|
{tip}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { skeleton, editor } from '@ali/lowcode-engine';
|
import { skeleton, editor } from '@ali/lowcode-engine';
|
||||||
import { ReactElement } from 'react';
|
import { ReactElement } from 'react';
|
||||||
import { IWidgetBaseConfig } from '@ali/lowcode-editor-skeleton';
|
import { IWidgetBaseConfig } from '@ali/lowcode-editor-skeleton';
|
||||||
|
import { IconType } from '@ali/lowcode-types';
|
||||||
import { uniqueId } from '@ali/lowcode-utils';
|
import { uniqueId } from '@ali/lowcode-utils';
|
||||||
import bus from './bus';
|
import bus from './bus';
|
||||||
|
|
||||||
@ -50,6 +51,7 @@ export interface OldPaneConfig {
|
|||||||
canSetFixed?: boolean; // 是否可以设置固定模式
|
canSetFixed?: boolean; // 是否可以设置固定模式
|
||||||
defaultFixed?: boolean; // 是否默认固定
|
defaultFixed?: boolean; // 是否默认固定
|
||||||
enableDrag?: boolean;
|
enableDrag?: boolean;
|
||||||
|
icon?: IconType; // 支持旧vision pane传icon (menu是title, 并非icon)
|
||||||
}
|
}
|
||||||
|
|
||||||
function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: string } {
|
function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: string } {
|
||||||
@ -81,6 +83,7 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin
|
|||||||
height,
|
height,
|
||||||
maxHeight,
|
maxHeight,
|
||||||
menu,
|
menu,
|
||||||
|
icon,
|
||||||
isAction,
|
isAction,
|
||||||
canSetFixed,
|
canSetFixed,
|
||||||
defaultFixed,
|
defaultFixed,
|
||||||
@ -89,6 +92,9 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin
|
|||||||
if (menu) {
|
if (menu) {
|
||||||
newConfig.props.title = menu;
|
newConfig.props.title = menu;
|
||||||
}
|
}
|
||||||
|
if (icon) {
|
||||||
|
newConfig.props.icon = icon;
|
||||||
|
}
|
||||||
if (isAction) {
|
if (isAction) {
|
||||||
newConfig.type = 'Dock';
|
newConfig.type = 'Dock';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user