king
2022-11-21 f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89
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})