bolo-fantastic图片显示优化

This commit is contained in:
LingZhaoHui 2020-08-17 22:59:07 +08:00
parent b62666677d
commit 851f80e83d
1 changed files with 13 additions and 11 deletions

View File

@ -89,21 +89,23 @@ $(document).ready(function(){
var w = img.width; var w = img.width;
var h = img.height; var h = img.height;
var url = $(img).attr("src"); var url = $(img).attr("src");
showImage(w, h, url); var alt = $(img).attr("alt");
showImage(w, h, url, alt);
}); });
}); });
function showImage(w, h,url, alt){
function showImage(w, h,url){ layer.photos({
layer.open({ photos:{
type:1, "title":"${blogTitle!}图片显示",
maxmin:true, "id":"",
offset: 'auto', "data":[{
area: [w, h], "alt":alt,
title: "${blogTitle!}图片显示", "src":url,
content: '<img src="' + url + '" alt="${blogTitle!}图片" ' + url +' 显示异常>' "thumb":url
}]
},anim: 5
}); });
} }
function enterSearch(event){ function enterSearch(event){
if(event.keyCode == "13"){ if(event.keyCode == "13"){
search(); search();