使用layui实现图片点击放大预览
showPic: function (info) {
var url = 图片url地址
previewImg(url);
},
previewImg: function (obj) {
var imgHtml = "<img src='" + obj + "' width='100%' height='100%'/>";
//弹出层
layer.open({
type: 1,
shade: 0.8,
offset: 'auto',
area: [600 + 'px', 800 + 'px'],
shadeClose: true,
scrollbar: false,
title: "图片预览",
content: imgHtml,
cancel: function () {
}
});
},