forked from kidgrow-microservices-platform

克 刘
2020-03-16 549148d90d41a3320bd36d469fd690354c78de58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 以下代码是配置layui扩展模块的目录,以及加载主题
layui.config({
    base: '/module/'
}).extend({
    formSelects: 'formSelects/formSelects-v4',
    treetable: 'treetable-lay/treetable',
    step: 'step-lay/step'
}).use(['layer'], function () {
    var $ = layui.jquery;
    var layer = layui.layer;
 
    // 加载设置的主题
    var theme = layui.data('easyweb').theme;
    if (theme) {
        layui.link('/assets/css/theme/' + theme + '.css');
    }
 
    // 移除loading动画
    setTimeout(function () {
        $('.page-loading').remove();
    }, window == top ? 500 : 300);
});
 
// 移除主题
function removeTheme() {
    layui.jquery('link[id^=layuicss-assetscsstheme]').remove();
}