📄 Index table for Vue It has been created to accelerate the task of creating a table to index a resource and add buttons for its administration.
- Cancel requests
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Using npm:
$ npm install @cceo/vue-index-table --save
<template>
<div>
<Index
:title="title"
:subtitle="subtitle"
:homeURL="homeURL"
:addButton="addButton"
:columns="columns"
:data="data"
:buttons="buttons"
></Index>
</div>
</template>
<script>
import Index from 'vue-index-table';
export default {
name: 'FieldsPage',
components: {Index},
data() {
return {
title: 'Fields',
subtitle: 'Index of Fields',
homeURL: '/',
addButton: {
title: 'New',
URL: '/system/field/create'
},
columns: ['id', 'nombre', 'direccion', 'responsable', 'actions'],
data: [
{
id: 1,
nombre: 'Canchita 1',
direccion: 'Juarez #123',
responsable: 'David MartÃnez'
},
{
id: 2,
nombre: 'Canchita 2',
direccion: 'Las lomas #45',
responsable: 'Roberto López'
},
{
id: 3,
nombre: 'Canchita 3',
direccion: 'Av. Universidad #565',
responsable: 'MarÃa Gutierrez'
}
],
buttons: [
{
name: 'show',
icon: 'fa fa-eye',
URL: 'fields/show',
method: 'get',
variant: 'success'
},
{
name: 'edit',
icon: 'fa fa-pencil',
URL: 'fields/edit',
method: 'get',
variant: 'primary',
visible : (canchita) => canchita.isEditable
},
{
name: 'delete',
icon: 'fa fa-trash',
URL: '',
method: 'delete',
variant: 'danger',
modal: {
title: 'Eliminar',
text: 'Si se elimina no se podrá recuperar después.'
}
},
]
};
},
};
</script>
If you discover a security vulnerability within this package, please send an e-mail to contacto@cceo.com.mx.
This package is open-sourced software licensed under the MIT license.