Appearance
Installation
Adding library
Add
vuneo-datatableand its supporting librariesbash# pnpm pnpm add vueno-datatable # yarn yarn add pnpm add vueno-datatable # npm npm install pnpm add vueno-datatable
Usage
Update your main.js file like below:
js
import vuenoDatatable from 'vueno-datatable'
import 'vueno-datatable/dist/style.css'
import { createApp } from 'vue'
import App from './App.vue'
// this will register the componenet globally
createApp(App).mount('#app')
It's done! 🥳
Now, Just refer to the component in your vue files:
vue
<template>
<VDatatable :headers="headers" :rows="rows" />
</template>
<script setup>
import { users } from '../demo/users'
const headers = [
{
value: 'name',
label: 'Name',
},
{
value: 'email',
label: 'Email',
},
{
value: 'age',
label: 'Age',
sortable: true,
},
]
const rows = users
</script>