FastAdmin 表格排序
生活随笔
收集整理的這篇文章主要介紹了
FastAdmin 表格排序
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
找到對應的js
public/assets/js/backend/user/user.js
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'weigh',//默認排序字段
sortOrder:'asc',//默認排序方式
escape: true,
search: true,
pagination: true,
pageList: [10, 20, 50, 'All'],
commonSearch: true,
columns: [
[
{ checkbox: true },
{ field: 'id', title: __('Id'),sortable:true}, //字段使用排序
利用sortName可以進行默認排序,如果設定了這個那么sortOrder則不生效
另外再羅列一些其他功能,字段加添加sortable:true 就可以動態搜索并排序了
原文地址:http://www.aumoc.com/index.php/2020/02/25/fastadmin-table-bootstraptable-sort-order/
總結
以上是生活随笔為你收集整理的FastAdmin 表格排序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android MTK驱动背光唤醒流程
- 下一篇: h5动画效果总结