zoukankan      html  css  js  c++  java
  • Layer 使用

    官网文档 http://layer.layui.com/mobile/api.html

    1.需要添加jquery的引用然后是

    loadExtentFile("css", "/plugin/layer_mobile-2.0/need/layer.css");

    loadExtentFile("js", "/plugin/layer_mobile-2.0/layer.js");
    loadExtentFile("js", "/plugin/layer_mobile-2.0/layerBLL.js");

    封装的部分代码。

    function layer_tip(content) {
        layer.open({
            content: content
            , skin: 'msg'
            , anim: 'scale'        
            , time: 1 //2秒后自动关闭
    
            , style: ' position: inherit;  left: auto;'
    
        });
    };
    
    function Layer_Loding(content ='请稍后') {
        layer.open({
            content: content
            , type: 2
            //, skin: 'msg'
            //, anim: 'scale'
            //, time: 1 //2秒后自动关闭
            , shadeClose: false
            , style: ' position: inherit;  left: auto;'
    
        });
        
    };
    
    ;function Layer_closeAll() {
    
        layer.closeAll(); //疯狂模式,关闭所有层
    };

    调用代码

     layer_tip('请选择操作环节!');

    Layer_Loding() ;
    Layer_closeAll();

  • 相关阅读:
    php 函数汇总
    php 图片base64编码生成dataurl和保存为图片
    bootstrap
    PHPWord
    js json排序
    UE用法
    判断移动端是苹果还是安卓,以及安卓版本
    shell终极操作
    LINUX yum用法
    jquery对checkbox的操作汇总
  • 原文地址:https://www.cnblogs.com/Blogs-Wang/p/10792092.html
Copyright © 2011-2022 走看看