From e9c48bd7356462ba9257540b130a47a65ad1861d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 26 八月 2021 17:17:11 +0800 Subject: [PATCH] 2021-08-26 --- src/tabviews/custom/components/group/normal-group/index.jsx | 28 +++++++++++++++++++++------- 1 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/tabviews/custom/components/group/normal-group/index.jsx b/src/tabviews/custom/components/group/normal-group/index.jsx index 0ffbce3..05c8ba6 100644 --- a/src/tabviews/custom/components/group/normal-group/index.jsx +++ b/src/tabviews/custom/components/group/normal-group/index.jsx @@ -25,9 +25,11 @@ const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor')) const SandBox = asyncComponent(() => import('@/tabviews/custom/components/code/sand-box')) const NormalForm = asyncComponent(() => import('@/tabviews/custom/components/form/normal-form')) +const TabForm = asyncComponent(() => import('@/tabviews/custom/components/form/tab-form')) const NormalTree = asyncComponent(() => import('@/tabviews/custom/components/tree/antd-tree')) const CarouselDataCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/data-card')) const CarouselPropCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/prop-card')) +const Balcony = asyncComponent(() => import('@/tabviews/custom/components/card/balcony')) class TabTransfer extends Component { static propTpyes = { @@ -90,7 +92,9 @@ UNSAFE_componentWillReceiveProps(nextProps) { if (nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) { - this.setState({mainSearch: fromJS(nextProps.mainSearch).toJS()}) + this.setState({mainSearch: null}, () => { + this.setState({mainSearch: fromJS(nextProps.mainSearch).toJS()}) + }) } } @@ -130,11 +134,9 @@ if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) return config.components.map(item => { - let _bid = '' - if (bids && item.setting && item.setting.supModule) { - _bid = bids[item.setting.supModule] || '' - } else if (!bids && BID && (!item.setting || !item.setting.supModule)) { - _bid = BID + let _bid = BID || '' + if (item.setting && item.setting.supModule) { + _bid = bids ? bids[item.setting.supModule] || '' : '' } if (item.type === 'bar' || item.type === 'line') { @@ -155,10 +157,16 @@ <AntvDashboard config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> </Col> ) - } else if (item.type === 'form') { + } else if (item.type === 'form' && item.subtype === 'stepform') { return ( <Col span={item.width} key={item.uuid}> <NormalForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> + </Col> + ) + } else if (item.type === 'form' && item.subtype === 'tabform') { + return ( + <Col span={item.width} key={item.uuid}> + <TabForm config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> </Col> ) } else if (item.type === 'scatter') { @@ -221,6 +229,12 @@ <SandBox config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} /> </Col> ) + } else if (item.type === 'balcony') { + return ( + <Col span={item.width} key={item.uuid}> + <Balcony config={item} data={data} BID={_bid} menuType={menuType} /> + </Col> + ) } else { return null } -- Gitblit v1.8.0