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.
wiki/client/store/editor.js

29 lines
533 B

import { make } from 'vuex-pathify'
const state = {
editor: '',
5 years ago
editorKey: '',
content: '',
mode: 'create',
activeModal: '',
media: {
folderTree: [],
currentFolderId: 0,
currentFileId: null
}
}
export default {
namespaced: true,
state,
mutations: {
...make.mutations(state),
pushMediaFolderTree: (st, folder) => {
st.media.folderTree = st.media.folderTree.concat(folder)
},
popMediaFolderTree: (st) => {
st.media.folderTree = st.media.folderTree.slice(0, -1)
}
}
}