SortableJS / Vue.Draggable

Vue drag-and-drop component based on Sortable.js
https://sortablejs.github.io/Vue.Draggable/
MIT License
20.03k stars 2.89k forks source link

window.Vue.component is not a function #914

Open niesai opened 4 years ago

niesai commented 4 years ago

First check https://github.com/SortableJS/Vue.Draggable/blob/master/CONTRIBUTING.md

Jsfiddle link

Step by step scenario

Actual Solution

Expected Solution

John-Soul commented 4 years ago

Haw, I have this bug too, This bug is sporadic to me. I use this method fixed.

Find main.js write: import draggable from 'vuedraggable' Vue.use(draggable)

if you need lazy load, please check the relevant documents.

ghost commented 3 years ago

Can confirm it

David-Desmaisons commented 3 years ago

I need the scenario, the code and the stacktrace otherwise there is nothing I can do.

zsxeee commented 3 years ago

I found a possible problem:

if (typeof window !== "undefined" && "Vue" in window) {
  window.Vue.component("draggable", draggableComponent);
}

i find an element which id is "Vue" in my boilerplate, that cause this problem.

giangnh13579 commented 5 months ago

Hi, is this issue solved or abandoned?