This commit is contained in:
lyswhut
2020-06-12 19:15:40 +08:00
parent 30e55f5acb
commit b3a13a25f0
7 changed files with 44 additions and 34 deletions
+3 -1
View File
@@ -53,6 +53,7 @@ export default {
isShiftDown: false,
isModDown: false,
},
lastSelectIndex: -1,
listMenu: {
isShowItemMenu: false,
itemMenuControl: {
@@ -232,7 +233,7 @@ export default {
handleSelectData(event, clickIndex) {
if (this.keyEvent.isShiftDown) {
if (this.selectdData.length) {
let lastSelectIndex = this.showList.indexOf(this.selectdData[this.selectdData.length - 1])
let lastSelectIndex = this.lastSelectIndex
this.removeAllSelect()
if (lastSelectIndex != clickIndex) {
let isNeedReverse = false
@@ -253,6 +254,7 @@ export default {
} else {
event.currentTarget.classList.add('active')
this.selectdData.push(this.showList[clickIndex])
this.lastSelectIndex = clickIndex
}
} else if (this.keyEvent.isModDown) {
let item = this.showList[clickIndex]