mirror of https://gitee.com/y_project/RuoYi.git
选中/取消事件顺序调整
parent
81ec67d4ea
commit
2d07fcb4b4
File diff suppressed because one or more lines are too long
|
@ -139,15 +139,6 @@
|
|||
},
|
||||
// 初始化事件
|
||||
initEvent: function(data) {
|
||||
// 触发行点击事件 加载成功事件
|
||||
$.btTable.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
|
||||
// 工具栏按钮控制
|
||||
var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
|
||||
// 非多个禁用
|
||||
$('#' + $.table._option.toolbar + ' .multiple').toggleClass('disabled', !rows.length);
|
||||
// 非单个禁用
|
||||
$('#' + $.table._option.toolbar + ' .single').toggleClass('disabled', rows.length!=1);
|
||||
});
|
||||
// 绑定选中事件、取消事件、全部选中、全部取消
|
||||
$.btTable.on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
|
||||
// 复选框分页保留保存选中数组
|
||||
|
@ -158,6 +149,15 @@
|
|||
selectionRows = _[func](selectionRows, rows);
|
||||
}
|
||||
});
|
||||
// 触发行点击事件 加载成功事件
|
||||
$.btTable.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
|
||||
// 工具栏按钮控制
|
||||
var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
|
||||
// 非多个禁用
|
||||
$('#' + $.table._option.toolbar + ' .multiple').toggleClass('disabled', !rows.length);
|
||||
// 非单个禁用
|
||||
$('#' + $.table._option.toolbar + ' .single').toggleClass('disabled', rows.length!=1);
|
||||
});
|
||||
// 图片预览事件
|
||||
$.btTable.on('click', '.img-circle', function() {
|
||||
var src = $(this).attr('src');
|
||||
|
|
Loading…
Reference in New Issue