refactor: editor codeblock -> Vue component
This commit is contained in:
@@ -2,8 +2,21 @@
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {},
|
||||
state: {
|
||||
busy: false,
|
||||
insertContent: ''
|
||||
},
|
||||
getters: {},
|
||||
mutations: {},
|
||||
actions: {}
|
||||
mutations: {
|
||||
busyChange: (state, busyState) => { state.shown = busyState },
|
||||
insertContentChange: (state, newContent) => { state.insertContent = newContent }
|
||||
},
|
||||
actions: {
|
||||
busyStart({ commit }) { commit('busyChange', true) },
|
||||
busyStop({ commit }) { commit('busyChange', false) },
|
||||
insert({ commit }, content) {
|
||||
commit('insertContentChange', content)
|
||||
wikijs.$emit('editor/insert')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user