From e543372cc70a19ff2630c79d8421c2c593e54e5f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 02 六月 2021 17:15:21 +0800
Subject: [PATCH] 2021-06-02

---
 src/menu/components/share/sourcecomponent/index.jsx |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/share/sourcecomponent/index.jsx b/src/menu/components/share/sourcecomponent/index.jsx
index a5ed3e6..d59dfc1 100644
--- a/src/menu/components/share/sourcecomponent/index.jsx
+++ b/src/menu/components/share/sourcecomponent/index.jsx
@@ -14,12 +14,23 @@
   }
 
   state = {
-    url: this.props.value,
+    url: '',
     visible: ''
   }
 
   UNSAFE_componentWillMount () {
+    const { value } = this.props
+    let val = ''
 
+    if (value) {
+      val = value
+    } else if (this.props['data-__meta']) {
+      val = this.props['data-__meta'].initialValue || ''
+    }
+
+    this.setState({
+      url: val,
+    })
   }
 
   shouldComponentUpdate (nextProps, nextState) {

--
Gitblit v1.8.0