spark-grid-vue3
v0.0.73
Published
A powerful and flexible data table component for Vue 3 and Nuxt.js.
Downloads
1,339
Readme
Arcana DataTable
A powerful and flexible data table component for Vue 3 and Nuxt.js.
Installation
npm install @arcanalabs/datatableNuxt.js Setup
- Add
@arcanalabs/datatableto themodulessection ofnuxt.config.ts:
// nuxt.config.ts
export default defineNuxtConfig({
modules: [
'@arcanalabs/datatable'
]
})- That's it! You can now use the
<ArcanaDataTable />component in your Nuxt pages and components.
Usage
<template>
<ArcanaDataTable :config="config" />
</template>
<script setup lang="ts">
import type { ArcanaDataTableConfig } from '@arcanalabs/datatable'
const config: ArcanaDataTableConfig = {
columns: [
{ name: 'id', label: 'ID' },
{ name: 'name', label: 'Name' }
],
datasource: async () => {
return [
{ id: 1, name: 'John Doe' },
{ id: 2, name: 'Jane Doe' }
]
}
}
</script>