From cb9ade2afd2a367ad767bc605ab7086c695dd010 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 09 十二月 2022 15:53:32 +0800
Subject: [PATCH] 2022-12-09

---
 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