修复搜索问题
parent
f79ae1541d
commit
822e1ea6c9
|
@ -92,7 +92,7 @@ export default {
|
||||||
handleSearch()
|
handleSearch()
|
||||||
break
|
break
|
||||||
case 'listClick':
|
case 'listClick':
|
||||||
searchText.value = tipList[data]
|
searchText.value = tipList.value[data]
|
||||||
nextTick(handleSearch)
|
nextTick(handleSearch)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -318,7 +318,10 @@ export default {
|
||||||
if (isNeedReverse) this.selectedData.reverse()
|
if (isNeedReverse) this.selectedData.reverse()
|
||||||
let nodes = this.$refs.dom_tbody.childNodes
|
let nodes = this.$refs.dom_tbody.childNodes
|
||||||
do {
|
do {
|
||||||
nodes[lastSelectIndex].classList.add('active')
|
const node = nodes[lastSelectIndex]
|
||||||
|
if (node.tagName == 'TR') {
|
||||||
|
node.classList.add('active')
|
||||||
|
}
|
||||||
lastSelectIndex++
|
lastSelectIndex++
|
||||||
} while (lastSelectIndex <= clickIndex)
|
} while (lastSelectIndex <= clickIndex)
|
||||||
}
|
}
|
||||||
|
@ -353,12 +356,12 @@ export default {
|
||||||
let targetSong = this.listInfo.list[index]
|
let targetSong = this.listInfo.list[index]
|
||||||
// if (!targetSong || !this.assertApiSupport(targetSong.source)) return
|
// if (!targetSong || !this.assertApiSupport(targetSong.source)) return
|
||||||
this.listAdd({ id: 'default', musicInfo: targetSong })
|
this.listAdd({ id: 'default', musicInfo: targetSong })
|
||||||
let targetIndex = getList(defaultList.id).list.findIndex(
|
let targetIndex = getList(defaultList.id).findIndex(
|
||||||
s => s.songmid === targetSong.songmid,
|
s => s.songmid === targetSong.songmid,
|
||||||
)
|
)
|
||||||
if (targetIndex > -1) {
|
if (targetIndex > -1) {
|
||||||
this.setList({
|
this.setList({
|
||||||
list: defaultList.id,
|
listId: defaultList.id,
|
||||||
index: targetIndex,
|
index: targetIndex,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -370,7 +373,9 @@ export default {
|
||||||
this.removeAllSelect()
|
this.removeAllSelect()
|
||||||
this.selectedData = [...this.listInfo.list]
|
this.selectedData = [...this.listInfo.list]
|
||||||
let nodes = this.$refs.dom_tbody.childNodes
|
let nodes = this.$refs.dom_tbody.childNodes
|
||||||
|
console.log(nodes)
|
||||||
for (const node of nodes) {
|
for (const node of nodes) {
|
||||||
|
if (node.tagName != 'TR') continue
|
||||||
node.classList.add('active')
|
node.classList.add('active')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue