0.0.7 • Published 8 months ago

vue-pe-library v0.0.7

Weekly downloads
-
License
-
Repository
github
Last release
8 months ago

vue-pe-library

Vue FrontEnd Library

This library will contain the main components need it to build and applications.

Instalation

npm i vue-pe-library

PeTable

<PeTable/>

How to display data ?

// You should provide headers and records.
// Example: 

<script setup lang="ts">
    import {PeTable} from "vue-pe-library";

    // Headers should have the following structure. 
    let headers = [ { title: 'Id', name: 'id' }, { title: 'Brand', name: 'brand' } ]
    let records = [ { id: 1, brand: 'Kiat' }, { id: 2, brand: 'Chevrolet' }, { id: 3, brand: 'Toyota' } ]
</script>

<template> 
    <PeTable :headers="headers" :records="records" />
</template>

Table Pagination

// Add numRecords property to implement the pagination.
// Example: 

<script setup lang="ts">
    import {PeTable} from "vue-pe-library";

    // Headers should have the following structure. 
    let headers = [ { title: 'Id', name: 'id' }, { title: 'Brand', name: 'brand' } ]
    let records = [ { id: 1, brand: 'Kia' }, { id: 2, brand: 'Chevrolet' }, { id: 3, brand: 'Toyota' }, { id: 4, brand: 'Ford' }, { id: 5, brand: 'Fiat' }, { id: 6, brand: 'Mercedes Benz' }  ]
</script>

<template> 
    <PeTable :headers="headers" :records="records" :numRecords="5"/>
</template>

alt text

Sorting Headers (Asc/Desc)

// Add order property to implement the sorting.
// Example: 

<script setup lang="ts">
    import {PeTable} from "vue-pe-library";

    // Headers should have the following structure. 
    let headers = [ { title: 'Id', name: 'id' }, { title: 'Brand', name: 'brand' } ]
    let records = [ { id: 1, brand: 'Kia' }, { id: 2, brand: 'Chevrolet' }, { id: 3, brand: 'Toyota' }, { id: 4, brand: 'Ford' }, { id: 5, brand: 'Fiat' }, { id: 6, brand: 'Mercedes Benz' }  ]
</script>

<template> 
    <PeTable :headers="headers" :records="records" :order="true"/>
</template>

alt text

Table or Grid

// Add multipleViews property to implement the change view option.
// Example: 

<script setup lang="ts">
    import {PeTable} from "vue-pe-library";

    // Headers should have the following structure. 
    let headers = [ { title: 'Id', name: 'id' }, { title: 'Brand', name: 'brand' } ]
    let records = [ { id: 1, brand: 'Kia' }, { id: 2, brand: 'Chevrolet' }, { id: 3, brand: 'Toyota' }, { id: 4, brand: 'Ford' }, { id: 5, brand: 'Fiat' }, { id: 6, brand: 'Mercedes Benz' }  ]
</script>

<template> 
    <PeTable :headers="headers" :records="records" :multipleViews="true"/>
</template>

alt text

Filter & Searching

// Add filter property to implement the searching functionality.
// Example: 

<script setup lang="ts">
    import {PeTable} from "vue-pe-library";

    // Headers should have the following structure. 
    let headers = [ { title: 'Id', name: 'id' }, { title: 'Brand', name: 'brand' } ]
    let records = [ { id: 1, brand: 'Kia' }, { id: 2, brand: 'Chevrolet' }, { id: 3, brand: 'Toyota' }, { id: 4, brand: 'Ford' }, { id: 5, brand: 'Fiat' }, { id: 6, brand: 'Mercedes Benz' }  ]
</script>

<template> 
    <PeTable :headers="headers" :records="records" :filter="true"/>
</template>

alt text

0.0.5

8 months ago

0.0.7

8 months ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago