From 5ec0f02101cb4255c6398856bbf17a2a0b2c9a7e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 14 十一月 2022 17:33:55 +0800 Subject: [PATCH] 2022-11-14 --- src/components/normalform/modalform/styleInput/index.jsx | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/normalform/modalform/styleInput/index.jsx b/src/components/normalform/modalform/styleInput/index.jsx index 3925b2a..c6d6b45 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) { -- Gitblit v1.8.0