ask for help: how to select all in the drop-down box of the fields that can be displayed in the bootstrap-table list?
ask for help: how to select all in the drop-down box of the fields that can be displayed in the bootstrap-table list?
fill in the hole for yourself.
solution:
1, add "Select all" to the column parameter configuration
columns: [
{
title: '',
field: '',
visible: false,
},
]
2.bootstrap-table rendering
$("-sharptb_transitList").bootstrapTable(newOption);
3. Add click event
var checkOne = $(".dropdown-menu li input");
var checkAll = checkOne.eq(0);
checkAll.off('click').on('click', function () {
var flag = checkAll.prop("checked");
checkOne.each(function(i){
if (i>0){
var $this = $(this);
if (flag) {
if (!$this.prop('checked')) {
$this.click();
}
} else {
if ($this.prop('checked')) {
$this.click();
}
}
}
});
});
checkOne.on('click', function () {
var len = checkOne.length;
var _l = 0;
checkOne.each(function(i){
if (i>0){
if ($(this).prop('checked')) {
_lPP;
}
}
});
if (_l === len-1){
checkAll.prop("checked", true)
} else {
checkAll.prop("checked", false)
}
});
Previous: Vue picture path problem
Next: Mini Program < scroll-view > cannot trigger bindscroll event problem
1. Problem description: (1) after looking at the question of bootstrap table how to display the data after getting the data from the background , I found that the format of the data I returned from the background did not follow the format of { " total...
problem description detailView detailFormatter is not available when using BootStrap Table to encapsulate js the environmental background of the problems and what methods you have tried it s OK to use the default method: $( - sharptableCompany ...
using bootstrap, during development requires inline editing, and now you need to introduce bootstrap-table-editable.js and bootstrap-editable.js error report of imported file jspbootstrapjs ask the gods to see why. ...
can the requirement be implemented by directly referencing the js file? Do you want to configure something here in the table initialization section? ...
The queryParams of bootstrap-table v1.13.1 does not work? The code is as follows: var params = $("-sharpbootstrap-table").bootstrapTable( getOptions ); params.queryParams = function(params) { var sear...