From 0f22c04237fbe746887feafafca36d5cf996d0e0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 26 九月 2021 18:28:26 +0800 Subject: [PATCH] 2021-09-26 --- src/tabviews/custom/components/card/prop-card/index.jsx | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index bc19ece..848a7f6 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -31,11 +31,11 @@ sync: false, // 鏄惁缁熶竴璇锋眰鏁版嵁 data: {}, // 鏁版嵁 timer: null, // 瀹氭椂鍣ㄦ椂闂撮棿闅� - BData: null + BData: '' } UNSAFE_componentWillMount () { - const { data, initdata, BID } = this.props + const { data, initdata, BID, BData } = this.props let _config = fromJS(this.props.config).toJS() let _cols = new Map() @@ -64,6 +64,7 @@ if (_data) { _data.$$BID = BID || '' + _data.$$BData = BData || '' } _config.columns.forEach(item => { @@ -116,6 +117,7 @@ sync: _sync, data: _data, BID: BID || '', + BData: BData || '', config: _config, arr_field: _config.columns.map(col => col.field).join(','), }, () => { @@ -150,7 +152,7 @@ * @description 鍥捐〃鏁版嵁鏇存柊锛屽埛鏂板唴瀹� */ UNSAFE_componentWillReceiveProps (nextProps) { - const { sync, config, BID } = this.state + const { sync, config, BID, BData } = this.state if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) { let _data = {} @@ -163,6 +165,7 @@ if (_data) { _data.$$BID = BID || '' + _data.$$BData = BData || '' } this.setState({sync: false, data: _data}) -- Gitblit v1.8.0