LigerUI 框架的 common.css 包含頁面載入遮罩動畫(.loading),若在開發調試階段引入,會導致頁面長時間白屏、元素不可點擊、控制台報錯誤導致定位困難。
<!-- 引入後頁面會顯示「正在載入...」遮罩,JS 報錯時遮罩不消失,嚴重阻礙調試 -->
<link href="../lib/css/common.css" rel="stylesheet" type="text/css" />
<!-- <link ... common.css /> -->ligerui.css 等組件樣式,common.css 多為演示頁公共樣式,非運行時必需。common.css 通常包含:
/* 載入遮罩 */
body > .loading { position:fixed; top:0; left:0; width:100%; height:100%; background:#fff url(loading.gif) center no-repeat; z-index:9999; }
/* JS 初始化完成後移除 */
$(window).on('load', () => $('.loading').remove());
若 JS 執行報錯導致 load 事件不觸發或選擇器失效,遮罩永久殘留,頁面看似「死機」。
hideLoading() 手動關閉 API,並捕獲全局錯誤自動關閉。