1.0.2 • Published 6 years ago

zx-vue-virtual-table v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

virtual-table

vue virtual table for rendering long lists

Install

# install dependencies
npm install zx-vue-virtual-table --save

How to use

# import package
import VirtualTable from 'zx-vue-virtual-table'

# declare component
Vue.component('virtual-table', VirtualTable)

# useage
<virtual-table :list="cells" :scrollViewHeight="736">
  <div slot="cell" slot-scope="props">
    {{props.cell.text}}
  </div>
</virtual-table>

Attributes

AttributeTypeDescriptionDefault
scroll-view-heightintTable height, required---
listarrayTable data, required---
cell-cache-numberintPre-rendered quantity3
cell-heightintcell height, 0 means dynamic height, other means fixed height0

Slots

NameDescriptionParameters
beforewill insert before virtual tabledata:array (current rendered data)
afterwill insert after virtual tabledata:array (current rendered data)
cellrender template for each itemcell: --- (item of table data)
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago