king
2022-02-08 f393af9623c26ae177a3f69b8676afc4e23bff8d
src/mob/components/tabs/antv-tabs/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Tabs, Popover, Modal } from 'antd'
import { Tabs, Popover, Modal, notification } from 'antd'
import { ToolOutlined, PlusOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, CloseOutlined } from '@ant-design/icons'
import MKEmitter from '@/utils/events.js'
@@ -44,7 +44,6 @@
      let _tabs = {
        uuid: tabs.uuid,
        type: tabs.type,
        floor: tabs.floor,
        tabId: tabs.tabId || '',
        parentId: tabs.parentId || '',
        subtype: tabs.subtype,
@@ -53,9 +52,9 @@
        setting: {width: 24, position: 'top', tabStyle: 'line', name: tabs.name},
        style: { marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px' },
        subtabs: [
          { uuid: Utils.getuuid(), parentId: tabs.uuid, floor: tabs.floor, label: 'Tab 1', icon: '', components: [] },
          { uuid: Utils.getuuid(), parentId: tabs.uuid, floor: tabs.floor, label: 'Tab 2', icon: '', components: [] },
          { uuid: Utils.getuuid(), parentId: tabs.uuid, floor: tabs.floor, label: 'Tab 3', icon: '', components: [] }
          { uuid: Utils.getuuid(), parentId: tabs.uuid, label: 'Tab 1', icon: '', components: [] },
          { uuid: Utils.getuuid(), parentId: tabs.uuid, label: 'Tab 2', icon: '', components: [] },
          { uuid: Utils.getuuid(), parentId: tabs.uuid, label: 'Tab 3', icon: '', components: [] }
        ]
      }
@@ -254,6 +253,15 @@
  insert = (item, tab) => {
    let tabs = fromJS(this.state.tabs).toJS()
    if (item.type === 'search') {
      notification.warning({
        top: 92,
        message: '移动端搜索组件不可粘贴!',
        duration: 5
      })
      return
    }
    tabs.subtabs.forEach(stab => {
      if (stab.uuid === tab.uuid) {
        stab.components.push(item)
@@ -310,7 +318,6 @@
      tab = {
        uuid: '',
        parentId: tabs.uuid,
        floor: tabs.floor,
        label: '',
        icon: '',
        components: []