| | |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider, DragSource, DropTarget } from 'react-dnd' |
| | | import { Table, Input, Popconfirm, Form, Icon, notification } from 'antd' |
| | | import { Table, Input, Popconfirm, Form, notification } from 'antd' |
| | | import { PlusOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import FileUpload from '@/tabviews/zshare/fileupload' |
| | |
| | | </span> |
| | | ) : ( |
| | | <div className={'operation-btn' + (editingKey !== '' ? ' disabled' : '')}> |
| | | <span className="primary" onClick={() => {editingKey === '' && this.edit(record.key)}}><Icon type="edit" /></span> |
| | | <span className="primary" onClick={() => {editingKey === '' && this.edit(record.key)}}><EditOutlined /></span> |
| | | {editingKey === '' ? <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | title={this.props.dict['model.query.delete']} |
| | | onConfirm={() => this.handleDelete(record.key) |
| | | }> |
| | | <span className="danger"><Icon type="delete" /></span> |
| | | <span className="danger"><DeleteOutlined /></span> |
| | | </Popconfirm> : null} |
| | | {editingKey !== '' ? <span className="danger"><Icon type="delete" /></span> : null} |
| | | {editingKey !== '' ? <span className="danger"><DeleteOutlined /></span> : null} |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | return ( |
| | | <EditableContext.Provider value={this.props.form}> |
| | | <div className="modal-card-data-table"> |
| | | {addable ? <Icon className="add-row" type="plus" onClick={this.handleAdd} /> : null} |
| | | {addable ? <PlusOutlined className="add-row" onClick={this.handleAdd} /> : null} |
| | | <DndProvider> |
| | | <Table |
| | | components={components} |