mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Update Count.vue
解决刚进入脑图 Ctrl+Z操作导致数值全部归0的问题
This commit is contained in:
parent
c62ee071f6
commit
e0130f7004
@ -56,6 +56,7 @@ export default {
|
||||
* @Desc: 监听数据变化
|
||||
*/
|
||||
onDataChange(data) {
|
||||
if (!data) return
|
||||
this.textStr = ''
|
||||
this.words = 0
|
||||
this.num = 0
|
||||
@ -70,7 +71,6 @@ export default {
|
||||
* @Desc: 遍历
|
||||
*/
|
||||
walk(data) {
|
||||
if (!data) return
|
||||
this.num++
|
||||
this.textStr += String(data.data.text) || ''
|
||||
if (data.children && data.children.length > 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user