From 137fb8ea6af2789b3238b22bac31d80bced41dfe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 28 七月 2021 11:39:39 +0800
Subject: [PATCH] 2021-07-28

---
 src/components/editor/index.jsx |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/components/editor/index.jsx b/src/components/editor/index.jsx
index a94d12e..3cfc203 100644
--- a/src/components/editor/index.jsx
+++ b/src/components/editor/index.jsx
@@ -23,8 +23,8 @@
 
 class NormalEditor extends Component {
   static propTpyes = {
-    Item: PropTypes.object,     // 琛ㄥ崟鍏冪礌
-    onChange: PropTypes.func,   // 琛ㄥ崟鏇存柊
+    config: PropTypes.object,
+    onChange: PropTypes.func
   }
 
   state = {
@@ -33,16 +33,17 @@
   }
 
   UNSAFE_componentWillMount () {
+    const { config, defaultValue } = this.props
     let initVal = null
     let encryption = 'false'
 
-    if (this.props['data-__meta']) {
-      initVal = this.props['data-__meta'].initialValue || null
-    } else if (this.props.defaultValue) {
-      initVal = this.props.defaultValue || null
+    if (config && config.initval) {
+      initVal = config.initval
+    } else if (defaultValue) {
+      initVal = defaultValue
     }
 
-    if (this.props.Item && this.props.Item.encryption === 'true') {
+    if (config && config.encryption === 'true') {
       encryption = 'true'
       if (initVal) {
         try {
@@ -92,6 +93,7 @@
     form.append('fileExt', params.file.fileType)
     form.append('shardingCnt', _param.chunks)
     form.append('shardingNo', _param.chunk)
+    form.append('LoginUID', sessionStorage.getItem('LoginUID') || '')
 
     Api.getLargeFileUpload(form).then(res => {
       if (res.status) {

--
Gitblit v1.8.0