0.13.0 • Published 6 years ago

vue-data-tablee v0.13.0

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

Vue Data Tablee

[JavaScript Style Guide][2] FOSSA Status

Yeap, another Vue table component. This one is based on vue-good-table, a simple and pretty table component.

Install

Install from npm.

npm install vue-data-tablee

With Vue.use function declare vue-data-tablee components.

import 'vue-data-tablee/dist/vue-data-tablee.css'
import Vue from 'vue'
import DataTablee from 'vue-data-tablee'

Vue.use(DataTablee)

You can also import just components you need, without installing globally.

<template>
  <data-table :rows="rows" :cols="cols" />
</template>

<script>
import { DataTable } from 'vue-data-tablee'

export default {
  components: { DataTable },
  ...
}
</script>

Component Props

NameTypeDefaultAbout
colsArray.<Col>[]Cols list.
rowsArray.<Object>[]Rows list.
align'center' \| 'right' \| 'left''left'Global column alignment option.
emptyString''Empty cell's character.
selectableBooleanfalseAdd checkbox column to select a row. It emits event on change
sortBoolean \| Function.(a:*, b:*):NumbertrueGlobal sort option. Could enable/disable sort or use a custom sort function.
sortExternalBooleanfalseOnly change sort and arrow. Useful to sort outsite component.

Cols properties

NameTypeAbout
labelStringColumn label (<th>{{ label }}</th>).
fieldStringProperty name, or property path. Ex 'user.contact.phone'.
align'center' \| 'right' \| 'left'Column alignment option. Stronger than global sort
widthNumberColumn width.
hiddenBooleanDefines if column is hidden.
headerClassStringAdds this class to column header cell.
contentClassStringAdds this class to columns content cells.
sortBoolean \| Function.(a:*, b:*):NumberCould enable/disable column sort or use a custom sort function. Stronger than global sort

Events

NamePayloadAbout
selectArray.<Object>Emitted on select row (selectable option).
sort{ column:Col, sortment:('ascending'\|'descending') }Emitted on sort change.

License

Released under MIT license.

FOSSA Status

0.13.0

6 years ago

0.12.1

6 years ago

0.12.0

6 years ago

0.11.0

6 years ago

0.10.2

6 years ago

0.10.1

6 years ago

0.10.0

6 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.0

6 years ago