GithubHelp home page GithubHelp logo

Comments (7)

hcg1023 avatar hcg1023 commented on May 22, 2024

First of all, you should first confirm whether the DndProvider is used in the upper component and the correct attributes are passed
If you are sure that there is no problem with the above steps, but you still encounter the above error, you can check whether there are two vue-demi in node_modules at the same time (for example, vueuse and vue3-dnd are installed at the same time), or exist at the same time Two different versions of vue etc.
If you encounter such a problem, I suggest you use pnpm install to solve it

from vue3-dnd.

LIUSHUAI2018 avatar LIUSHUAI2018 commented on May 22, 2024

我也出现了这个问题,我使用的是pnpm install,我的项目里面的确有vueuse

from vue3-dnd.

hcg1023 avatar hcg1023 commented on May 22, 2024

我也出现了这个问题,我使用的是pnpm install,我的项目里面的确有vueuse

可以检查一下,看看是不是安装了两个不同版本的vue

from vue3-dnd.

LIUSHUAI2018 avatar LIUSHUAI2018 commented on May 22, 2024

image

image

我也出现了这个问题,我使用的是pnpm install,我的项目里面确实有vueuse

可以检查一下,看看是不是安装了两个不同版本的vue

from vue3-dnd.

LIUSHUAI2018 avatar LIUSHUAI2018 commented on May 22, 2024

我也出现了这个问题,我使用的是pnpm install,我的项目里面确实有vueuse

可以检查一下,看看是不是安装了两个不同版本的vue

这个是个非常简单的实例,除了vue和vuednd没有其他依赖
image

from vue3-dnd.

hcg1023 avatar hcg1023 commented on May 22, 2024

你这段代码出现这个的原因在于,你的DndProvider没有放到上层组件,或者你把drop封装成一个单独的组件,DndProvider和useDrop/useDrag/useDragLayer在同一个组件内时,确实会出现这种问题,原因是provider和inject找的是上层组件,而不是当前组件 @LIUSHUAI2018

from vue3-dnd.

LIUSHUAI2018 avatar LIUSHUAI2018 commented on May 22, 2024

可能代码出现这个问题的原因是,你的DndProvider没有放到上层组件,或者你把drop封装做成一个单独的组件,DndProvider和useDrop/useDrag/useDragLayer在同一个组件内时,确实会出现这种问题,原因是provider和inject找的是上层组件,而不是当前组件@LIUSHUAI2018

ok了

from vue3-dnd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.