globalLoading

dev_aliyun_beta
hjm 5 years ago
parent 0f50aca4dc
commit 4ac7efaa66

@ -81,7 +81,7 @@ export function TPMIndexHOC(WrappedComponent) {
isRender: false,
AccountProfiletype: false,
slowDownloading: false
globalLoading: false
}
}
@ -137,7 +137,7 @@ export function TPMIndexHOC(WrappedComponent) {
keyupListener = (e) => {
if (e.key === "Escape") {
this.setState({ slowDownloading: false })
this.setState({ globalLoading: false })
}
}
componentWillUnmount() {
@ -379,16 +379,16 @@ export function TPMIndexHOC(WrappedComponent) {
}
slowDownload = (url, tip) => {
this._slowDownloadTip = tip || '正在生成文件,请稍后...';
this.setState({ slowDownloading: true })
this.setState({ globalLoading: true })
const fileUrl = url;
downloadFile({
url: fileUrl,
successCallback: (url) => {
this.setState({ slowDownloading: false })
this.setState({ globalLoading: false })
console.log('successCallback')
},
failCallback: (responseHtml, url) => {
this.setState({ slowDownloading: false })
this.setState({ globalLoading: false })
console.log('failCallback')
}
})
@ -456,7 +456,7 @@ export function TPMIndexHOC(WrappedComponent) {
}
.globalSpin {
max-height: 700px !important;
}
.indexHOC > .ant-spin-nested-loading {
background: #000;
@ -471,7 +471,7 @@ export function TPMIndexHOC(WrappedComponent) {
}
`
}</style>
<Spin spinning={this.state.slowDownloading} delay={0} className="globalSpin"
<Spin spinning={this.state.globalLoading} delay={0} className="globalSpin"
size="large"
tip= {this._slowDownloadTip || "加载中..."}
>

Loading…
Cancel
Save