优化loading和引用;

This commit is contained in:
2022-03-04 17:26:23 +08:00
parent 389a99a6be
commit 05d9aacecf
2 changed files with 13 additions and 2 deletions

View File

@@ -15,9 +15,19 @@ loading.show = function (count) {
loading.showCount += count;
}
loading.hide = function () {
loading.hide = function (count) {
loading.showCount--;
if (typeof count == undefined) {
count = 1;
}
if (count === true) {
count = 1;
loading.showCount = 0;
}
loading.showCount -= 1;
if (loading.showCount < 0) {
loading.showCount = 0;