king
2023-06-14 08cce3334a2dc81d690b518136b0aaea64e48b0b
src/menu/pastecontroller/index.jsx
@@ -18,9 +18,7 @@
    visible: false
  }
  resetconfig = (item) => {
    let appType = sessionStorage.getItem('appType')
  resetconfig = (item, appType) => {
    if (item.type === 'tabs') {
      item.uuid = MenuUtils.getuuid()
      item.setting.name = item.setting.name + MenuUtils.getSignName()
@@ -34,7 +32,7 @@
        }
        tab.components = tab.components.map(cell => {
          cell = this.resetconfig(cell)
          cell = this.resetconfig(cell, appType)
          return cell
        })
      })
@@ -44,11 +42,11 @@
      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
@@ -56,16 +54,16 @@
  pasteSubmit = () => {
    let appType = sessionStorage.getItem('appType')
    let options = ['tabs', 'timeline', 'datacard', 'propcard', 'mainsearch', 'simpleform', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'pie', 'scatter', 'iframe', 'sandbox']
    let options = ['tabs', 'timeline', 'datacard', 'propcard', 'simpleform', 'stepform', 'tabform', 'balcony', 'group', 'normaltable', 'tablecard', 'line', 'bar', 'editor', 'pie', 'scatter', 'iframe', 'sandbox']
    if (appType === 'mob') {
      if (sessionStorage.getItem('editMenuType') !== 'popview') {
        options.push('menubar', 'topbar')
        options.push('menubar', 'topbar', 'singleSearch')
      } else {
        options.push('menubar')
        options.push('menubar', 'singleSearch')
      }
    } else {
      options.push('editable', 'antvG6', 'tree', 'dashboard', 'chart')
      options.push('editable', 'mainsearch', 'antvG6', 'tree', 'dashboard', 'chart')
    }
    this.pasteFormRef.handleConfirm().then(res => {
@@ -78,7 +76,7 @@
        return
      }
      res = this.resetconfig(res)
      res = this.resetconfig(res, appType)
      // delete res.copyType