From f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 十一月 2022 16:11:55 +0800
Subject: [PATCH] 2022-11-21

---
 src/menu/components/group/paste/index.jsx |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/menu/components/group/paste/index.jsx b/src/menu/components/group/paste/index.jsx
index 2932f39..df04404 100644
--- a/src/menu/components/group/paste/index.jsx
+++ b/src/menu/components/group/paste/index.jsx
@@ -4,7 +4,6 @@
 import { SnippetsOutlined } from '@ant-design/icons'
 
 import MenuUtils from '@/utils/utils-custom.js'
-import MKEmitter from '@/utils/events.js'
 import asyncComponent from '@/utils/asyncComponent'
 // import './index.scss'
 
@@ -24,7 +23,8 @@
   }
 
   pasteSubmit = () => {
-    let options = ['datacard', 'propcard', 'balcony', 'timeline', 'simpleform', 'stepform', 'tabform', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter', 'chart']
+    let appType = sessionStorage.getItem('appType')
+    let options = ['datacard', 'propcard', 'balcony', 'timeline', 'simpleform', 'stepform', 'tabform', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'dashboard', 'scatter', 'chart', 'sandbox']
     let types = {
       login: '鐧诲綍',
       navbar: '瀵艰埅鏍�',
@@ -34,6 +34,10 @@
       mainsearch: '鎼滅储',
       group: '鍒嗙粍',
       menubar: '鑿滃崟'
+    }
+
+    if (appType !== 'mob') {
+      options.push('editable')
     }
 
     this.pasteFormRef.handleConfirm().then(res => {
@@ -53,19 +57,11 @@
         return
       }
 
-      let copyBtns = new Map()
-
-      res = MenuUtils.resetComponentConfig(res, copyBtns)
+      res = MenuUtils.resetComponentConfig(res)
 
       delete res.copyType
       
       this.props.insert(res)
-
-      copyBtns = [...copyBtns.values()]
-
-      if (copyBtns.length > 0) {
-        MKEmitter.emit('copyButtons', copyBtns)
-      }
 
       this.setState({visible: false})
 

--
Gitblit v1.8.0