From 43398618f35eb084ed4eb4000bd2e082196cbf71 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 27 五月 2022 16:12:37 +0800 Subject: [PATCH] 错误信息收集&注释btnlog --- src/menu/components/module/voucher/index.jsx | 35 +++++++++-------------------------- 1 files changed, 9 insertions(+), 26 deletions(-) diff --git a/src/menu/components/module/voucher/index.jsx b/src/menu/components/module/voucher/index.jsx index e150d22..30d250f 100644 --- a/src/menu/components/module/voucher/index.jsx +++ b/src/menu/components/module/voucher/index.jsx @@ -49,11 +49,8 @@ columns: [], scripts: [], } - - this.setState({ - card: _card - }) - this.props.updateConfig(_card) + + this.updateComponent(_card) } else { this.setState({ card: fromJS(card).toJS() @@ -82,15 +79,15 @@ /** * @description 鍗$墖琛屽灞備俊鎭洿鏂帮紙鏁版嵁婧愶紝鏍峰紡绛夛級 */ - updateComponent = (component) => { + updateComponent = (card) => { + card.width = card.wrap.width + card.name = card.wrap.name + this.setState({ - card: component + card: card }) - component.width = component.wrap.width - component.name = component.wrap.name - - this.props.updateConfig(component) + this.props.updateConfig(card) } changeStyle = () => { @@ -105,22 +102,8 @@ if (comIds[0] !== card.uuid || comIds.length !== 1) return let _card = {...card, style} - - this.setState({ - card: _card - }) - this.props.updateConfig(_card) - } - - /** - * @description 鏇存柊鎼滅储鏉′欢閰嶇疆淇℃伅 - */ - updateconfig = (config) => { - this.setState({ - card: config - }) - this.props.updateConfig(config) + this.updateComponent(_card) } getWrapForms = () => { -- Gitblit v1.8.0