king
2021-11-12 0c84df247914f893ef5e41d57a422e10a2dc814c
src/menu/versions/index.jsx
@@ -1,7 +1,8 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, Button, Icon, notification } from 'antd'
import { Modal, Button, notification } from 'antd'
import { QuestionCircleOutlined } from '@ant-design/icons'
import moment from 'moment'
import Api from '@/api'
@@ -64,7 +65,7 @@
        notification.success({
          top: 92,
          message: '执行成功。',
          duration: 2
          duration: 1
        })
        if (updateConfig) {
@@ -72,7 +73,7 @@
        } else {
          setTimeout(() => {
            window.location.reload()
          }, 2000)
          }, 1000)
        }
      }
    })
@@ -110,7 +111,7 @@
        notification.success({
          top: 92,
          message: '执行成功。',
          duration: 2
          duration: 1
        })
        
        if (updateConfig) {
@@ -118,7 +119,7 @@
        } else {
          setTimeout(() => {
            window.location.reload()
          }, 2000)
          }, 1000)
        }
      }
    })
@@ -140,12 +141,12 @@
          footer={[]}
          destroyOnClose
        >
          <div className="header"><Icon type="question-circle"/>版本切换</div>
          <div className="header"><QuestionCircleOutlined/>版本切换</div>
          <div className="detail">请选择需要切换的版本,或点击取消关闭弹窗。</div>
          <div className="footer">
            <Button key="cancel" onClick={() => { this.setState({ visible: false })}}>取消</Button>
            <Button key="pre" type="primary" loading={preconfirming} onClick={this.preVersion}>上一版本</Button>
            <Button key="next" type="primary" loading={nextconfirming} onClick={this.nextVersion}>下一版本</Button>
            <Button key="cancel" onClick={() => { this.setState({ visible: false })}}>取消</Button>
          </div>
        </Modal>
      </div>