king
2023-06-28 f07c42a322f41e14ef5b1bf8f2fd66fc5d338cdd
src/menu/components/tabs/paste/index.jsx
@@ -19,11 +19,7 @@
    visible: false
  }
  handleMenuClick = () => {
    this.setState({visible: true})
  }
  resetconfig = (item) => {
  resetconfig = (item, appType) => {
    if (item.type === 'tabs') {
      item.uuid = MenuUtils.getuuid()
      item.setting.name = item.setting.name + MenuUtils.getSignName()
@@ -33,7 +29,7 @@
        tab.uuid = MenuUtils.getuuid()
        tab.components = tab.components.map(cell => {
          cell = this.resetconfig(cell)
          cell = this.resetconfig(cell, appType)
          return cell
        })
      })
@@ -43,12 +39,12 @@
      item.name = item.setting.name
      item.components = item.components.map(cell => {
        cell = MenuUtils.resetComponentConfig(cell)
        cell = MenuUtils.resetComponentConfig(cell, appType)
        return cell
      })
    } else {
      item = MenuUtils.resetComponentConfig(item)
      item = MenuUtils.resetComponentConfig(item, appType)
    }
    return item
@@ -57,7 +53,7 @@
  pasteSubmit = () => {
    const { Tab } = this.props
    let appType = sessionStorage.getItem('appType')
    let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox']
    let options = ['tabs', 'group', 'datacard', 'propcard', 'timeline', 'balcony', 'normaltable', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'editor', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'sandbox']
    let types = {
      login: '登录',
      navbar: '导航栏',
@@ -67,7 +63,7 @@
    if (appType === 'mob') {
      options.push('menubar')
    } else {
      options.push('editable', 'antvG6', 'tree', 'dashboard', 'chart')
      options.push('editable', 'antvG6', 'antvX6', 'tree', 'dashboard', 'chart')
    }
    this.pasteFormRef.handleConfirm().then(res => {
@@ -87,7 +83,7 @@
        return
      }
      res = this.resetconfig(res)
      res = this.resetconfig(res, appType)
      delete res.copyType