修复data-table-id不统一的BUG

修复多图片预览时错误的BUG
pull/131/MERGE
Karson 2019-06-09 18:35:19 +08:00
parent e3f7268a8b
commit 71195b4185
2 changed files with 3 additions and 3 deletions

View File

@ -93,9 +93,9 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
if (url.indexOf("{ids}") > -1) { if (url.indexOf("{ids}") > -1) {
var ids = 0; var ids = 0;
var tableId = $(elem).data("table-id"); var tableId = $(elem).data("table-id");
if (tableId && $(tableId).size() > 0 && $(tableId).data("bootstrap.table")) { if (tableId && $("#" + tableId).size() > 0 && $("#" + tableId).data("bootstrap.table")) {
var Table = require("table"); var Table = require("table");
ids = Table.api.selectedids($(tableId)).join(","); ids = Table.api.selectedids($("#" + tableId)).join(",");
} }
url = url.replace(/\{ids\}/g, ids); url = url.replace(/\{ids\}/g, ids);
} }

View File

@ -410,7 +410,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
}); });
Layer.photos({ Layer.photos({
photos: { photos: {
"start": $(this).index(".img-center"), "start": $(this).parent().index(),
"data": data "data": data
}, },
anim: 5 //0-6的选择指定弹出图片动画类型默认随机请注意3.0之前的版本用shift参数 anim: 5 //0-6的选择指定弹出图片动画类型默认随机请注意3.0之前的版本用shift参数