mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-20 15:38:32 +00:00
Merge branch 'polyfill/vision' of gitlab.alibaba-inc.com:ali-lowcode/ali-lowcode-engine into polyfill/vision
This commit is contained in:
commit
a6b699ebd3
@ -126,7 +126,11 @@ export default class Panel implements IWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
active(item?: Panel | string | null) {
|
active(item?: Panel | string | null) {
|
||||||
|
if (item) {
|
||||||
this.container?.active(item);
|
this.container?.active(item);
|
||||||
|
} else {
|
||||||
|
this.setActive(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getName() {
|
getName() {
|
||||||
|
|||||||
@ -69,17 +69,7 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin
|
|||||||
newConfig.type = 'PanelDock';
|
newConfig.type = 'PanelDock';
|
||||||
newConfig.area = 'left';
|
newConfig.area = 'left';
|
||||||
newConfig.props.description = description || title;
|
newConfig.props.description = description || title;
|
||||||
const {
|
const { contents, hideTitleBar, tip, width, maxWidth, height, maxHeight, menu, isAction } = config;
|
||||||
contents,
|
|
||||||
hideTitleBar,
|
|
||||||
tip,
|
|
||||||
width,
|
|
||||||
maxWidth,
|
|
||||||
height,
|
|
||||||
maxHeight,
|
|
||||||
menu,
|
|
||||||
isAction
|
|
||||||
} = config;
|
|
||||||
if (menu) {
|
if (menu) {
|
||||||
newConfig.props.title = menu;
|
newConfig.props.title = menu;
|
||||||
}
|
}
|
||||||
@ -97,14 +87,14 @@ function upgradeConfig(config: OldPaneConfig): IWidgetBaseConfig & { area: strin
|
|||||||
if (contents && Array.isArray(contents)) {
|
if (contents && Array.isArray(contents)) {
|
||||||
newConfig.content = contents.map(({ title, content, tip }) => {
|
newConfig.content = contents.map(({ title, content, tip }) => {
|
||||||
return {
|
return {
|
||||||
type: "Panel",
|
type: 'Panel',
|
||||||
name: title,
|
name: title,
|
||||||
content,
|
content,
|
||||||
props: {
|
props: {
|
||||||
title,
|
title,
|
||||||
help: tip,
|
help: tip,
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -163,7 +153,11 @@ const dockPane = Object.assign(skeleton.leftArea, {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const name = item.name || item;
|
const name = item.name || item;
|
||||||
skeleton.getPanel(name)?.active();
|
const pane = skeleton.getPanel(name);
|
||||||
|
if (!pane) {
|
||||||
|
console.warn(`Could not find pane with name ${name}`);
|
||||||
|
}
|
||||||
|
pane?.active();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user