vue-xlsx icon indicating copy to clipboard operation
vue-xlsx copied to clipboard

Install in nuxtjs not working

Open dker92 opened this issue 2 years ago • 1 comments

Hi everyone, I am trying to install this package in nuxtjs but it seems to no be working My vue-xlsx.js plugin

import Vue from 'vue'
import { XlsxWorkbook, XlsxSheet, XlsxDownload } from 'vue-xlsx'

Vue.use(XlsxWorkbook)
Vue.use(XlsxSheet)
Vue.use(XlsxDownload)

nuxt.config

  plugins: [
    '@/plugins/element-ui',
    '@/plugins/axios',
    '@/plugins/bus',
    '@/plugins/reactive-search',
    '@/plugins/buefy',
    '@/plugins/vue-xlsx',
  ],

dker92 avatar Mar 23 '22 13:03 dker92

Hello @dker92, Replace

Vue.use(XlsxWorkbook) Vue.use(XlsxSheet) Vue.use(XlsxDownload)

with

Vue.component('XlsxWorkbook', XlsxWorkbook) Vue.component('XlsxSheet', XlsxSheet) Vue.component('XlsxDownload', XlsxDownload)

RahatChoudhary avatar Dec 08 '22 07:12 RahatChoudhary