1.0.19 • Published 5 years ago

@cceo/vue-index-table v1.0.19

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Index table

📄 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.

Features

  • Cancel requests

Browser Support

ChromeFirefoxSafariOperaEdgeIE
Latest ✔Latest ✔Latest ✔Latest ✔Latest ✔11 ✔

Installing

Using npm:

$ npm install @cceo/vue-index-table --save

Example

<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>

Security Vulnerabilities

If you discover a security vulnerability within this package, please send an e-mail to contacto@cceo.com.mx.

License

This package is open-sourced software licensed under the MIT license.

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago