hizzgdev / jsmind

a mind mapping library built by javascript
http://hizzgdev.github.io/jsmind/
Other
3.47k stars 867 forks source link

使用jquery监听点击,在方法里调用jm.get_selected_node()返回的却是null? #637

Open Yipper0915 opened 1 week ago

Yipper0915 commented 1 week ago

async mounted() { const savedData = JSON.parse(localStorage.getItem('tempMindData')) // 检查临时状态是否有数据 if (savedData && this.entranceFlag !== 1) { console.log('进入savedData', savedData) this.mind.data = savedData } else { await this.fetchData() } console.log('实例化之前this.mind', this.mind) this.jm = new JsMind(this.options) this.jm.show(this.mind) // this.jm.expand_to_depth(4) this.$nextTick(() => { $("#jsmind_container").on('click', (event) => { this.handleJsmindClick(event); }); })

},

Yipper0915 commented 1 week ago

已解决,增加这个属性就好了 虽然不知道为什么?enable_dblclick_handle: false