我的列表新增拖动调整位置功能

This commit is contained in:
lyswhut
2021-12-27 18:14:43 +08:00
parent b783c0c227
commit 028c2f9f03
12 changed files with 177 additions and 65 deletions
-10
View File
@@ -352,16 +352,6 @@ const mutations = {
list.name = name
window.eventHub.emit(eventListNames.listChange, [id])
},
moveupUserList(state, { id, isSync }) {
const index = userLists.findIndex(l => l.id == id)
if (index < 0) return
this.commit('list/setUserListPosition', { id, position: index - 1 })
},
movedownUserList(state, { id, isSync }) {
const index = userLists.findIndex(l => l.id == id)
if (index < 0) return
this.commit('list/setUserListPosition', { id, position: index + 1 })
},
setUserListPosition(state, { id, position, isSync }) {
if (!isSync) {
window.eventHub.emit(eventSyncName.send_action_list, {