vue-data-table icon indicating copy to clipboard operation
vue-data-table copied to clipboard

List Nuxt3 install instructions in readme

Open polyclick opened this issue 9 months ago • 0 comments

Hi

Would be great to put the install instructions for with nuxt3 in the readme. Took me a bit to figure it out ;)

  • Create file: /plugins/VueDataTable.plugin.ts
  • Use following code to register the plugin
// plugins/VueDataTable.plugin.ts
import { defineNuxtPlugin } from '#app'
import VueDataTable from '@uwlajs/vue-data-table'
import '@uwlajs/vue-data-table/dist/style.css'

export default defineNuxtPlugin(nuxtApp => {
  nuxtApp.vueApp.use(VueDataTable)
})

Nuxt3 will register the component automatically, with the default styling. Use it with tag: <vue-data-table></vue-data-table>

Cheers!

polyclick avatar May 07 '24 07:05 polyclick