mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 05:48:17 +00:00
fix: 🐛 mainArea 画布切换,MainArea 重新初始化导致 iframe 初始化报错
This commit is contained in:
parent
8a701c0c0d
commit
5054d06a37
@ -0,0 +1,8 @@
|
|||||||
|
.lc-widget-view-container {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
&.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,13 +2,15 @@ import { Component, ReactElement } from 'react';
|
|||||||
import { Icon } from '@alifd/next';
|
import { Icon } from '@alifd/next';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { Title, observer, Tip, globalContext, Editor } from '@ali/lowcode-editor-core';
|
import { Title, observer, Tip, globalContext, Editor } from '@ali/lowcode-editor-core';
|
||||||
import { DockProps } from '../types';
|
import { DockProps } from '../../types';
|
||||||
import PanelDock from '../widget/panel-dock';
|
import PanelDock from '../../widget/panel-dock';
|
||||||
import { composeTitle } from '../widget/utils';
|
import { composeTitle } from '../../widget/utils';
|
||||||
import WidgetContainer from '../widget/widget-container';
|
import WidgetContainer from '../../widget/widget-container';
|
||||||
import Panel from '../widget/panel';
|
import Panel from '../../widget/panel';
|
||||||
import { IWidget } from '../widget/widget';
|
import { IWidget } from '../../widget/widget';
|
||||||
import { SkeletonEvents } from '../skeleton';
|
import { SkeletonEvents } from '../../skeleton';
|
||||||
|
|
||||||
|
import './index.less';
|
||||||
|
|
||||||
export function DockView({ title, icon, description, size, className, onClick }: DockProps) {
|
export function DockView({ title, icon, description, size, className, onClick }: DockProps) {
|
||||||
return (
|
return (
|
||||||
@ -262,9 +264,6 @@ export class WidgetView extends Component<{ widget: IWidget }> {
|
|||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
const { widget } = this.props;
|
const { widget } = this.props;
|
||||||
if (!widget.visible) {
|
return <div className={classNames('lc-widget-view-container', { hidden: !widget.visible })}>{widget.body}</div>;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return widget.body;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user