|
|
@@ -49,8 +49,12 @@ class DashboardDesigner extends React.Component {
|
|
|
|
|
|
render() {
|
|
|
const { dashboardDesigner, isShareView, isShareKeyView, isViewMode, afterRefresh } = this.props;
|
|
|
- const { loading } = dashboardDesigner;
|
|
|
- return <Layout className='layout-dashboarddesigner'>
|
|
|
+ const { code, loading } = dashboardDesigner;
|
|
|
+
|
|
|
+ return <Layout
|
|
|
+ key={code} // 这个key值很重要,因为不同报表中可能引用相同的图表,如果不在报表这一级加上key值区分的话,会造成首页展示切换不同报表时图表位置错误的问题
|
|
|
+ className='layout-dashboarddesigner'
|
|
|
+ >
|
|
|
{!isShareView && !isShareKeyView && !isViewMode && <Header>
|
|
|
<DashboardDesignerHeader />
|
|
|
</Header>}
|