From 966ff7fb84181f0fa86a56569a8492453c3ae80a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 26 八月 2021 14:56:42 +0800 Subject: [PATCH] 2021-08-26 --- src/components/normalform/index.jsx | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/normalform/index.jsx b/src/components/normalform/index.jsx index 2c3dfea..de675fb 100644 --- a/src/components/normalform/index.jsx +++ b/src/components/normalform/index.jsx @@ -24,7 +24,7 @@ } shouldComponentUpdate (nextProps, nextState) { - return !is(fromJS(this.state), fromJS(nextState)) + return !is(fromJS(this.state), fromJS(nextState)) || !is(fromJS(this.props.children), fromJS(nextProps.children)) } trigger = () => { @@ -62,12 +62,12 @@ } render () { - const { title, width, children } = this.props + const { title, width, children, double } = this.props const { visible, dict, formlist } = this.state return ( - <div className="normal-form-wrap"> - <span onClick={this.trigger}>{children}</span> + <> + {!double ? <span onClick={this.trigger}>{children}</span> : <span onDoubleClick={this.trigger}>{children}</span>} <Modal wrapClassName="popview-modal" title={title} @@ -85,7 +85,7 @@ wrappedComponentRef={(inst) => this.Ref = inst} /> </Modal> - </div> + </> ) } } -- Gitblit v1.8.0