Bootstrap Table pagelist fails after setting

After the Bootstrap Table pagelist is set, it does not take effect, fails, does not work, and cannot be used.

foreword

When using Bootstrap Table for data display, setting the pagelist option does not take effect. The bootstrap version is v3.3.7 .

go through

Search online and try to use the following methods to solve it, but none of them work. You can refer to the solution:

  • After searching, it is found that the smartDisplay option is set to false.
  • And some people will take effect without introducing bootstrap.js. After I tried it, I found that it does work, but the style will be lost, so I don’t use this method.
  • Some people have also solved the problem after introducing popover.js, but it does not meet my situation.

reason

Locate the code of the drop-down box where pageList is located, and then click the drop-down box to find that the relevant attributes have been manipulated, but have not been changed. So, the problem should be caused by the dropdown plugin.

 solve

According to the above analysis, the js file of the Bootstrap drop-down box plug-in dropdown is imported separately, because the Bootstrap v3.* version is used. Therefore, after downloading the v3 source package from the Bootstrap official website, find the dropdown.js file in the js directory and copy it to the project directory, then import it into the project.

Note: If it doesn't work after importing, you can try to adjust the order of plug-in introduction to after bootstrap and bootstrap-table.

After importing the file, try the pagelist drop-down box again, and find that it is already available, and the related attributes have changed normally.

 

 

Guess you like

Origin blog.csdn.net/Douz_lungfish/article/details/128208268