使用EasyUI布局时出现混乱瞬间的解决方法

时间:2023-03-09 17:49:24
使用EasyUI布局时出现混乱瞬间的解决方法

在所有form代码之前加遮罩层

<div id='PageLoadingTip' style="position: absolute; z-index: 1000; top: 0px; left: 0px; width: 100%; height: 100%; background: gray; text-align: center;">
<h1 style="top: 48%; position: relative;color:#15428B;">页面加载中···</h1>
</div>

使用 $.parser.onComplete 处理

<script type="text/javascript">
function _PageLoadingTip_Closes() {
$("#PageLoadingTip").fadeOut("normal", function () {
$(this).remove();
});
} var _pageloding_pc;
$.parser.onComplete = function () {
if (_pageloding_pc) clearTimeout(_pageloding_pc);
_pageloding_pc = setTimeout(_PageLoadingTip_Closes, );
}
</script>