From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 26 四月 2022 19:23:18 +0800 Subject: [PATCH] 2022-04-26 --- src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx index b83a695..2184ac3 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -323,7 +323,9 @@ transfield }, () => { if (config.setting.sync !== 'true' && config.setting.onload === 'true') { - this.loadData() + setTimeout(() => { + this.loadData() + }, _config.setting.delay || 0) } else if (config.setting.sync === 'true' && _data) { this.handleData() } @@ -439,16 +441,23 @@ if (config.uuid !== menuId) return - this.loadData() // 鏁版嵁鍒锋柊 + let supModule = config.setting.supModule - if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) { - MKEmitter.emit('reloadData', btn.syncComponentId) // 鍚岀骇鏍囩鍒锋柊 + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) + + if (!btn.syncComponentId || btn.syncComponentId !== supModule) { + if (position === 'mainline' || position === 'popclose') { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠� + if (supModule && BID) { + MKEmitter.emit('reloadData', supModule, BID) + } else { + this.loadData() + } + } else { + this.loadData() + } } - if (position === 'mainline' && config.setting.supModule) { // 涓昏〃琛屽埛鏂� - MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) - } else if (position === 'popclose') { // 鏍囩鍏抽棴鍒锋柊 - config.setting.supModule && MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty')) + if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) } } @@ -1763,8 +1772,16 @@ render() { const { config, loading, empty, BID } = this.state + let style = {...config.style} + if (empty && config.plot.empty === 'hidden') { + style.opacity = 0 + style.position = 'absolute' + style.zIndex = -1 + style.width = '100%' + } + return ( - <div className="custom-line-chart-plot-box" style={config.style}> + <div className="custom-line-chart-plot-box" style={style}> {loading ? <div className="loading-mask"> <div className="ant-spin-blur"></div> -- Gitblit v1.8.0