有没有办法将参数传递给:move事件,如下所示:
<draggable :move="onMove(param)"> </draggable>然后可以将其与事件一起使用,例如:
methods: {
onMove(event, param) {
// do stuff
}
}发布于 2020-06-28 09:21:54
您可以这样做:
<draggable :move="(event) => onMove(event, 'someOtherVariableInThisExampleJustAString')">而且,很自然地,像这样使用它:
methods: {
onMove(event, param) {
// do stuff
}
}https://stackoverflow.com/questions/62617209
复制相似问题