Merge branch 'hotfix/mainarea-change-error' into 'release/0.9.1'

Hotfix/mainarea change error

画布快速切换是,重新初始化导致 designer iframe 未加载导致报错

See merge request !912954
This commit is contained in:
康为 2020-07-30 12:59:46 +08:00
commit c1539a1086
2 changed files with 18 additions and 11 deletions

View File

@ -0,0 +1,8 @@
.lc-widget-view-container {
height: 100%;
width: 100%;
&.hidden {
display: none;
}
}

View File

@ -2,13 +2,15 @@ import { Component, ReactElement } from 'react';
import { Icon } from '@alifd/next';
import classNames from 'classnames';
import { Title, observer, Tip, globalContext, Editor } from '@ali/lowcode-editor-core';
import { DockProps } from '../types';
import PanelDock from '../widget/panel-dock';
import { composeTitle } from '../widget/utils';
import WidgetContainer from '../widget/widget-container';
import Panel from '../widget/panel';
import { IWidget } from '../widget/widget';
import { SkeletonEvents } from '../skeleton';
import { DockProps } from '../../types';
import PanelDock from '../../widget/panel-dock';
import { composeTitle } from '../../widget/utils';
import WidgetContainer from '../../widget/widget-container';
import Panel from '../../widget/panel';
import { IWidget } from '../../widget/widget';
import { SkeletonEvents } from '../../skeleton';
import './index.less';
export function DockView({ title, icon, description, size, className, onClick }: DockProps) {
return (
@ -262,9 +264,6 @@ export class WidgetView extends Component<{ widget: IWidget }> {
}
render() {
const { widget } = this.props;
if (!widget.visible) {
return null;
}
return widget.body;
return <div className={classNames('lc-widget-view-container', { hidden: !widget.visible })}>{widget.body}</div>;
}
}