elementui 文本框里放树形结构

直接上代码吧


          
          
return { showTree: false } js: // 点击空白关闭下拉菜单 deptogglePanel (event) { event || (event = window.event) event.stopPropagation ? event.stopPropagation() : (event.cancelBubble = true) this.showTree ? this.dephide() : this.depshow() }, depshow () { this.showTree = true document.addEventListener('click', this.dephidePanel, false) }, dephide () { this.showTree = false document.addEventListener('click', this.dephidePanel, false) }, dephidePanel (e) { if ( this.$refs.suoShuMenTree && !this.$refs.suoShuMenTree.contains(e.target) ) { this.dephide() } }, handleRegionNodeClick (data) { this.regionInfo = data // this.showRegionTree = false this.formScoure.regionLongcode = this.regionInfo.name //所属区域名字 this.showTree = false },

 

你可能感兴趣的:(elementui 文本框里放树形结构)