mirror of https://github.com/layui/layer
Update layer.ext.js
上面已经写了 img = parent.find(options.img||'img') 下面这段明显是写错了(options.img写成了photos.img), 而且没必要再查找一遍子元素 parent.find(photos.img||'img')pull/19/head
parent
c534fc8c3e
commit
e3b6d7af4b
|
@ -96,7 +96,7 @@ layer.photos = function(options, loop, key){
|
|||
if(!type){ //页面直接获取
|
||||
var parent = $(options.photos), img = parent.find(options.img||'img');
|
||||
if (img.length === 0) return;
|
||||
loop || parent.find(photos.img||'img').each(function(index){
|
||||
loop || img.each(function(index){
|
||||
var othis = $(this);
|
||||
data.push({
|
||||
alt: othis.attr('alt'),
|
||||
|
|
Loading…
Reference in New Issue