vue-doc-preview icon indicating copy to clipboard operation
vue-doc-preview copied to clipboard

how to use in Nuxt.js

Open lenvonsam opened this issue 1 year ago • 1 comments

when i npm install in nuxt project, it occurs page error for document is not defined. how to resolve it ? @cainsyake image

lenvonsam avatar Aug 09 '23 01:08 lenvonsam

Nuxt2

  1. plugins

plugins/doc-preview.js

import Vue from 'vue';

import VueDocPreview from 'vue-doc-preview'

Vue.component('VueDocPreview', VueDocPreview)
  1. nuxt.config.js
plugins: [
    {src: '@/plugins/doc-preview', ssr: false}
  ],
  1. Use

nciefeiniu avatar Apr 09 '24 05:04 nciefeiniu