对layer弹出框中icon数字参数的说明介绍

2022-10-16,,,,

前言

icon参数为0,如下代码:

layer.msg('请选择要编辑的机构', {icon: 0});

运行结果如图:

icon参数为1,如下图

icon参数为2,如下图:

icon参数为3,如下图:

icon参数为4,如下图:

icon参数为5,如下图:

icon参数为6,如下图:

icon参数为7,如下图:

2. 确认框示例

//锁定机构
function lockorg(){
  var row = orgdatagrid.datagrid('getselected');
  if(row){
   //弹出确认框
   layer.confirm('您确定要修改[' + row.name + ']的状态吗', {icon: 3, title:'提示'}, function(index){ 
    $.ajax({
     type:"post",
     datatype : "json",
     async: false,
     url: '${pagecontext.request.contextpath}/system/organization/lockorg.do',
     data : {id:row.id},
     success : function(data){
      if(data.success){
       layer.msg(data.message, {icon: 1});
       $("#orgdatagrid").datagrid('reload');
      }else{
       layer.msg(data.message, {icon: 2});
      }
     },
     error:function(){

     }
    });
    //关闭确认框
    layer.close(index); 
   }); 
  }else{
   layer.msg('请选择要锁定的机构', {icon: 0});
  }
 }

3. 更多

lay更多知识:参考lay官网

以上这篇对layer弹出框中icon数字参数的说明介绍就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

《对layer弹出框中icon数字参数的说明介绍.doc》

下载本文的Word格式文档,以方便收藏与打印。