import { Spin } from 'view-ui-plus'
// 将同一时刻的请求合并
let needLoadingRequersCount = 0;
export const showFullScreenLoading = function () {
if (needLoadingRequersCount === 0) {
Spin.show()
}
needLoadingRequersCount++
}
export const tryHideFullScreenLoading = function () {
if (needLoadingRequersCount <= 0) {
return
}
needLoadingRequersCount--
if (needLoadingRequersCount === 0) {
Spin.hide()
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)