!123 多图片预览改进、JS模块增加空操作_empty

Merge pull request !123 from 无木/master
pull/123/MERGE
Karson 2019-05-30 18:37:16 +08:00 committed by Gitee
commit 830dd7a20d
2 changed files with 8 additions and 1 deletions

View File

@ -146,7 +146,13 @@ require(['jquery', 'bootstrap'], function ($, undefined) {
//加载相应模块
if (Config.jsname) {
require([Config.jsname], function (Controller) {
Controller[Config.actionname] != undefined && Controller[Config.actionname]();
if (Controller.hasOwnProperty(Config.actionname)) {
Controller[Config.actionname]();
} else {
if (Controller.hasOwnProperty("_empty")) {
Controller._empty();
}
}
}, function (e) {
console.error(e);
// 这里可捕获模块加载的错误

View File

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