particles-bg-vue icon indicating copy to clipboard operation
particles-bg-vue copied to clipboard

help or bug Nuxt

Open Ben621 opened this issue 4 years ago • 5 comments

Hi

i have read you post on nuxt dev.to so i have 2 thinks:

1 - when i put mode: "universal" i got an error:

cannot use import statement outside a module vue

but when i change it to spa it's work , i see also that appear in your post , but maybe you have omit to mention this change.

2 . when i tried to implement with vuetify that don't work:

<template>
  <v-app class="app">
    <particles-bg type="circle" :bg="true" /> 
    <nuxt/>
  </v-app>
</template>

here my print screen Screenshot from 2020-05-06 14-35-49

but with div instead of v-app work


step to reproduce

yarn create nuxt-app NuxtParticles
cd NuxtParticles
yarn add particles-bg-vue

add file plugins/particles.ts with this content

import Vue from "vue";
import VueParticlesBg from "particles-bg-vue";

Vue.use(VueParticlesBg);

edit the file nuxt.config.js

mode: 'spa'
plugins: ["@/plugins/particles"],

edit file layouts/default.vue as:

<template>
  <v-app class="app">
    <particles-bg type="circle" :bg="true" /> 
    <nuxt/>
  </v-app>
</template>

can you advise

Thank you

Ben621 avatar May 06 '20 11:05 Ben621

Did you find a solution for this? I'm also having the same problem.

Ntuk avatar Jun 27 '20 17:06 Ntuk

no :-(

Ben621 avatar Jun 28 '20 08:06 Ben621

Whether some settings are not right, maybe you can read this article https://blog.tubone-project24.xyz/2019/12/02/particles-bg-vue

lindelof avatar Jul 12 '20 10:07 lindelof

引入相关组件后,页面还是无变化

yaoxian666 avatar Feb 21 '21 14:02 yaoxian666

wrapping it around no-ssr tag may fix the problem :)

edit: you should also change plugins: ["@/plugins/particles"], to plugins: ["@/plugins/particles" , mode: 'client'],

MinedAnemone34 avatar Mar 06 '23 06:03 MinedAnemone34