twitter-bootstrap Bootstrap 表默认排序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41742255/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bootstrap table default sorting
提问by MSG3260
I using bootstrap table and there is a default sorting of first column. How can I change default column and choose another and using (Ascending/Descending)
我使用引导表,并且第一列有默认排序。如何更改默认列并选择另一个并使用(升序/降序)
回答by Gautier
You can use data-sort-name and data-sort-order in your table
您可以在表中使用 data-sort-name 和 data-sort-order
For example :
例如 :
<table data-toggle="table" data-sort-name="date" data-sort-order="desc">
The documentation is here http://bootstrap-table.wenzhixin.net.cn/documentation/

