From cc1a76df575c18f0d0ee96e8658461efdce3a918 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 17 一月 2023 18:01:01 +0800 Subject: [PATCH] 2023-01-17 --- src/components/normalform/modalform/styleInput/index.jsx | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/normalform/modalform/styleInput/index.jsx b/src/components/normalform/modalform/styleInput/index.jsx index 3925b2a..f372a4a 100644 --- a/src/components/normalform/modalform/styleInput/index.jsx +++ b/src/components/normalform/modalform/styleInput/index.jsx @@ -23,11 +23,11 @@ UNSAFE_componentWillMount () { const { config } = this.props - let val = config.initval || '' + let val = config.initval || config.initVal || '' let options = config.options || ['px', 'vh', 'vw', '%'] let unit = options[0] - if (val) { + if (val && typeof(val) === 'string') { if (val.indexOf('px') > -1) { unit = 'px' } else if (val.indexOf('%') > -1) { @@ -128,7 +128,7 @@ const { value, options, unit } = this.state return ( - <div className="style-input-wrap"> + <div className="mk-style-input-wrap"> <Input value={value} addonAfter={ options.length > 1 ? <Select value={unit} onChange={this.changeUnit}> -- Gitblit v1.8.0