diff --git a/src/components/EditSites.vue b/src/components/EditSites.vue index 3ac1bcc..5e826cb 100644 --- a/src/components/EditSites.vue +++ b/src/components/EditSites.vue @@ -198,7 +198,7 @@ export default { }) }, selectionCellClick (selection, row) { - if (this.shiftDown && this.selectionBegin !== '') { + if (this.shiftDown && this.selectionBegin !== '' && selection.includes(row)) { this.selectionEnd = row.id const start = Math.min(this.selectionBegin, this.selectionEnd) - 1 const end = Math.max(this.selectionBegin, this.selectionEnd) @@ -209,7 +209,11 @@ export default { this.selectionBegin = this.selectionEnd = '' return } - this.selectionBegin = row.id + if (selection.includes(row)) { + this.selectionBegin = row.id + } else { + this.selectionBegin = '' + } }, handleSelectionChange (rows) { this.multipleSelection = rows diff --git a/src/components/IPTV.vue b/src/components/IPTV.vue index 74d4236..add4643 100644 --- a/src/components/IPTV.vue +++ b/src/components/IPTV.vue @@ -191,7 +191,7 @@ export default { return a.group.localeCompare(b.group, 'zh') }, selectionCellClick (selection, row) { - if (this.shiftDown && this.selectionBegin !== '') { + if (this.shiftDown && this.selectionBegin !== '' && selection.includes(row)) { this.selectionEnd = row.id const start = Math.min(this.selectionBegin, this.selectionEnd) - 1 const end = Math.max(this.selectionBegin, this.selectionEnd) @@ -202,7 +202,11 @@ export default { this.selectionBegin = this.selectionEnd = '' return } - this.selectionBegin = row.id + if (selection.includes(row)) { + this.selectionBegin = row.id + } else { + this.selectionBegin = '' + } }, handleSelectionChange (rows) { this.multipleSelection = rows