From 0fab1a1df84637d7c78b353c29a3c6a256705a0f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 06 四月 2023 10:24:31 +0800
Subject: [PATCH] 2023-04-06

---
 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 f8c1f6a..aa7abd3 100644
--- a/src/menu/components/share/pastecomponent/index.jsx
+++ b/src/menu/components/share/pastecomponent/index.jsx
@@ -7,7 +7,7 @@
 import Utils from '@/utils/utils.js'
 import MKEmitter from '@/utils/events.js'
 import asyncComponent from '@/utils/asyncComponent'
-import './index.scss'
+// import './index.scss'
 
 const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform'))
 
@@ -19,10 +19,6 @@
 
   state = {
     visible: false
-  }
-
-  handleMenuClick = () => {
-    this.setState({visible: true})
   }
 
   resetconfig = (item, config) => {
@@ -116,12 +112,17 @@
   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
+      }
+
       let type = res.copyType
       let config = fromJS(this.props.config).toJS()
 

--
Gitblit v1.8.0