| | |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import './index.scss' |
| | | |
| | | const SettingComponent = asyncComponent(() => import('../tabsetting')) |
| | | const SettingComponent = asyncIconComponent(() => import('../tabsetting')) |
| | | const TabLabelComponent = asyncComponent(() => import('../tablabelform')) |
| | | const TabComponents = asyncComponent(() => import('../tabcomponents')) |
| | | |
| | |
| | | class antvBarLineChart extends Component { |
| | | static propTpyes = { |
| | | tabs: PropTypes.object, |
| | | deleteTabs: PropTypes.func, |
| | | deletecomponent: PropTypes.func, |
| | | updateConfig: PropTypes.func, |
| | | } |
| | | |
| | |
| | | tabId: tabs.tabId || '', |
| | | parentId: tabs.parentId || '', |
| | | subtype: tabs.subtype, |
| | | setting: {span: 24, position: 'top', tabStyle: 'line', name: tabs.name}, |
| | | width: 24, |
| | | name: tabs.name, |
| | | setting: {width: 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: [] }, |
| | |
| | | // 注册事件-标签变化,通知标签内元素 |
| | | MKEmitter.emit('tabsChange', tabs.uuid) |
| | | } |
| | | |
| | | component.width = component.setting.width |
| | | component.name = component.setting.name |
| | | |
| | | this.setState({ |
| | | tabs: component |
| | |
| | | |
| | | return ( |
| | | <div className="menu-tabs-edit-box"> |
| | | {/* <SettingComponent config={tabs} updateConfig={this.updateComponent} /> */} |
| | | <Tabs defaultActiveKey="1" tabPosition={tabs.setting.position} type={tabs.setting.tabStyle}> |
| | | {tabs.subtabs.map((tab, index) => ( |
| | | <TabPane 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} /> |
| | | <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(tabs.uuid)} /> |
| | | </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" |