particles-bg-vue
particles-bg-vue copied to clipboard
help or bug Nuxt
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
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
Did you find a solution for this? I'm also having the same problem.
no :-(
Whether some settings are not right, maybe you can read this article https://blog.tubone-project24.xyz/2019/12/02/particles-bg-vue
引入相关组件后,页面还是无变化
wrapping it around no-ssr tag may fix the problem :)
edit:
you should also change plugins: ["@/plugins/particles"],
to plugins: ["@/plugins/particles" , mode: 'client'],