From e8f6b29afe17dc952f8595600def6261dacb1bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Fri, 19 Aug 2022 02:43:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20layer=20=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/layer.html | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/examples/layer.html b/examples/layer.html index 3ea830ab..3305852d 100644 --- a/examples/layer.html +++ b/examples/layer.html @@ -28,6 +28,7 @@ body{padding: 100px;} + 更多例子 @@ -40,7 +41,7 @@ body{padding: 100px;}
@@ -129,7 +130,7 @@ layui.use(['layer', 'util'], function(layer, util){ }); } ,test3: function(){ - !1 ? layer.msg('一个常用消息框') + !0 ? layer.msg('一个常用消息框') : layer.msg('一个常用消息框',{closeBtn: 0,time: 0, icon: 16}); } ,test4: function(){ @@ -162,8 +163,8 @@ layui.use(['layer', 'util'], function(layer, util){ }); } ,testLoading: function(){ - layer.load(2, { - //time: 5*1000 + layer.load(0, { + time: 5*1000 //content: '123' }); } @@ -191,6 +192,16 @@ layui.use(['layer', 'util'], function(layer, util){ }] }); } + ,test9: function(){ + layer.photos({ + photos: { + "data": [{ + "src": "https://unpkg.com/outeres/demo/layer.png" + }] + }, + hideFooter: true // 是否隐藏图片底部栏(v2.8.0 新增) + }); + } ,testTime: function(){ layer.alert('你好么,体验者。
在标题栏显示自动关闭倒计秒数', { time: 5*1000 @@ -209,18 +220,11 @@ layui.use(['layer', 'util'], function(layer, util){ } }); - //相册层 + // 相册层 layer.photos({ photos: '#photos' //$('#photos') }); - $('#photos li-').each(function(i, e){ - layer.photos({ - photos: $(e) - }); - }); - - //动态追加 $('#photos').append('
  • ');