vue-chunk
v1.0.0
Published
Split an array into chunks using this custom filter for Vue.js.
Downloads
7
Maintainers
Readme
vue-chunk
Split an array into chunks using this custom filter for Vue.js.
Getting Started
With npm
$ npm install vue-chunk --save
Direct include
If you are using Vue globally, just include vue-chunk.js, and it will automatically install the chunk filter.
CommonJS
Vue.use(require('vue-chunk')); // Filter is now available globally
Usage
Meant to be used with v-repeat, this filter splits the array of data into smaller chunks of data. It accepts one argument, which specifies the size of the chunks of data. For example...
<div v-repeat="row: rows | chunk 4">
<div v-repeat="item: row">
{{ item }}
</div>
</div>