2018-07-15 23:16:19 +00:00
|
|
|
import { make } from 'vuex-pathify'
|
|
|
|
|
|
|
|
const state = {
|
2019-01-01 22:03:30 +00:00
|
|
|
editor: '',
|
2019-09-08 16:01:17 +00:00
|
|
|
editorKey: '',
|
2018-07-22 20:25:39 +00:00
|
|
|
content: '',
|
2019-03-20 04:37:33 +00:00
|
|
|
mode: 'create',
|
2019-07-14 20:23:33 +00:00
|
|
|
activeModal: '',
|
|
|
|
media: {
|
|
|
|
folderTree: [],
|
|
|
|
currentFolderId: 0,
|
|
|
|
currentFileId: null
|
|
|
|
}
|
2018-07-15 23:16:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
namespaced: true,
|
|
|
|
state,
|
2019-07-14 20:23:33 +00:00
|
|
|
mutations: {
|
|
|
|
...make.mutations(state),
|
|
|
|
pushMediaFolderTree: (state, folder) => {
|
|
|
|
state.media.folderTree = state.media.folderTree.concat(folder)
|
|
|
|
},
|
|
|
|
popMediaFolderTree: (state) => {
|
|
|
|
state.media.folderTree = state.media.folderTree.slice(0, -1)
|
|
|
|
}
|
|
|
|
}
|
2018-07-15 23:16:19 +00:00
|
|
|
}
|