| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Table, Popconfirm, Icon } from 'antd' |
| | | import { Table, Popconfirm } from 'antd' |
| | | import { EditOutlined, DeleteOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | |
| | | import MarkForm from './markform' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import './index.scss' |
| | | import '@/assets/css/table.scss' |
| | | |
| | |
| | | content = '效果在卡片中可见' |
| | | } else if (record.signType === 'icon') { |
| | | if (record.position === 'front') { |
| | | content = <div><Icon className={'font ' + record.color[1]} type={record.icon} /> {content} </div> |
| | | content = <div><MkIcon className={'font ' + record.color[1]} type={record.icon} /> {content} </div> |
| | | } else { |
| | | content = <div> {content} <Icon className={'font ' + record.color[1]} type={record.icon} /> </div> |
| | | content = <div> {content} <MkIcon className={'font ' + record.color[1]} type={record.icon} /> </div> |
| | | } |
| | | } |
| | | |
| | |
| | | render: (text, record) => |
| | | ( |
| | | <div> |
| | | <span className="operation-btn" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><Icon type="edit" /></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> |
| | | <span className="operation-btn" onClick={() => this.handleEdit(record)} style={{color: '#1890ff'}}><EditOutlined /></span> |
| | | <span className="operation-btn" onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><ArrowUpOutlined /></span> |
| | | <span className="operation-btn" onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><ArrowDownOutlined /></span> |
| | | <Popconfirm |
| | | overlayClassName="popover-confirm" |
| | | onConfirm={() => this.handleDelete(record) |
| | | }> |
| | | <span className="operation-btn" style={{color: '#ff4d4f'}}><Icon type="delete" /></span> |
| | | <span className="operation-btn" style={{color: '#ff4d4f'}}><DeleteOutlined /></span> |
| | | </Popconfirm> |
| | | </div> |
| | | ) |