当我切换“ refresh”复选框时,多选正在工作并且标头中的全选按钮不再存在,无法使“ refreshOptions”正常工作。我是在做错什么,还是这个插件有缺陷?如果是这样,是否有解决方法?谢谢。
$("#refresh").click(function() {
selectOn = !selectOn;
if (selectOn) {
$("#table").bootstrapTable("refreshOptions", {
columns: [
{ checkbox: true, field: "checked" },
{ field: "name", title: "price" },
{ field: "price", title: "price" }
],
data: [{
checked: true,
id: 1,
name: 'Item 1',
price: '$1'
}, {
checked: false,
id: 2,
name: 'Item 2',
price: '$2'
}]
})
} else {
$("#table").bootstrapTable("refreshOptions", {
columns: [
{ radio: true, field: "checked" },
{ field: "name", title: "price" },
{ field: "price", title: "price" }
],
data: [{
checked: true,
id: 1,
name: 'Item 1',
price: '$1'
}, {
checked: false,
id: 2,
name: 'Item 2',
price: '$2'
}]
})