From b883ae5d7d46fc7a3503236f16a250c2264ea7c7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 29 九月 2022 17:45:25 +0800 Subject: [PATCH] 2022-09-29 --- src/menu/components/chart/chart-custom/index.jsx | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/menu/components/chart/chart-custom/index.jsx b/src/menu/components/chart/chart-custom/index.jsx index d82d9bf..b4ecf35 100644 --- a/src/menu/components/chart/chart-custom/index.jsx +++ b/src/menu/components/chart/chart-custom/index.jsx @@ -70,7 +70,6 @@ search: [], action: [], plot: _plot, - btnlog: [], } if (card.config) { @@ -100,7 +99,6 @@ } componentDidMount () { - MKEmitter.addListener('submitStyle', this.getStyle) MKEmitter.addListener('tabsChange', this.handleTabsChange) setTimeout(() => { this.viewrender() @@ -118,7 +116,6 @@ this.setState = () => { return } - MKEmitter.removeListener('submitStyle', this.getStyle) MKEmitter.removeListener('tabsChange', this.handleTabsChange) } @@ -236,15 +233,11 @@ changeStyle = () => { const { card } = this.state - MKEmitter.emit('changeStyle', [card.uuid], ['background', 'border', 'padding', 'margin', 'shadow'], card.style) + MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle) } - getStyle = (comIds, style) => { - const { card } = this.state - - if (comIds[0] !== card.uuid || comIds.length > 1) return - - let _card = {...card, style} + getStyle = (style) => { + let _card = {...this.state.card, style} this.updateComponent(_card) } -- Gitblit v1.8.0