Comments (7)
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.
我也出现了这个问题,我使用的是pnpm install,我的项目里面的确有vueuse
from vue3-dnd.
我也出现了这个问题,我使用的是pnpm install,我的项目里面的确有vueuse
可以检查一下,看看是不是安装了两个不同版本的vue
from vue3-dnd.
我也出现了这个问题,我使用的是pnpm install,我的项目里面确实有vueuse
可以检查一下,看看是不是安装了两个不同版本的vue
from vue3-dnd.
我也出现了这个问题,我使用的是pnpm install,我的项目里面确实有vueuse
可以检查一下,看看是不是安装了两个不同版本的vue
这个是个非常简单的实例,除了vue和vuednd没有其他依赖
from vue3-dnd.
你这段代码出现这个的原因在于,你的DndProvider没有放到上层组件,或者你把drop封装成一个单独的组件,DndProvider和useDrop/useDrag/useDragLayer在同一个组件内时,确实会出现这种问题,原因是provider和inject找的是上层组件,而不是当前组件 @LIUSHUAI2018
from vue3-dnd.
可能代码出现这个问题的原因是,你的DndProvider没有放到上层组件,或者你把drop封装做成一个单独的组件,DndProvider和useDrop/useDrag/useDragLayer在同一个组件内时,确实会出现这种问题,原因是provider和inject找的是上层组件,而不是当前组件@LIUSHUAI2018
ok了
from vue3-dnd.
Related Issues (20)
- 使用vue-tsc && vite build编译之后,页面console报错 HOT 2
- 原react-dnd中useDrop有canDrop方法控制是否可以放置,希望可以增加这个方法。感谢 HOT 4
- how to use with elment plus <el-tree> HOT 1
- vue3-dnd-test-utils, peerDependency "@testing-library/vue": ">= 11" is unknown HOT 4
- 拖动时的预览图能否设置样式 HOT 5
- Plans to support iOS? HOT 12
- 关于vue3的toRefs HOT 2
- useDrop isOver在进入放置目标时会变化两次? HOT 4
- transition animation HOT 2
- 使用官方demo报错 HOT 6
- 支持单击或双击放置目标吗? HOT 3
- 想实现基于鼠标按下后,移动了指定的x,y距离后再进行拖拽,这个在useDrag的canDrag里获取不到实时的鼠标信息,如何实现这种效果? HOT 2
- useDrag 无法配置beginDrag参数 HOT 4
- 想知道如何写楼层装修,例子里面没有找到,试了很久也不行。 HOT 4
- Cannot read properties of undefined (reading 'NODE_ENV') HOT 7
- Invariant Violation: Expected targetIds to be registered. HOT 4
- Variable conflict: Cannot read properties of undefined (reading 'NODE_ENV')
- Invalid prop: type check failed for prop "context". Expected Object, got Window HOT 11
- 关于实例问题 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue3-dnd.