mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-26 02:20:39 +00:00
bulk-operations v0.1
This commit is contained in:
+9
-4
@@ -5,7 +5,7 @@ import i18n from '@/i18n/index'
|
||||
|
||||
const defaultState = {
|
||||
uploadingFilesCount: undefined,
|
||||
fileInfoDetail: undefined,
|
||||
fileInfoDetail: [],
|
||||
currentFolder: undefined,
|
||||
uploadingFileProgress: 0,
|
||||
isProcessingFile: false,
|
||||
@@ -244,16 +244,21 @@ const mutations = {
|
||||
if (item.unique_id == updatedFile.unique_id) item.name = updatedFile.name
|
||||
})
|
||||
},
|
||||
REMOVE_ITEM_FILEINFO_DETAIL(state,item) {
|
||||
state.fileInfoDetail = state.fileInfoDetail.filter(element => element.unique_id !== item.unique_id)
|
||||
},
|
||||
CLEAR_FILEINFO_DETAIL(state) {
|
||||
state.fileInfoDetail = undefined
|
||||
state.fileInfoDetail = []
|
||||
},
|
||||
LOAD_FILEINFO_DETAIL(state, item) {
|
||||
state.fileInfoDetail = item
|
||||
state.fileInfoDetail = []
|
||||
state.fileInfoDetail.push(item)
|
||||
},
|
||||
GET_FILEINFO_DETAIL(state, item) {
|
||||
let checkData = state.data.find(el => el.unique_id == item.unique_id)
|
||||
if(state.fileInfoDetail.includes(checkData)) return
|
||||
|
||||
state.fileInfoDetail = checkData ? checkData : state.currentFolder
|
||||
state.fileInfoDetail.push(checkData ? checkData : state.currentFolder)
|
||||
},
|
||||
CHANGE_SEARCHING_STATE(state, searchState) {
|
||||
state.isSearching = searchState
|
||||
|
||||
Reference in New Issue
Block a user