From f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 十一月 2022 16:11:55 +0800 Subject: [PATCH] 2022-11-21 --- 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