2.0.0-alpha.14 • Published 2 months ago

vueye-table v2.0.0-alpha.14

Weekly downloads
27
License
MIT
Repository
github
Last release
2 months ago

Vueye Table

Vueye Table is a Vue 3 component for displaying data in a table.

Installation

Vue 3:

npm install vueye-table

Nuxt :

npm install nuxt-vueye-table

Usage

Vue :

<script setup lang="ts">
    import { VueyeTable } from 'vueye-table'

    const items = [
        {
            id: 60,
            name: {
                first_name: 'Brahim',
                last_name: 'Boussadjra',
            },
            age: 30,
            address: {
                country: 'Algeria',
                city: 'Algiers',
            },
        },
        //...
    ]
</script>

<template>
    <VueyeTable :data="items" />
</template>

Nuxt :

// nuxt.config.js
export default defineNuxtConfig({
    modules: ['nuxt-vueye-table'],
    // ...
})

VueyeTableProps

Prop NameTypeDefault ValueDescription
dataTData[][]An array of data for the table.
columnHeadersTColumn[] or a function returning an array[]An array of column headers for the table.
itemValuestring'id'The property name used as a unique identifier for each item.
perPagenumber10The number of items displayed per page.
currentPagenumber1The current page number.
perPageOptionsnumber[] or a function returning an array5, 10, 20, 30An array of options for the number of items per page.
loadingbooleanfalseIndicates whether the table is in a loading state.
selectedTData[], Row[], or nullnullAn array of selected items or rows.
selectMode'page' or 'all''all'The mode for selecting items: 'page' or 'all'.
captionstring''The table's caption.
summarystring''The table's summary.

VueyeTableEmits

Emit NameParametersDescription
update:loadingvalue: booleanEmits when the loading state changes.
update:selectedvalue: T[]Emits when the selected items change.

PaginationEmits

Emit NameParametersDescription
update:currentPagevalue: numberEmits when the current page changes.
update:perPagevalue: numberEmits when the number of items per page changes.

SlotHeader

The SlotHeader component defines various slots for customizing the table header.

  • headerCell.<ColumnKey>: Slot for customizing the content of a specific column header.
  • headerCellContent.<ColumnKey>: Slot for customizing the content within a specific column header cell.
  • headers: Slot for customizing the entire table header, containing all column headers.
  • checkbox: Slot for customizing the checkbox used for selecting all items.

SlotRow

The SlotRow component defines various slots for customizing the table rows.

  • itemCell.<ItemKey>: Slot for customizing the content of a specific item cell within a row.
  • itemCellContent.<ItemKey>: Slot for customizing the content within a specific item cell.
  • rows: Slot for customizing the entire table rows, containing all rows.
  • row: Slot for customizing a specific row.
  • checkbox: Slot for customizing the checkbox used for selecting a specific row.

You can use these Markdown tables to document the props, emits, and slot definitions for the data table and pagination components in your Vue 3 project.

2.0.0-alpha.14

2 months ago

2.0.0-alpha.13

2 months ago

2.0.0-alpha.12

2 months ago

2.0.0-alpha.7

6 months ago

2.0.0-alpha.8

6 months ago

2.0.0-alpha.9

6 months ago

2.0.0-alpha.10

6 months ago

2.0.0-alpha.6

7 months ago

2.0.0-alpha.3

8 months ago

2.0.0-alpha.4

7 months ago

2.0.0-alpha.5

7 months ago

2.0.0-alpha.1

9 months ago

2.0.0-alpha.2

8 months ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

1.0.0-beta.4

4 years ago

1.0.0-beta.3

4 years ago

1.0.0-beta.2

4 years ago

1.0.0-beta-1

4 years ago

1.0.0-beta.0

4 years ago

0.1.0

6 years ago