mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
Merge branch 'preset-vision/0.9.0' of gitlab.alibaba-inc.com:ali-lowcode/ali-lowcode-engine into preset-vision/0.9.0
This commit is contained in:
commit
59e5912611
@ -27,7 +27,7 @@ function HelpTip({ tip }: any) {
|
||||
return (
|
||||
<div>
|
||||
<a href={tip.url} target="_blank" rel="noopener noreferrer">
|
||||
<Icon type="help" size="small" className="lc-help-tip"/>
|
||||
<Icon type="help" size="small" className="lc-help-tip" />
|
||||
</a>
|
||||
<Tip>{tip.content}</Tip>
|
||||
</div>
|
||||
@ -35,10 +35,10 @@ function HelpTip({ tip }: any) {
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<Icon type="help" size="small" className="lc-help-tip"/>
|
||||
<Icon type="help" size="small" className="lc-help-tip" />
|
||||
<Tip>{tip.content}</Tip>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@observer
|
||||
@ -49,7 +49,7 @@ export class PanelDockView extends Component<DockProps & { dock: PanelDock }> {
|
||||
componentDidUpdate() {
|
||||
this.checkActived();
|
||||
}
|
||||
private lastActived: boolean = false;
|
||||
private lastActived = false;
|
||||
checkActived() {
|
||||
const { dock } = this.props;
|
||||
if (dock.actived !== this.lastActived) {
|
||||
@ -77,12 +77,10 @@ export class PanelDockView extends Component<DockProps & { dock: PanelDock }> {
|
||||
}
|
||||
}
|
||||
|
||||
export class DialogDockView extends Component {
|
||||
|
||||
}
|
||||
export class DialogDockView extends Component {}
|
||||
|
||||
@observer
|
||||
export class TitledPanelView extends Component<{ panel: Panel }> {
|
||||
export class TitledPanelView extends Component<{ panel: Panel; area?: string }> {
|
||||
shouldComponentUpdate() {
|
||||
return false;
|
||||
}
|
||||
@ -92,7 +90,7 @@ export class TitledPanelView extends Component<{ panel: Panel }> {
|
||||
componentDidUpdate() {
|
||||
this.checkVisible();
|
||||
}
|
||||
private lastVisible: boolean = false;
|
||||
private lastVisible = false;
|
||||
checkVisible() {
|
||||
const { panel } = this.props;
|
||||
const currentVisible = panel.inited && panel.visible;
|
||||
@ -106,14 +104,17 @@ export class TitledPanelView extends Component<{ panel: Panel }> {
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const { panel } = this.props;
|
||||
const { panel, area } = this.props;
|
||||
if (!panel.inited) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<div className={classNames('lc-titled-panel', {
|
||||
hidden: !panel.visible,
|
||||
})}>
|
||||
<div
|
||||
className={classNames('lc-titled-panel', {
|
||||
hidden: !panel.visible,
|
||||
})}
|
||||
id={`${area || ''}-${panel.name}`}
|
||||
>
|
||||
<PanelTitle panel={panel} />
|
||||
<div className="lc-panel-body">{panel.body}</div>
|
||||
</div>
|
||||
@ -122,7 +123,7 @@ export class TitledPanelView extends Component<{ panel: Panel }> {
|
||||
}
|
||||
|
||||
@observer
|
||||
export class PanelView extends Component<{ panel: Panel }> {
|
||||
export class PanelView extends Component<{ panel: Panel; area?: string }> {
|
||||
shouldComponentUpdate() {
|
||||
return false;
|
||||
}
|
||||
@ -132,7 +133,7 @@ export class PanelView extends Component<{ panel: Panel }> {
|
||||
componentDidUpdate() {
|
||||
this.checkVisible();
|
||||
}
|
||||
private lastVisible: boolean = false;
|
||||
private lastVisible = false;
|
||||
checkVisible() {
|
||||
const { panel } = this.props;
|
||||
const currentVisible = panel.inited && panel.visible;
|
||||
@ -150,7 +151,7 @@ export class PanelView extends Component<{ panel: Panel }> {
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const { panel } = this.props;
|
||||
const { panel, area } = this.props;
|
||||
if (!panel.inited) {
|
||||
return null;
|
||||
}
|
||||
@ -159,6 +160,7 @@ export class PanelView extends Component<{ panel: Panel }> {
|
||||
className={classNames('lc-panel', {
|
||||
hidden: !panel.visible,
|
||||
})}
|
||||
id={`${area || ''}-${panel.name}`}
|
||||
>
|
||||
{panel.body}
|
||||
</div>
|
||||
@ -233,7 +235,7 @@ export class WidgetView extends Component<{ widget: IWidget }> {
|
||||
componentDidUpdate() {
|
||||
this.checkVisible();
|
||||
}
|
||||
private lastVisible: boolean = false;
|
||||
private lastVisible = false;
|
||||
checkVisible() {
|
||||
const { widget } = this.props;
|
||||
const currentVisible = widget.visible;
|
||||
|
||||
@ -25,19 +25,17 @@ export default class LeftFixedPane extends Component<{ area: Area<PanelConfig, P
|
||||
'lc-area-visible': area.visible,
|
||||
})}
|
||||
>
|
||||
{
|
||||
!hideTitleBar && (
|
||||
<Button
|
||||
text
|
||||
className="lc-pane-close"
|
||||
onClick={() => {
|
||||
area.setVisible(false);
|
||||
}}
|
||||
>
|
||||
<Icon type="close" />
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
{!hideTitleBar && (
|
||||
<Button
|
||||
text
|
||||
className="lc-pane-close"
|
||||
onClick={() => {
|
||||
area.setVisible(false);
|
||||
}}
|
||||
>
|
||||
<Icon type="close" />
|
||||
</Button>
|
||||
)}
|
||||
<Contents area={area} />
|
||||
</div>
|
||||
);
|
||||
@ -51,10 +49,6 @@ class Contents extends Component<{ area: Area<PanelConfig, Panel> }> {
|
||||
}
|
||||
render() {
|
||||
const { area } = this.props;
|
||||
return (
|
||||
<Fragment>
|
||||
{area.container.items.map((panel) => panel.content)}
|
||||
</Fragment>
|
||||
);
|
||||
return <Fragment>{area.container.items.map((panel) => panel.content)}</Fragment>;
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,9 +57,10 @@ export default class Panel implements IWidget {
|
||||
return createElement(PanelView, {
|
||||
panel: this,
|
||||
key: this.id,
|
||||
area: this.parent?.name,
|
||||
});
|
||||
}
|
||||
return createElement(TitledPanelView, { panel: this, key: this.id });
|
||||
return createElement(TitledPanelView, { panel: this, key: this.id, area: this.parent?.name });
|
||||
}
|
||||
|
||||
readonly title: TitleContent;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user