优化loading页面
This commit is contained in:
parent
f041477c10
commit
92aca83c2c
|
@ -68,23 +68,6 @@
|
|||
<!-- todo head 中有它的 css,应该可以写一块,并改成后台可配置的功能,代码中应该还有他的 js -->
|
||||
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/node-snackbar/0.1.16/snackbar.min.js"></script>
|
||||
|
||||
<script th:if="${theme.config.other.loadingBoxs.loadingBoxEnable} and not ${#strings.isEmpty(theme.config.other.loadingBoxs.loadingBoxImg)}">
|
||||
var preloader = {
|
||||
endLoading: () => {
|
||||
//- document.body.style.overflow = 'auto';
|
||||
document.getElementById('loading-box').classList.add("loaded")
|
||||
},
|
||||
initLoading: () => {
|
||||
//- document.body.style.overflow = '';
|
||||
document.getElementById('loading-box').classList.remove("loaded")
|
||||
}
|
||||
}
|
||||
window.addEventListener('load', preloader.endLoading())
|
||||
setTimeout(function () {
|
||||
preloader.endLoading();
|
||||
}, 3000)
|
||||
|
||||
</script>
|
||||
<div class="js-pjax">
|
||||
<!-- 动态标题 -->
|
||||
<script th:replace="~{modules/common/diytitle :: diytitle}"></script>
|
||||
|
|
|
@ -85,6 +85,22 @@
|
|||
<div class="loading-image-dot"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var preloader = {
|
||||
endLoading: () => {
|
||||
//- document.body.style.overflow = 'auto';
|
||||
document.getElementById('loading-box').classList.add("loaded")
|
||||
},
|
||||
initLoading: () => {
|
||||
//- document.body.style.overflow = '';
|
||||
document.getElementById('loading-box').classList.remove("loaded")
|
||||
}
|
||||
}
|
||||
window.addEventListener('load', preloader.endLoading())
|
||||
setTimeout(function () {
|
||||
preloader.endLoading();
|
||||
}, 3000)
|
||||
</script>
|
||||
|
||||
</th:block>
|
||||
|
||||
|
|
Loading…
Reference in New Issue