优化列表选择逻辑

pull/225/head
lyswhut 2020-04-27 22:29:49 +08:00
parent 07800bdb83
commit db04b0c285
1 changed files with 3 additions and 1 deletions

View File

@ -224,7 +224,9 @@ export default {
this.selectdList.splice(index, 1) this.selectdList.splice(index, 1)
event.currentTarget.classList.remove('active') event.currentTarget.classList.remove('active')
} }
} else if (this.selectdList.length) this.removeAllSelect() } else if (this.selectdList.length) {
this.removeAllSelect()
} else return
this.$emit('input', [...this.selectdList]) this.$emit('input', [...this.selectdList])
}, },
removeAllSelect() { removeAllSelect() {