| | |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider, DragSource, DropTarget } from 'react-dnd' |
| | | import { Table, Form, Popover, Icon, Modal, message } from 'antd' |
| | | import { Table, Popover, Icon, Modal, message } from 'antd' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncIconComponent from '@/utils/asyncIconComponent' |
| | |
| | | }))(HeaderCol), |
| | | ) |
| | | |
| | | class EditableCell extends Component { |
| | | class EditableColumnCell extends Component { |
| | | updateCard = (vals, action) => { |
| | | const { column } = this.props |
| | | this.props.upComponent({...column, elements: vals}, action) |
| | |
| | | } |
| | | } |
| | | |
| | | class EditTable extends Component { |
| | | class NormalTableColumns extends Component { |
| | | static propTpyes = { |
| | | config: PropTypes.object, // 配置信息 |
| | | updatecolumn: PropTypes.func // 数据变化 |
| | |
| | | cell: DragableHeaderCol |
| | | }, |
| | | body: { |
| | | cell: EditableCell |
| | | cell: EditableColumnCell |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | export default Form.create()(EditTable) |
| | | export default NormalTableColumns |