Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 292

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report