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