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