king
2021-09-06 84a746468a3f7e5b39a3ed53090a19a8dec8cb10
src/mob/components/tabs/antv-tabs/index.jsx
@@ -10,12 +10,11 @@
import { resetStyle } from '@/utils/utils-custom.js'
import MenuUtils from '@/utils/utils-custom.js'
import Utils from '@/utils/utils.js'
import getTabForm from './options'
import { getTabForm, getTabsSetForm } from './options'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import './index.scss'
const SettingComponent = asyncIconComponent(() => import('@/menu/components/tabs/tabsetting'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const PasteController = asyncIconComponent(() => import('@/menu/pastecontroller'))
@@ -357,6 +356,16 @@
    this.props.updateConfig(tabs)
  }
  getTabsForms = () => {
    const { tabs } = this.state
    return getTabsSetForm(tabs.setting)
  }
  updateTabs = (res) => {
    this.updateComponent({...this.state.tabs, setting: res})
  }
  onChange = (key) => {
    const { tabs } = this.state
    window.GLOB.TabsMap.set(tabs.uuid, key)
@@ -403,7 +412,9 @@
            <NormalForm title="添加标签" width={600} update={this.updateTab} getForms={() => this.getTabForms()}>
              <Icon type="plus" className="plus" title="添加标签"/>
            </NormalForm>
            <SettingComponent config={tabs} updateConfig={this.updateComponent} />
            <NormalForm title="标签页设置" width={700} update={this.updateTabs} getForms={this.getTabsForms}>
              <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="tabs" card={tabs}/>
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(tabs.uuid)} />