javascript - bootstrap table returns data in the same format as the official one but cannot be displayed on the front end
我想大声告诉你
我想大声告诉你 2017-05-19 10:33:44
0
1
565

Official example shows

The data I returned in the background

Attached is the code for obtaining data from my background:

我想大声告诉你
我想大声告诉你

reply all(1)
漂亮男人

I also encountered it. The reason is that there is a bug when loading, and sidePagination must be specified as server.

The js code is modified as follows:

$('#table').bootstrapTable({
                    url: '/static/data1.json',
                    sidePagination:"server",
                    columns: [{
                        field: 'id',
                        title: 'Item ID'
                    }, {
                        field: 'name',
                        title: 'Item Name'
                    }, {
                        field: 'price',
                        title: 'Item Price'
                    }, ]
                });

or modify html

 <table id="table"
           data-side-pagination="server"
           data-show-columns="true"
           data-search="true"
           data-show-refresh="true"
           data-show-toggle="true"
           data-pagination="true"
           data-height="500">

    </table>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template