BootPage 是一個以 Vue 實作的簡易表格分頁組件,支援靜態資料與伺服器資料,樣式基於 Bootstrap。

<boot-page :async="false" :data="lists" :lens="lenArr" :page-len="pageLen" :param="param"></boot-page>
lens 設定每頁顯示筆數,page-len 設定頁碼顯示數量。
<boot-page v-ref:page :async="true" :lens="lenArr" :url="url" :page-len="pageLen" :param="param"></boot-page>
伺服器需回傳 data 與 page_num,組件會透過事件把目前頁資料傳回頁面。
events: {
'data' (data) {
this.tableList = data;
}
}
此組件適合輕量後台表格,若需更完整功能,可再擴充排序、搜尋與自訂樣式。