mirror of https://github.com/layui/layui
更新 table 测试用例
parent
3f148a9086
commit
780cd72ee2
|
@ -222,13 +222,22 @@ layui.use(['table', 'dropdown'], function(){
|
||||||
},{
|
},{
|
||||||
id: 'unchecked',
|
id: 'unchecked',
|
||||||
title: '取消选中某行'
|
title: '取消选中某行'
|
||||||
|
},{
|
||||||
|
id: 'mult-checked',
|
||||||
|
title: '同时选中多个'
|
||||||
},{
|
},{
|
||||||
id: 'reset-checked',
|
id: 'reset-checked',
|
||||||
title: '给选中行取消选中状态'
|
title: '给选中行取消选中状态'
|
||||||
}],
|
}],
|
||||||
// 菜单被点击的事件
|
// 菜单被点击的事件
|
||||||
click: function(obj){
|
click: function(obj) {
|
||||||
if(obj.id === 'reset-checked'){
|
if (obj.id === 'mult-checked') {
|
||||||
|
// 同时选中多个
|
||||||
|
table.setRowChecked(id, {
|
||||||
|
index: [3, 4, 5], // 2.9.1+
|
||||||
|
checked: true
|
||||||
|
});
|
||||||
|
} else if(obj.id === 'reset-checked') {
|
||||||
// 给选中行取消选中状态
|
// 给选中行取消选中状态
|
||||||
table.setRowChecked(id, {
|
table.setRowChecked(id, {
|
||||||
index: 'all',
|
index: 'all',
|
||||||
|
|
Loading…
Reference in New Issue