From d5c3340757ae00a2ad617c4241dfd3792f36e036 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 14 十二月 2020 18:23:42 +0800 Subject: [PATCH] 2020-12-14 --- src/menu/components/chart/antv-pie/index.jsx | 32 +++++--------------------------- 1 files changed, 5 insertions(+), 27 deletions(-) diff --git a/src/menu/components/chart/antv-pie/index.jsx b/src/menu/components/chart/antv-pie/index.jsx index e65d64a..c210c31 100644 --- a/src/menu/components/chart/antv-pie/index.jsx +++ b/src/menu/components/chart/antv-pie/index.jsx @@ -16,8 +16,8 @@ import './index.scss' const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) -const SearchComponent = asyncComponent(() => import('@/menu/searchcomponent')) const ChartCompileForm = asyncIconComponent(() => import('./chartcompile')) +const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader')) class antvBarLineChart extends Component { static propTpyes = { @@ -66,7 +66,7 @@ borderWidth: '1px', borderColor: 'rgb(217, 217, 217)', marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px' }, - headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: 'rgb(217, 217, 217)' }, + headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, columns: [], scripts: [], search: [], @@ -374,12 +374,6 @@ MKEmitter.emit('addSearch', card.uuid, newcard) } - changeTitleStyle = () => { - const { card } = this.state - - MKEmitter.emit('changeStyle', [card.uuid, 'header'], ['font', 'border'], card.headerStyle) - } - changeStyle = () => { const { card } = this.state @@ -389,16 +383,9 @@ getStyle = (comIds, style) => { const { card } = this.state - if (comIds[0] !== card.uuid) return + if (comIds[0] !== card.uuid || comIds.length > 1) return - let _card = {} - if (comIds.length === 1) { - _card = {...card, style} - } else if (comIds.length === 2 && comIds[1] === 'header') { - _card = {...card, headerStyle: style} - } else { - return - } + let _card = {...card, style} this.setState({ card: _card @@ -413,16 +400,7 @@ return ( <div className="menu-pie-chart-edit-box" style={{...card.style, height: card.plot.height || 400}}> - <div className="chart-header" style={card.headerStyle}> - <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ - <div className="mk-popover-control"> - <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeTitleStyle} type="font-colors" /> - </div> - } trigger="hover"> - <span className="chart-title">{card.plot.title || ''}</span> - </Popover> - <SearchComponent config={card} updatesearch={this.updateComponent}/> - </div> + <NormalHeader config={card} updateComponent={this.updateComponent}/> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> {menu && menu.MenuType !== 'billPrint' ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null} -- Gitblit v1.8.0