优化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

@@ -23,6 +23,7 @@
CSRF_TOKEN: "{:token()}",
};
</script>
<script src="__STATIC__/common/js/app.js"></script>
<script src="__STATIC__/plugs/layui-v2.5.6/layui.all.js?v={$version}" charset="utf-8"></script>
<script src="__STATIC__/plugs/require-2.3.6/require.js?v={$version}" charset="utf-8"></script>
<script src="__STATIC__/config-admin.js?v={$version}" charset="utf-8"></script>

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;