From 665f21b028aaefb13a770df7c66445a04910d7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsin@users.noreply.github.com> Date: Tue, 18 May 2021 21:20:45 +0800 Subject: [PATCH] update --- examples/layer.html | 16 ++++++++++++---- examples/table.html | 4 ++++ src/modules/table.js | 5 ++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/examples/layer.html b/examples/layer.html index a456eac..c02e3ee 100644 --- a/examples/layer.html +++ b/examples/layer.html @@ -38,8 +38,8 @@ body{padding: 100px;}
@@ -190,10 +190,18 @@ layui.use('layer', function(){ //相册层 layer.photos({ - photos: '#photos' + photos: '#photos' //$('#photos') }); + + $('#photos li-').each(function(i, e){ + layer.photos({ + photos: $(e) + }); + }); + + //动态追加 - $('#photos').append('
  • '); + $('#photos').append('
  • '); //{"status":1,"msg":"","title":"JSON请求的相册","id":8,"start":0,"data":[{"alt":"layer","pid":109,"src":"//cdn.layui.com/upload/2017_3/168_1488985841996_23077.png","thumb":""},{"alt":"说好的,一起 Fly","pid":110,"src":"//res.layui.com/static/images/fly/fly.jpg","thumb":""},{"alt":"星空如此深邃","pid":113,"src":"//res.layui.com/static/images/sentsin/night.gif","thumb":""}]} diff --git a/examples/table.html b/examples/table.html index 4e02cd8..aa0f089 100644 --- a/examples/table.html +++ b/examples/table.html @@ -15,6 +15,10 @@ +
    +  +
    +