table-vue-component
v1.0.4
Published
Table Vue Component is a component with which you can quickly build reactive tables.
Downloads
3
Readme
Table Vue Component
🖥Component Demonstration
Description
Table Vue Component is a component with which you can quickly build reactive tables.
Installation
First step
npm install table-vue-component
Second step
Local registration
<script>
import Table from 'table-vue-component/Table.vue';
export default: {
components: {
Table
}
}
</script>
Props
|Prop|Type|Default|Description|
|:--:|:--:|:-----:|:---------:|
|columns|Array[{name: String, key: String}]
|[ ]|An array where each object is considered a column.Object Values - name: column name
, key: key to the column data value
.|
|data|Array|[ ]|An array with the data you want to show in the table.
|removalFunction|Function|undefined|The function by which the deletion of selected data will be executed.|
|typeDataDelete|StringupdateData
ordeleteData
|updateData|Used in removalFunction(typeDataDelete)
as the only parameter.updateData
- returns an updated data array with already deleted data.deleteData
- returns an array of data to be deleted.|
|abilitySelect|Boolean|true|true
- allows you to choose which columns will be displayed.false
- disables this feature.|
|abilitySort|Boolean|true|true
- makes it possible to sort data in a table.false
- disables this feature.|