Tad Tools 使用說明
use XoopsModules\Tadtools\BootstrapTable;
使用方式:
BootstrapTable::render();HTML部份範例:
<table data-toggle="table" data-pagination="true" data-search="true" data-url="資料來源.json" data-mobile-responsive="true"> <tr> <th data-sortable="true" data-field="欄位名稱"></th> </tr> <tr> <td></td> </tr> </table>資料來源.json 格式:
{ "total": 200, "rows": [ { "id": 0, "name": "Item 0", "price": "$0" }, { "id": 1, "name": "Item 1", "price": "$1" }, { "id": 2, "name": "Item 2", "price": "$2" } ] }完整參數請參考:https://bootstrap-table-docs3.wenzhixin.net.cn/documentation/