fix:优化框选组件有时选不上的问题

main
liu.shiyi 1 year ago
parent 8b0b2c4f9d
commit 1d7429f541

@ -143,9 +143,9 @@ export default {
if (event.button === 0 && this.isSelecting) {
this.isSelecting = false
if (newTime - time < 300) {
newTime = 0
time = 0
return
// newTime = 0
// time = 0
// return
}
newTime = 0
time = 0

@ -513,7 +513,7 @@ export default {
const activeCodes = this.chartList
?.filter((chart) => {
const { x, y, w, h } = chart
return startX <= x && x + w <= endX && startY <= y && y + h <= endY
return startX - 50 <= x && x + w <= endX && startY - 50 <= y && y + h <= endY
})
?.map((chart) => chart.code)
this.changeActiveCodes(activeCodes)

Loading…
Cancel
Save