el-table-fixed-header
v1.1.1
Published
Fixed element table header when scrolling
Downloads
24
Readme
element table fixed header directive
Features
- Fixed element's table header when scrolling
dependencies
Instalation
Using module bundlers
# install dependency
npm install --save el-table-fixed-header
// import on your project
import ElTableFixedHeader from 'el-table-fixed-header'
Vue.use(ElTableFixedHeader)
Browser
<body>
<div id="app">
<div id="wrapper-id">
<el-table v-fixed-header="{startFixed: 230, container: '#wrapper-id'}"></el-table>
</div>
</div>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/el-table-fixed-header"></script>
<script>
Vue.use(ElTableFixedHeader.default);
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
});
</script>
</body>
Usage
<div id="wrapper-id">
<el-table v-fixed-header="{startFixed: 230, container: '#wrapper-id'}"></el-table>
</div>
Custom options
Defaults
{
startFixed: 0, // Distance from top of table to top of browser window when to start fix header
container: '', // default is window, the scroll container, use document.querySelector to query the Element
}