Bootstrap table showing JSON data

前端 未结 3 576
耶瑟儿~
耶瑟儿~ 2021-01-16 05:14

I\'m running Bootstrap on my site, combined with a bootstrap plugin called Bootstrap Tables. It requests the data to be delivered as a JSON file.

I\'m having trouble

3条回答
  •  孤独总比滥情好
    2021-01-16 05:46

    you can set responseHandler option, for example like this:

    html:

    Name License Description Url

    js:

    // client side
    function responseHandler(res) {
        return res.repos;
    }
    

    http://wenzhixin.net.cn/p/bootstrap-table/docs/data4.json

    http://wenzhixin.net.cn/p/bootstrap-table/docs/examples.html#card-view

提交回复
热议问题