GithubHelp home page GithubHelp logo

Comments (3)

ccyzz avatar ccyzz commented on May 16, 2024

<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.

gorkys avatar gorkys commented on May 16, 2024

@ccyzz 方法上面不需要括号(),@dragging="onDrag" @resizing="onResize"

from vue-draggable-resizable-gorkys.

ccyzz avatar ccyzz commented on May 16, 2024

感谢!之前一直没注意到我加了一个括号,这下知道问题了,谢谢啊!

from vue-draggable-resizable-gorkys.

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.