layer 用法

2019/03/28

初始化

layerView= layer.open({
		id:"layer",//id 能防止重复弹框
		type: 2, //弹出窗	
		offset:['60px'],//top,left
		skin: 'layui-layer-lan',
		title: "<i class='fa fa-table'></i> 设备信息",
		area: ['600px', '480px'], // 宽 高
		scrollbar: false,// 不出滚动条
		shade: 0.6, //遮罩 背景不能操作
                shadeClose: true, //点击遮罩 关闭弹出窗
                resize: false, //是否允许拉伸
		content: 'deviceForSite.html?'+id,
		end: function () {//无论是确认还是取消,只要层被销毁了,end都会执行,不携带任何参数。layer.open关闭事件
			layer.close(layerView);
		}
	});