Comments (3)
<vue-draggable-resizable v-for="item in allData" :key="item.id" :x="item.x" :y="item.y" :w="item.width" :h="item.height" :isActive="true" :is-conflict-check="true" @dragging="onDrag()" @resizing="onResize()"> </vue-draggable-resizable>
下面是定义的数组
allData: [ { id: 1, x: 200, y: 200, width: 400, height; 400 }, { id: 1, x: 300, y: 300, width: 400, height: 400 }, { id: 1, x: 400, y: 400, width: 400, height: 400 }, ]
请问我这样循环,多个可进行拖拽的div,但是resizing和dragging事件中的参数,x、y、width、height是undefined,这是什么原因
onResize (x, y, width, height) { console.log(x); console.log(y); console.log(width); console.log(height); },
from vue-draggable-resizable-gorkys.
@ccyzz 方法上面不需要括号(),@dragging="onDrag" @resizing="onResize"
from vue-draggable-resizable-gorkys.
感谢!之前一直没注意到我加了一个括号,这下知道问题了,谢谢啊!
from vue-draggable-resizable-gorkys.
Related Issues (20)
- 当拖拽组件满足多个组件的吸附条件时,出现多条辅助线 HOT 1
- 当点击组件执行activated函数时,组件的transform属性没了
- vue2.0升级到3.0 使用报错TypeError: Cannot read properties of undefined (reading '_c') HOT 3
- 一个拖拽组件存在大量元素时,拖拽卡顿 HOT 1
- 通过v-for生成多个托拽元素遇到的问题 HOT 2
- :x和:y绑定了变量或表达式时,辅助线和吸附功能失效 HOT 1
- 自定义句柄class后,不显示句柄且不可resize
- 拖动组件后,设置xywh属性第二次会无效 HOT 2
- 冲突检测、吸附对齐不支持移动端? HOT 1
- 修改父级大小,重新计算x,y,w,h之后,拖拽冲突检测有可能会失效?原因在这里
- minWidth不能动态改变吗
- 不规则形状
- 如何根据,元素的边线,进行元素大小的调整 HOT 1
- 父级容器使用 transform: scale 移动画布内元素,动画卡顿 HOT 1
- 请问下如何右键选中组件呢,现在只能通过单击
- 如何在旋转之后控制柄按照旋转角度进行resizing
- 各个vdr组件通过z-index区分层级,被遮挡住的元素怎么拖拽
- echarts 拖拽第二个之后的都是白图没有颜色 HOT 1
- macos cannot use dragging multiple elements simultaneously in the presentation address
- 同时拖拽多个元素,快速拖拽组件移动不同步 HOT 1
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 vue-draggable-resizable-gorkys.