修复列表问题
parent
c9cb84a28d
commit
9afafec9d6
|
@ -361,7 +361,7 @@ const mutations = {
|
||||||
|
|
||||||
const index = userLists.findIndex(l => l.id == id)
|
const index = userLists.findIndex(l => l.id == id)
|
||||||
if (index < 0) return
|
if (index < 0) return
|
||||||
let targetList = userLists[id]
|
let targetList = userLists[index]
|
||||||
userLists.splice(index, 1)
|
userLists.splice(index, 1)
|
||||||
userLists.splice(index - 1, 0, targetList)
|
userLists.splice(index - 1, 0, targetList)
|
||||||
window.eventHub.emit(eventListNames.listChange, [id])
|
window.eventHub.emit(eventListNames.listChange, [id])
|
||||||
|
@ -375,7 +375,7 @@ const mutations = {
|
||||||
}
|
}
|
||||||
const index = userLists.findIndex(l => l.id == id)
|
const index = userLists.findIndex(l => l.id == id)
|
||||||
if (index < 0) return
|
if (index < 0) return
|
||||||
let targetList = userLists[id]
|
let targetList = userLists[index]
|
||||||
userLists.splice(index, 1)
|
userLists.splice(index, 1)
|
||||||
userLists.splice(index + 1, 0, targetList)
|
userLists.splice(index + 1, 0, targetList)
|
||||||
window.eventHub.emit(eventListNames.listChange, [id])
|
window.eventHub.emit(eventListNames.listChange, [id])
|
||||||
|
|
Loading…
Reference in New Issue