diff --git a/cateditor/src/components/AddSectionDialog.vue b/cateditor/src/components/AddSectionDialog.vue
index e39f2a5..5fa81e9 100644
--- a/cateditor/src/components/AddSectionDialog.vue
+++ b/cateditor/src/components/AddSectionDialog.vue
@@ -26,7 +26,7 @@
:disabled="!valid"
color="primary"
flat
- @click="show = false">OK
+ @click="doNewSection()">OK
@@ -37,8 +37,8 @@
diff --git a/cateditor/src/pages/editor/store/index.js b/cateditor/src/pages/editor/store/index.js
index adae648..f6cd53a 100644
--- a/cateditor/src/pages/editor/store/index.js
+++ b/cateditor/src/pages/editor/store/index.js
@@ -284,6 +284,15 @@ export const store = new Vuex.Store({
// manipulation
//
+ newSection({ commit, getters }, name) {
+ let section = {
+ name: name,
+ id: getters.nextSectionID,
+ pages: [],
+ }
+ commit('addSection', section)
+ },
+
reorderSection({ commit }, payload) {
commit('reorderSection', payload)
},