diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue
index 2f4405b4..61bbae82 100644
--- a/web/src/pages/Edit/components/Edit.vue
+++ b/web/src/pages/Edit/components/Edit.vue
@@ -4,7 +4,7 @@
-
+
@@ -21,6 +21,7 @@
+
@@ -40,7 +41,7 @@ import TouchEvent from 'simple-mind-map/src/plugins/TouchEvent.js'
import NodeImgAdjust from 'simple-mind-map/src/plugins/NodeImgAdjust.js'
import SearchPlugin from 'simple-mind-map/src/plugins/Search.js'
import Painter from 'simple-mind-map/src/plugins/Painter.js'
-import Outline from './Outline'
+import OutlineSidebar from './OutlineSidebar'
import Style from './Style'
import BaseStyle from './BaseStyle'
import Theme from './Theme'
@@ -67,6 +68,7 @@ import i18n from '../../../i18n'
import Search from './Search.vue'
import NodeIconSidebar from './NodeIconSidebar.vue'
import NodeIconToolbar from './NodeIconToolbar.vue'
+import OutlineEdit from './OutlineEdit.vue'
// 注册插件
MindMap
@@ -97,7 +99,7 @@ customThemeList.forEach((item) => {
export default {
name: 'Edit',
components: {
- Outline,
+ OutlineSidebar,
Style,
BaseStyle,
Theme,
@@ -113,7 +115,8 @@ export default {
SidebarTrigger,
Search,
NodeIconSidebar,
- NodeIconToolbar
+ NodeIconToolbar,
+ OutlineEdit
},
data() {
return {
diff --git a/web/src/pages/Edit/components/Outline.vue b/web/src/pages/Edit/components/Outline.vue
index c106e08e..0b24cb43 100644
--- a/web/src/pages/Edit/components/Outline.vue
+++ b/web/src/pages/Edit/components/Outline.vue
@@ -1,35 +1,32 @@
-
-
+
-
-
-
-
+ class="nodeEdit"
+ :key="getKey()"
+ contenteditable="true"
+ @keydown.stop="onKeydown($event, node)"
+ @keyup.stop
+ @blur="onBlur($event, node)"
+ @paste="onPaste($event, node)"
+ v-html="node.label"
+ >
+
+
+
+
diff --git a/web/src/pages/Edit/components/OutlineSidebar.vue b/web/src/pages/Edit/components/OutlineSidebar.vue
new file mode 100644
index 00000000..1414d702
--- /dev/null
+++ b/web/src/pages/Edit/components/OutlineSidebar.vue
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web/src/store.js b/web/src/store.js
index 5b88645f..160ce417 100644
--- a/web/src/store.js
+++ b/web/src/store.js
@@ -19,6 +19,7 @@ const store = new Vuex.Store({
},
activeSidebar: '', // 当前显示的侧边栏
isDark: false,// 是否是暗黑模式
+ isOutlineEdit: false// 是否是大纲编辑模式
},
mutations: {
/**
@@ -67,6 +68,11 @@ const store = new Vuex.Store({
// 设置暗黑模式
setIsDark(state, data) {
state.isDark = data
+ },
+
+ // 设置大纲编辑模式
+ setIsOutlineEdit(state, data) {
+ state.isOutlineEdit = data
}
},
actions: {