Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of the New condition query of toolbar and the use of refresh parameters in Bootstrap-table

Shulou Source: shulou.com Published: 2022-06-03 10:35:03 11月15日 Update

This article will explain in detail the example analysis of the new condition query of toolbar and the use of refresh parameters in Bootstrap-table. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

How do we want to customize the query conditions in bootstrap-table? Where are these custom buttons and input boxes defined?

/ / which container to use for the tool button toolbar:'# toolbar'

The query conditions we defined are put into this div

To achieve this effect, we first need to add a query form:

Product line Please select the product line. Message type Please select the message type. Message type query

Get the corresponding value in the parameters passed in the request server:

/ / request server data queryParams: function queryParams (params) {var param = {pageNumber: params.pageNumber, pageSize: params.pageSize, sortName: params.sortName, sortOrder: params.sortOrder, searchText: $("# searchText"). Val (), msgType: $("# msgType"). Val (), productLine: $("# productLine"). Val ()}; return param;}

Finally, it is submitted to the server:

/ / query $_ (document) .on ('click', ".queryButton", function () {$(' # table') .bootstrapTable ('refresh');})

The official refresh document is described as follows:

Refresh the remote server data, you can set {silent: true} to refresh the data silently, and set {url: newUrl} to change the URL.

To provide query parameters specific to this request, set {query: {foo: 'bar'}}.

On the "Bootstrap-table toolbar new condition query and refresh parameter use example analysis" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.

Tags: Queries messages types parameters conditions services products product lines data servers articles usage methods examples analysis buttons more selection good practical Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Xiaomi NVidia Apple Shulou Information