From 0de207ebed200dffca41b8c974d1394cf328b03e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 23 九月 2020 09:29:02 +0800 Subject: [PATCH] 2020-09-23 --- src/menu/components/tabs/antv-tabs/index.jsx | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/menu/components/tabs/antv-tabs/index.jsx b/src/menu/components/tabs/antv-tabs/index.jsx index 57a8cb1..3f8673e 100644 --- a/src/menu/components/tabs/antv-tabs/index.jsx +++ b/src/menu/components/tabs/antv-tabs/index.jsx @@ -21,6 +21,7 @@ class antvBarLineChart extends Component { static propTpyes = { tabs: PropTypes.object, + deleteTabs: PropTypes.func, updateConfig: PropTypes.func, } @@ -42,7 +43,7 @@ tabId: tabs.tabId || '', parentId: tabs.parentId || '', subtype: tabs.subtype, - setting: {span: 12, position: 'top', tabStyle: 'line', name: tabs.name}, + setting: {span: 24, position: 'top', tabStyle: 'line', name: tabs.name}, 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: [] }, @@ -200,7 +201,7 @@ return ( <div className="menu-tabs-edit-box"> - <SettingComponent config={tabs} updateConfig={this.updateComponent} /> + {/* <SettingComponent config={tabs} updateConfig={this.updateComponent} /> */} <Tabs defaultActiveKey="1" tabPosition={tabs.setting.position} type={tabs.setting.tabStyle}> {tabs.subtabs.map((tab, index) => ( <TabPane tab={ @@ -218,7 +219,19 @@ <TabComponents config={tab} handleList={this.updateTabComponent} deleteCard={this.deleteCard} /> </TabPane> ))} - <TabPane className="tab-add" disabled tab={<Icon onClick={this.tabAdd} type="plus" />} key="add"></TabPane> + <TabPane disabled tab={ + <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ + <div className="mk-popover-control"> + <Icon className="plus" title="add" type="plus" onClick={this.tabAdd} /> + <Icon className="close" title="delete" type="delete" onClick={() => this.props.deleteTabs(tabs.uuid)} /> + <SettingComponent config={tabs} updateConfig={this.updateComponent} /> + </div> + } trigger="hover"> + <Icon type="tool" /> + </Popover> + } key="tool"> + </TabPane> + {/* <TabPane className="tab-add" disabled tab={<Icon onClick={this.tabAdd} type="plus" />} key="add"></TabPane> */} </Tabs> <Modal wrapClassName="popview-modal" -- Gitblit v1.8.0