style: optimize PJAX loading progress

This commit is contained in:
XPoet 2021-01-14 15:19:38 +08:00
parent c750488394
commit bf43e4126d
2 changed files with 9 additions and 7 deletions

View File

@ -17,10 +17,9 @@
visibility: hidden;
opacity: 0;
z-index: $z-index-8;
transition();
transition: all 0.1s ease;
&.show {
transition();
opacity: 1;
visibility: visible;
}
@ -68,9 +67,7 @@
z-index: $z-index-7;
&.hide {
//transition: none;
display: none;
//visibility: hidden !important;
display: none !important;
}
}

View File

@ -281,14 +281,19 @@ KEEP.initUtils = () => {
this.pjaxProgressBarTimer && clearInterval(this.pjaxProgressBarTimer);
this.pjaxProgressBar_dom.style.width = '100%';
const tempTimeout = setTimeout(() => {
const temp_1 = setTimeout(() => {
this.pjaxProgressBar_dom.classList.remove('show');
this.pjaxProgressIcon_dom.classList.remove('show');
if (this.isHasScrollProgressBar) {
this.scrollProgressBar_dom.classList.remove('hide');
}
clearTimeout(tempTimeout);
const temp_2 = setTimeout(() => {
this.pjaxProgressBar_dom.style.width = '0';
clearTimeout(temp_1), clearTimeout(temp_2);
}, 200);
}, 200);
}
}