layui版本:2.5以上
修改layer.js源码,注意h(); 调用位置
修改前:
if (n || p.on("click", t.img,
function() {
var e = i(this),
n = e.attr("layer-index");
r.photos(i.extend(t, {
photos: {
start: n,
data: u,
tab: t.tab
},
full: t.full
}), !0)
h();
}), !n) return
修改后:
if (n || p.on("click", t.img,
function() {
h();
var e = i(this),
n = e.attr("layer-index");
r.photos(i.extend(t, {
photos: {
start: n,
data: u,
tab: t.tab
},
full: t.full
}), !0)
}), !n) return