From c98e45bfac25e9110ad0383faac54a54d98ea9d5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 18 十一月 2021 20:47:04 +0800 Subject: [PATCH] 2021-11-18 --- src/menu/components/chart/antv-dashboard/index.jsx | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/menu/components/chart/antv-dashboard/index.jsx b/src/menu/components/chart/antv-dashboard/index.jsx index 54f8e71..58f608b 100644 --- a/src/menu/components/chart/antv-dashboard/index.jsx +++ b/src/menu/components/chart/antv-dashboard/index.jsx @@ -234,7 +234,7 @@ const chart = new Chart({ container: card.uuid + 'dashboard', autoFit: true, - height: plot.title ? plot.height - 45 : plot.height, + height: this.wrap.offsetHeight - 30, }) chart.data(data) @@ -333,7 +333,7 @@ const chart = new Chart({ container: card.uuid + 'dashboard', autoFit: true, - height: plot.title ? plot.height - 45 : plot.height, + height: this.wrap.offsetHeight - 30, padding: [0, 0, 0, 0], }) chart.data(data) @@ -466,7 +466,7 @@ updateComponent = (component) => { const card = fromJS(this.state.card).toJS() - if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style))) { + if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style)) || !is(fromJS(component.search), fromJS(card.search))) { let _element = document.getElementById(card.uuid + 'dashboard') if (_element) { _element.innerHTML = '' @@ -489,7 +489,7 @@ changeStyle = () => { const { card } = this.state - MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin'], card.style) + MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], card.style) } getStyle = (comIds, style) => { @@ -528,8 +528,8 @@ } trigger="hover"> <Icon type="tool" /> </Popover> - {card.plot.title ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null} - <div className="canvas" id={card.uuid + 'dashboard'}></div> + <NormalHeader hideSearch="true" config={card} updateComponent={this.updateComponent}/> + <div className="canvas" id={card.uuid + 'dashboard'} ref={ref => this.wrap = ref}></div> </div> ) } -- Gitblit v1.8.0