支持openOptions方法多个按钮回调

master
RuoYi 4 years ago committed by Limy
parent 3f12ff1cc5
commit df46c8b83c

@ -801,22 +801,31 @@ var table = {
options.callBack(index, layero); options.callBack(index, layero);
} }
} }
layer.open({ var btnCallback = {};
type: 2, if(options.btn instanceof Array){
maxmin: true, for (var i = 1, len = options.btn.length; i < len; i++) {
shade: 0.3, var btn = options["btn" + (i + 1)];
title: _title, if (btn) {
fix: false, btnCallback["btn" + (i + 1)] = btn;
area: [_width + 'px', _height + 'px'], }
content: _url, }
shadeClose: $.common.isEmpty(options.shadeClose) ? true : options.shadeClose, }
skin: options.skin, layer.open($.extend({
btn: $.common.isEmpty(options.btn) ? _btn : options.btn, type: 2,
yes: options.yes, maxmin: true,
cancel: function () { shade: 0.3,
return true; title: _title,
} fix: false,
}); area: [_width + 'px', _height + 'px'],
content: _url,
shadeClose: $.common.isEmpty(options.shadeClose) ? true : options.shadeClose,
skin: options.skin,
btn: $.common.isEmpty(options.btn) ? _btn : options.btn,
yes: options.yes,
cancel: function () {
return true;
}
}, btnCallback));
}, },
// 弹出层全屏 // 弹出层全屏
openFull: function (title, url, width, height) { openFull: function (title, url, width, height) {

Loading…
Cancel
Save