From 3d4bc79a80eb9cff0f8ef7c53f9685c9ff9fbd2d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 02 九月 2021 23:17:36 +0800
Subject: [PATCH] 2021-09-02

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

diff --git a/src/menu/components/share/sourcecomponent/index.jsx b/src/menu/components/share/sourcecomponent/index.jsx
index a5ed3e6..569fc8d 100644
--- a/src/menu/components/share/sourcecomponent/index.jsx
+++ b/src/menu/components/share/sourcecomponent/index.jsx
@@ -6,7 +6,7 @@
 import InputForm from './inputform'
 import './index.scss'
 
-class CopyComponent extends Component {
+class SourceComponent extends Component {
   static propTpyes = {
     type: PropTypes.string,
     placement: PropTypes.any,
@@ -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) {
@@ -67,6 +78,8 @@
           width={visible !== 'system' ? 600 : 1000}
           closable={false}
           maskClosable={false}
+          okText="纭畾"
+          cancelText="鍙栨秷"
           onOk={this.popSubmit}
           onCancel={() => {this.setState({visible: ''})}}
           destroyOnClose
@@ -78,4 +91,4 @@
   }
 }
 
-export default CopyComponent
\ No newline at end of file
+export default SourceComponent
\ No newline at end of file

--
Gitblit v1.8.0