mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-30 13:20:24 +08:00
fix: 添加loading
This commit is contained in:
parent
8b38c5af69
commit
491d726177
@ -5,7 +5,7 @@ import axios from 'axios'
|
||||
import Mock from 'mockjs'
|
||||
import { connect } from 'react-redux'
|
||||
import { autobind } from 'core-decorators'
|
||||
import { Button, Tabs, message, Affix } from 'antd'
|
||||
import { Button, Tabs, message, Affix, Spin } from 'antd'
|
||||
import ReqMethod from './ReqMethod/ReqMethod.js'
|
||||
import ReqHeader from './ReqHeader/ReqHeader.js'
|
||||
import ReqParams from './ReqParams/ReqParams.js'
|
||||
@ -287,7 +287,6 @@ class AddInterface extends Component {
|
||||
}
|
||||
const id = data.data.data._id
|
||||
const _id = id || interfaceId
|
||||
|
||||
this.setLoading()
|
||||
success('保存成功!', true)
|
||||
this.changeState(true)
|
||||
@ -337,7 +336,11 @@ class AddInterface extends Component {
|
||||
<Affix offsetBottom={0} className="save-button">
|
||||
<Button type="primary" onClick={this.saveForms}>保存</Button>
|
||||
</Affix>
|
||||
<div className={`loading ${isLoading}`}></div>
|
||||
<div className={`loading ${isLoading}`}>
|
||||
<div className="loading-css">
|
||||
<Spin />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
@ -262,11 +262,19 @@
|
||||
height: 100px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
background-size: 30%;
|
||||
z-index: 10000;
|
||||
.loading-css {
|
||||
display: -webkit-box;
|
||||
-webkit-box-align: center;
|
||||
-webkit-box-pack: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.is-loading {
|
||||
display: block;
|
||||
|
Loading…
Reference in New Issue
Block a user