Demo:修复退出禅模式后左下角的节点和字数统计未更新的问题
This commit is contained in:
parent
fbd061e8b3
commit
bf2f9b2697
@ -23,7 +23,11 @@ import { mapState } from 'vuex'
|
|||||||
let countEl = document.createElement('div')
|
let countEl = document.createElement('div')
|
||||||
export default {
|
export default {
|
||||||
name: 'Count',
|
name: 'Count',
|
||||||
props: {},
|
props: {
|
||||||
|
mindMap: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
textStr: '',
|
textStr: '',
|
||||||
@ -36,6 +40,9 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$bus.$on('data_change', this.onDataChange)
|
this.$bus.$on('data_change', this.onDataChange)
|
||||||
|
if (this.mindMap) {
|
||||||
|
this.onDataChange(this.mindMap.getData())
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.$bus.$off('data_change', this.onDataChange)
|
this.$bus.$off('data_change', this.onDataChange)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="editContainer">
|
<div class="editContainer">
|
||||||
<div class="mindMapContainer" ref="mindMapContainer"></div>
|
<div class="mindMapContainer" ref="mindMapContainer"></div>
|
||||||
<Count v-if="!isZenMode"></Count>
|
<Count :mindMap="mindMap" v-if="!isZenMode"></Count>
|
||||||
<Navigator :mindMap="mindMap"></Navigator>
|
<Navigator :mindMap="mindMap"></Navigator>
|
||||||
<NavigatorToolbar :mindMap="mindMap" v-if="!isZenMode"></NavigatorToolbar>
|
<NavigatorToolbar :mindMap="mindMap" v-if="!isZenMode"></NavigatorToolbar>
|
||||||
<OutlineSidebar :mindMap="mindMap"></OutlineSidebar>
|
<OutlineSidebar :mindMap="mindMap"></OutlineSidebar>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user