| | |
| | | import PropTypes from 'prop-types' |
| | | import { connect } from 'react-redux' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Icon, Popover } from 'antd' |
| | | import { Icon, Popover, Button } from 'antd' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import './index.scss' |
| | | |
| | | const SettingComponent = asyncIconComponent(() => import('../tabsetting')) |
| | | const SettingComponent = asyncIconComponent(() => import('../groupsetting')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | const PasteController = asyncIconComponent(() => import('@/menu/pastecontroller')) |
| | | const TabComponents = asyncComponent(() => import('../tabcomponents')) |
| | | const GroupComponents = asyncComponent(() => import('../groupcomponents')) |
| | | |
| | | class NormalGroup extends Component { |
| | | static propTpyes = { |
| | |
| | | this.props.updateConfig(component) |
| | | } |
| | | |
| | | insert = (item, cell) => { |
| | | insert = (item) => { |
| | | let group = fromJS(this.state.group).toJS() |
| | | |
| | | group.components.forEach(stab => { |
| | | if (stab.uuid === cell.uuid) { |
| | | stab.components.push(item) |
| | | } |
| | | }) |
| | | group.components.push(item) |
| | | |
| | | this.setState({group}) |
| | | this.props.updateConfig(group) |
| | |
| | | } trigger="hover"> |
| | | <Icon type="tool" /> |
| | | </Popover> |
| | | <TabComponents config={group} handleList={this.updateComponent} deleteCard={this.deleteCard} /> |
| | | |
| | | {group.setting && group.setting.print === 'true' ? <Button className="print-button" icon="printer" onClick={this.print}></Button> : null} |
| | | <GroupComponents config={group} handleList={this.updateComponent} deleteCard={this.deleteCard} /> |
| | | </div> |
| | | ) |
| | | } |