From 3b103caa6bfc9ed410e67156c3ca1785bf1cecc9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 19 八月 2022 01:15:31 +0800 Subject: [PATCH] 2022-08-19 --- src/menu/components/table/normal-table/columns/index.jsx | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx index d22150a..f22548c 100644 --- a/src/menu/components/table/normal-table/columns/index.jsx +++ b/src/menu/components/table/normal-table/columns/index.jsx @@ -377,13 +377,11 @@ editStyleCard: fromJS(col).toJS() }) - MKEmitter.emit('changeStyle', [col.uuid], ['font', 'padding'], col.style || {}) + MKEmitter.emit('changeStyle', ['font', 'padding'], col.style || {}, this.getStyle) } - getStyle = (comIds, style) => { + getStyle = (style) => { const { editStyleCard } = this.state - - if (!editStyleCard || comIds[0] !== editStyleCard.uuid || comIds.length !== 1) return let _card = {...editStyleCard, style} @@ -559,10 +557,6 @@ }) } - componentDidMount () { - MKEmitter.addListener('submitStyle', this.getStyle) - } - /** * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊锛屾竻闄ゅ揩鎹烽敭璁剧疆 */ @@ -570,7 +564,6 @@ this.setState = () => { return } - MKEmitter.removeListener('submitStyle', this.getStyle) } render() { -- Gitblit v1.8.0