From 866db6d8afa6980fd485570acda6b5fcebda4da3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 01 七月 2024 16:08:27 +0800
Subject: [PATCH] 2024-07-01

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

diff --git a/src/menu/components/share/sourcecomponent/index.jsx b/src/menu/components/share/sourcecomponent/index.jsx
index e6657c0..fe17598 100644
--- a/src/menu/components/share/sourcecomponent/index.jsx
+++ b/src/menu/components/share/sourcecomponent/index.jsx
@@ -20,11 +20,13 @@
   }
 
   UNSAFE_componentWillMount () {
-    const { value } = this.props
+    const { value, initialValue } = this.props
     let val = ''
 
     if (value) {
       val = value
+    } else if (initialValue) {
+      val = initialValue
     } else if (this.props['data-__meta']) {
       val = this.props['data-__meta'].initialValue || ''
     }
@@ -35,7 +37,7 @@
   }
 
   shouldComponentUpdate (nextProps, nextState) {
-    return !is(fromJS(this.state), fromJS(nextState))
+    return !is(fromJS(this.state), fromJS(nextState)) || nextProps.type !== this.props.type
   }
 
   deleteUrl = () => {
@@ -76,7 +78,7 @@
           <DeleteOutlined title="鍒犻櫎鏂囦欢" onClick={this.deleteUrl}/>
         </div> : null}
         {url && type !== 'video' && url !== '@icon@' ? <div className="mk-source-item-info picture">
-          <img src={url} alt="" />
+          <img src={url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)} alt="" />
           <a target="_blank" rel="noopener noreferrer" href={url}>{name}</a>
           <DeleteOutlined title="鍒犻櫎鏂囦欢" onClick={this.deleteUrl}/>
         </div> : null}
@@ -86,7 +88,7 @@
         </div> : null}
         <Modal
           visible={!!visible}
-          width={visible !== 'system' ? 600 : 1000}
+          width={visible !== 'system' ? 650 : 1000}
           closable={false}
           maskClosable={false}
           okText="纭畾"

--
Gitblit v1.8.0