Vue 传递第三方组件定义默认参数和自定义参数
<VueDraggableResizable
v-for="(dItem, dIndex) in component.activityList"
:key="dIndex"
class="list"
:w="dItem.width"
:h="dItem.height"
:x="dItem.left"
:y="dItem.top"
:parent="true"
@resizing="
(left, top, width, height) =>
onResize(left, top, width, height, dIndex)
"
@dragging="(left, top) => onDrag(left, top, dIndex)"
>
</VueDraggableResizable>
onResize(left, top, width, height, index) {
this.component.activityList[index].left = left;
this.component.activityList[index].top = top;
this.component.activityList[index].width = width;
this.component.activityList[index].height = height;
},