mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
534 B
28 lines
534 B
import { make } from 'vuex-pathify'
|
|
|
|
const state = {
|
|
editor: '',
|
|
content: '',
|
|
mode: 'create',
|
|
activeModal: '',
|
|
media: {
|
|
folderTree: [],
|
|
currentFolderId: 0,
|
|
currentFileId: null
|
|
}
|
|
}
|
|
|
|
export default {
|
|
namespaced: true,
|
|
state,
|
|
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)
|
|
}
|
|
}
|
|
}
|