to the required components "The code is enough."/> to the required components "The code is enough.">
Home > Article > Web Front-end > How to use vuejs-paginate
Method: 1. Use the npm command to install the bootstrap and vuejs-paginate plug-ins; 2. Use the import and "Vue.component()" statements to introduce the plug-in; 3. Add "
” code is enough.
The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.
Vue.js Paginate is a simple Vue.js paging component. It provides a simple API for paging. It is easy to use and can customize the style of the component through CSS.
Use the paging plug-in vuejs-paginate in vue
1. Install dependent libraries (need to use bootstrap css style) and Pagination plug-in (vuejs-paginate)
npm install bootstrap@3.3.0 -–save-dev npm install vuejs-paginate --save
2. Use
to introduce
import Paginate from 'vuejs-paginate' Vue.component('paginate', Paginate)
and use
<paginate :page-count="20" :click-handler="functionName" :prev-text="'Prev'" :next-text="'Next'" :container-class="'className'"> </paginate>in the component
Example:
Related recommendations: "vue.js tutorial"
The above is the detailed content of How to use vuejs-paginate. For more information, please follow other related articles on the PHP Chinese website!