From 84a746468a3f7e5b39a3ed53090a19a8dec8cb10 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 06 九月 2021 11:48:25 +0800 Subject: [PATCH] 2021-09-06 --- src/menu/components/tabs/antv-tabs/index.jsx | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/menu/components/tabs/antv-tabs/index.jsx b/src/menu/components/tabs/antv-tabs/index.jsx index 41e0b3d..31c2f9c 100644 --- a/src/menu/components/tabs/antv-tabs/index.jsx +++ b/src/menu/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('../tabsetting')) const NormalForm = asyncIconComponent(() => import('@/components/normalform')) const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) const PasteController = asyncIconComponent(() => import('@/menu/pastecontroller')) @@ -342,6 +341,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) @@ -379,7 +388,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)} /> -- Gitblit v1.8.0