From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 八月 2022 11:42:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/components/normalform/index.jsx | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/normalform/index.jsx b/src/components/normalform/index.jsx index 2c3dfea..5ef4c9d 100644 --- a/src/components/normalform/index.jsx +++ b/src/components/normalform/index.jsx @@ -6,7 +6,6 @@ import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import ModalForm from './modalform' -import './index.scss' class NormalFormComponent extends Component { static propTpyes = { @@ -24,7 +23,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 +61,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 +84,7 @@ wrappedComponentRef={(inst) => this.Ref = inst} /> </Modal> - </div> + </> ) } } -- Gitblit v1.8.0