Closed cliqer closed 5 years ago
Hi, replace your plugin code with this:
import Draggable from 'vuedraggable';
import Vue from 'vue';
Vue.component('draggable', Draggable);
And remove import draggable from 'vuedraggable'
from your .vue file.
As stated by @PlainBane , Vue.use(draggable) won't work use Vue.component('draggable', Draggable); instead
When I introduce the following code into vueDraggable. Js, I still cannot globally introduce vueDraggable
import Draggable from 'vuedraggable' import Vue from 'vue' Vue.component('draggable', Draggable)
I wonder if the ssr: false
is really a good idea?... I needed to use this:
// using index.js in /plugins/draggable
plugins: [
{ src: '@/plugins/draggable'}
]
To avoid getting:
The client-side rendered virtual DOM tree is not matching server-rendered
Thanks! this help me save my time a lot =)
Hello, How to do this using Nuxt 3 ?
Hello, How to do this using Nuxt 3 ?
Created a plugin:
imported in nuxt.config.js
and try to use it like:
What am I missing here?