vue-floatthead

Vue 2 component for jquery.floatThead
5,534
Install
npm install vue-floatthead
Latest Version:0.0.5
Vue:2
License:MIT
Last Updated:Mar 29, 2017
Links: npm
Maintainer: tmlee

vue-floatthead

Vue 2 component for jquery.floatThead

Installation

npm

$ npm install vue-floatthead

Getting Started

<template>
  <float-thead-table>
    <thead>
      <tr>
          <th><a href="#" id="demoHeader1">xclick me</a></th>
          <th><a href="#" id="demoHeader2">mouse over me</a></th>
          <th><a href="#" id="demoHeader3">Header...3</a></th>
      </tr>
      <tbody>
        <tr>
            <td>Cell Content 1</td>
            <td>Cell Content 2</td>
            <td>Cell Content 3</td>
        </tr>
      </tbody>
    </thead>
  </float-thead-table>
</template>

<script>
  import Vue from 'vue'
  import FloatThead from 'vue-floatthead'

  Vue.use(FloatThead)

  export default {
    components: {
      FloatThead
    }
  }
</script>

Usages

Pass options to the component

<float-thead-table position='fixed' floatTableClass='awesome-table'></float-thead-table>

Call methods of the component destroy(), reflow(), or getRowGroups()

<float-thead-table ref='awesometable'></float-thead-table>

<script>
  ...
  methods: {
    triggerDestroy () {
      this.$refs.awesometable.destroy()
    }
  }
  ...
</script>

Trigger events

<script>
  ...
  mounted () {
    this.$refs.awesometable.$on('floatThead', (e, isFloated, floatContainer) =>
      console.log('floatThead triggered', e, isFloated, floatContainer)
    )
    this.$refs.awesometable.$on('reflowed', (e, floatContainer) =>
      console.log('reflowed triggered', e, floatContainer)
    )
  }
  ...
</script>

Related Packages

@myena/vue-table

Vue Table components (client/server) used in ENA projects

3,191 29
geeklearners-vue-table

Table Component for vue js

1,075 0

Version History

Version Released License
0.0.5 MIT
0.0.4 MIT