@ -62,6 +62,12 @@ const addSelect = () => {
height: (75 - 15 * 2) * zoom,
fill: 'rgba(238,10,36, 0.2)',
draggable: true,
dragBoundFunc(pos) {
return {
x: 0, // X坐标保持不变
y: pos.y, // 允许Y坐标变化
}
},
})
// 在onMounted中rect创建后添加拖拽监听