From ae46c8e640ed64abd7605b289554377e0cdc0cb7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 04 十月 2023 22:10:30 +0800 Subject: [PATCH] 2023-10-04 --- src/tabviews/custom/components/card/cardcellList/index.jsx | 22 +++++++++------------- 1 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index f87cb87..4661704 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -76,7 +76,7 @@ } shouldComponentUpdate (nextProps, nextState) { - return !is(fromJS(this.props.data), fromJS(nextProps.data)) || (nextProps.syncData && !is(fromJS(this.props.syncData), fromJS(nextProps.syncData))) + return !is(fromJS(this.props.data), fromJS(nextProps.data)) || (nextProps.syncData ? !is(fromJS(this.props.syncData), fromJS(nextProps.syncData)) : false) } /** @@ -543,7 +543,6 @@ } if (/\\n|\n/.test(val)) { - val = val + val val = val.replace(/(\\n|\n)$/, '') if (val) { @@ -775,9 +774,7 @@ let func = new Function('data', card.formula) val = func(_data) } catch (e) { - if (window.debugger) { - console.warn(e) - } + console.warn(e) val = '' } } else if (card.$sync) { @@ -795,10 +792,8 @@ // eslint-disable-next-line _val = eval(_val) } catch (e) { - if (window.debugger) { - console.info(_val) - console.warn(e) - } + console.info(_val) + console.warn(e) _val = 0 } } @@ -821,10 +816,8 @@ // eslint-disable-next-line _val = eval(_val) } catch (e) { - if (window.debugger) { - console.info(_val) - console.warn(e) - } + console.info(_val) + console.warn(e) _val = '' } } @@ -946,6 +939,9 @@ if (data.$$type === 'extendCard') { _data = data.$$selectedData || [] + if (card.Ot === 'notRequired' && _data.length === 0) { + _data = [data] + } } else if (card.$sync) { _data = this.props.syncData || [] } else if (data.$$empty) { -- Gitblit v1.8.0