| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, Spin, Empty } from 'antd' |
| | | import { Button, Modal, notification, Spin, Empty, Tooltip } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | return |
| | | } |
| | | |
| | | Api.deleteMenuStorage(config.MenuID).then(() => { |
| | | Api.deleteMenuStorage(config.MenuID) |
| | | |
| | | setTimeout(() => { |
| | | this.setState({ |
| | | visible: false, |
| | | revertLoading: false |
| | |
| | | window.GLOB.CacheMap = new Map() |
| | | MKEmitter.emit('reloadMenuView', config.MenuID) |
| | | }) |
| | | }) |
| | | }, 100) |
| | | }) |
| | | } |
| | | |
| | |
| | | return |
| | | } |
| | | |
| | | Api.deleteMenuStorage(config.MenuID).then(() => { |
| | | Api.deleteMenuStorage(config.MenuID) |
| | | |
| | | setTimeout(() => { |
| | | this.setState({ |
| | | visible: false, |
| | | confirmLoading: false |
| | |
| | | window.GLOB.CacheMap = new Map() |
| | | MKEmitter.emit('reloadMenuView', config.MenuID) |
| | | }) |
| | | }) |
| | | }, 100) |
| | | }) |
| | | } |
| | | |
| | |
| | | render() { |
| | | const { components, visible } = this.state |
| | | |
| | | if (window.GLOB.mkHS || window.GLOB.sysType !== 'local') return null |
| | | |
| | | return ( |
| | | <div className="page-setting-wrap"> |
| | | {window.GLOB.sysType === 'local' ? <Button |
| | | icon="setting" |
| | | shape="circle" |
| | | className="page-setting" |
| | | onClick={this.trigger} |
| | | /> : null} |
| | | <div className="tool-wrap"> |
| | | <Tooltip placement="left" title="自定义设置"> |
| | | <Button icon="setting" shape="circle" onClick={this.trigger}/> |
| | | </Tooltip> |
| | | <Modal |
| | | wrapClassName="custom-setting-modal" |
| | | title={'自定义设置'} |
| | | title="自定义设置" |
| | | maskClosable={false} |
| | | width={950} |
| | | visible={visible} |