Skip to content

Commit

Permalink
Merge pull request #7 from yadewe/master
Browse files Browse the repository at this point in the history
解决 编辑时设置焦点不正确的问题
  • Loading branch information
xiaoniezi authored Dec 10, 2018
2 parents b769cfb + 6332f99 commit a8e6cbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/view/slot_tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ export default{
if(n.isEdit){
this.$set(n, 'isEdit', false)
}
this.$nextTick(() => {
this.$refs['slotTreeInput'+d.id].$refs.input.focus()
})
},
NodeEdit(n, d){//编辑节点
console.log(n, d)
if(!n.isEdit){//检测isEdit是否存在or是否为false
this.$set(n, 'isEdit', true)
}
this.$nextTick(() => {
this.$refs['slotTreeInput'+d.id].$refs.input.focus()
})
},
NodeDel(n, d){//删除节点
console.log(n, d)
Expand Down

0 comments on commit a8e6cbd

Please sign in to comment.