vue-table-editable
v0.0.8
Published
Bootstrap editable table
Readme
Vue Editable Table Component
Project Details
Publish a b-table customized editable component vue-table-editable as a NPM module
Module Name: vue-table-editable
Latest version: 0.0.5
####Component main configurations
tableOptions
name | feature descriptions | value ------ | -------| -------
ttAlign| Table title alignment|leftorcenterttText| Table title text| anytextcan usettFontsize| Table title font size| any number withpx(ex:15px)ttColor| Table title text color| act as csscolorpropertyrHover| Table rows hover|trueorfalsetBorder| Table cells seperate with border|trueorfalsethColor| Table header background color|dark,lightandnonedeleteAlertTitle| Table row action confirmation alert message| ant text with typestringeditable| Table rows edit button show or hide|trueorfalsedeletable| Table rows delete button show or hide|trueorfalsefilterFloats| Table filter align direction|left,centerorrightpgAlign| Table pagination section alignment|left,centerorrightpgPosition| Table pagination display position|toporbottompgPerPage| Table rows per page| use anumberwhich more than 1pgSize| Table pagination display size|sm,mdorlgimgSize| Table rows loading images size|sm,mdorlg`items
- The type of the Data which pass to components should be an
Array
- The type of the Data which pass to components should be an
fields
name | feature descriptions | value ------ | -------| -------
key| Table header map to items| anytextthat show the items datalabel| Table header show name| anytextcan usetype| Table column data type|text,numberandimgsortable| Table column want to sort|trueorfalsefilterOn| Column data want to filter|trueorfalseoutput-change
After edit or delete, a row in table sends an event called
output-change- Return action
savewhen row save after edit - Return action
deletewhen row delete success
- Return action
#####How to use editable table component
First add <TableComponent></TableComponent> to vue file
Add props as below
<TableComponent
:items="itemsSet"
:fields="fieldSet"
:tableOptions="tableOptions"
@output-change="handleOutput">
</TableComponent>
Update database when change happened in table rows (Edit or Delete)
handleOutput(action, data) {
if (action === "delete") {
// remove data from database
} else if (action === "save) {
// update data in database
}
}
Test node version: v10.17.0
#####Use only edit button and hide delete button. Table title color change into green

#####Use only edit and delete buttons. Filter and pagination both are in top of the table

#####Edit the row when click the edit button

#####Load images in a table

