From afb39f8ab004b2607bb718edab02e99c7a010114 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 22 三月 2023 14:36:44 +0800
Subject: [PATCH] 2023-03-22

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

diff --git a/src/menu/components/share/pastecomponent/index.jsx b/src/menu/components/share/pastecomponent/index.jsx
index cb1bb7b..477e3e0 100644
--- a/src/menu/components/share/pastecomponent/index.jsx
+++ b/src/menu/components/share/pastecomponent/index.jsx
@@ -21,10 +21,6 @@
     visible: false
   }
 
-  handleMenuClick = () => {
-    this.setState({visible: true})
-  }
-
   resetconfig = (item, config) => {
     let _uuid = Utils.getuuid()
 
@@ -116,9 +112,14 @@
   pasteSubmit = () => {
     const { options } = this.props
     this.pasteFormRef.handleConfirm().then(res => {
-
       if (!options.includes(res.copyType)) {
         notification.warning({ top: 92, message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�', duration: 5 })
+        return
+      }
+
+      if (!this.props.config) {
+        this.props.updateConfig(res)
+        this.setState({visible: false})
         return
       }
 
@@ -181,7 +182,7 @@
         })
       }
 
-      this.props.updateConfig(config)
+      this.props.updateConfig(config, type)
       this.setState({visible: false})
 
       notification.success({

--
Gitblit v1.8.0