| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Table, Button, Modal, Icon } from 'antd' |
| | | import { Table, Button, Modal } from 'antd' |
| | | import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons' |
| | | |
| | | import LinkForm from '../linkform' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | (<div> |
| | | <Button type="link" style={{padding: '0 5px', marginRight: '5px'}} onClick={() => this.editMenu(record)}>编辑</Button> |
| | | <Button type="link" style={{color: '#ff4d4f', padding: '0 5px', marginRight: '5px'}} onClick={() => this.delMenu(record)}>删除</Button> |
| | | <Icon type="arrow-up" style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> |
| | | <Icon type="arrow-down" style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> |
| | | <ArrowUpOutlined style={{color: '#26C281', cursor: 'pointer', padding: '0 5px', marginRight: '5px'}} onClick={() => this.moveUp(record)}/> |
| | | <ArrowDownOutlined style={{color: '#ff4d4f', cursor: 'pointer', padding: '0 5px'}} onClick={() => this.moveDown(record)}/> |
| | | </div>) |
| | | } |
| | | ] |
| | |
| | | |
| | | delMenu = (record) => { |
| | | const { data } = this.state |
| | | const _this = this |
| | | const that = this |
| | | |
| | | confirm({ |
| | | title: '确定删除吗?', |
| | | content: '', |
| | | onOk() { |
| | | _this.setState({data: data.filter(item => item.MenuID !== record.MenuID)}) |
| | | that.setState({data: data.filter(item => item.MenuID !== record.MenuID)}) |
| | | }, |
| | | onCancel() {} |
| | | }) |