mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Demo:修复侧边栏大纲点击全屏编辑时打开的是源码编辑模式的问题
This commit is contained in:
parent
02957e1fcf
commit
231dbc00bc
@ -150,7 +150,7 @@ export default {
|
||||
this.lang = getLang()
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['setLocalConfig', 'setIsReadonly', 'setIsOutlineEdit']),
|
||||
...mapMutations(['setLocalConfig', 'setIsReadonly', 'setIsSourceCodeEdit']),
|
||||
|
||||
readonlyChange() {
|
||||
this.setIsReadonly(!this.isReadonly)
|
||||
@ -210,7 +210,7 @@ export default {
|
||||
},
|
||||
|
||||
openSourceCodeEdit() {
|
||||
this.setIsOutlineEdit(true)
|
||||
this.setIsSourceCodeEdit(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['setIsOutlineEdit']),
|
||||
...mapMutations(['setIsSourceCodeEdit']),
|
||||
|
||||
// 初始化编辑器
|
||||
initEditor() {
|
||||
@ -117,7 +117,7 @@ export default {
|
||||
try {
|
||||
const content = editor.getValue()
|
||||
const data = JSON.parse(content)
|
||||
this.setIsOutlineEdit(false)
|
||||
this.setIsSourceCodeEdit(false)
|
||||
this.$bus.$emit('setData', data)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
@ -127,7 +127,7 @@ export default {
|
||||
|
||||
// 关闭
|
||||
onClose() {
|
||||
this.setIsOutlineEdit(false)
|
||||
this.setIsSourceCodeEdit(false)
|
||||
},
|
||||
|
||||
// 复制
|
||||
|
||||
@ -65,7 +65,7 @@ const store = new Vuex.Store({
|
||||
},
|
||||
|
||||
// 设置源码编辑模式
|
||||
setIsOutlineEdit(state, data) {
|
||||
setIsSourceCodeEdit(state, data) {
|
||||
state.isSourceCodeEdit = data
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user