| | |
| | | |
| | | class EditTable extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | type: PropTypes.string, // 表单类型 |
| | | linkSubFields: PropTypes.array, // 关联字段 |
| | | onChange: PropTypes.func // 数据变化 |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { linkSubFields, type, dict } = this.props |
| | | const { linkSubFields, type } = this.props |
| | | let data = this.props['data-__meta'].initialValue |
| | | |
| | | if (!data) { |
| | |
| | | render: (text, record) => |
| | | this.state.dataSource.length >= 1 ? ( |
| | | <div> |
| | | <span className="operation-btn" title={dict['header.form.up']} onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> |
| | | <span className="operation-btn" title={dict['header.form.down']} onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> |
| | | <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> |
| | | <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> |
| | | <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | title={dict['model.query.delete']} |
| | | onConfirm={() => this.handleDelete(record.key) |
| | | }> |
| | | <span style={{color: '#ff4d4f', cursor: 'pointer'}}><Icon type="delete" /></span> |
| | |
| | | render: (text, record) => |
| | | this.state.dataSource.length >= 1 ? ( |
| | | <div> |
| | | <span className="operation-btn" title={this.props.dict['header.form.up']} onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> |
| | | <span className="operation-btn" title={this.props.dict['header.form.down']} onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> |
| | | <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span> |
| | | <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span> |
| | | <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | title={this.props.dict['model.query.delete']} |
| | | onConfirm={() => this.handleDelete(record.key) |
| | | }> |
| | | <span style={{color: '#ff4d4f', cursor: 'pointer'}}><Icon type="delete" /></span> |