Skip to content

Commit

Permalink
bugfix:修复Tag组件调用get_child获取combine组件错误的问题 (TencentBlueKing#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
luofann authored and pagezz-canway committed Apr 19, 2019
1 parent 38ed33f commit ad6209a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,16 @@
if (typeof tagCode === 'string' && tagCode !== '') {
this.$children.some(item => {
if (item.scheme && item.scheme.tag_code === tagCode) {
childComponent = item.$children[0]
// combine组件或tag组件
childComponent = tagCode === 'combine' ? item : item.$refs.tagComponent
return true
}
})
} else {
childComponent = this.$children
childComponent = this.$children.map(item => {
return item.scheme.tag_code === 'combine' ? item : item.$refs.tagComponent
})
}
return childComponent
},
emit_event (name, type, data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,16 @@
if (typeof tagCode === 'string' && tagCode !== '') {
this.$children.some(item => {
if (item.scheme && item.scheme.tag_code === tagCode) {
childComponent = item.$children[0]
// combine组件或tag组件
childComponent = tagCode === 'combine' ? item : item.$refs.tagComponent
return true
}
})
} else {
childComponent = this.$children
childComponent = this.$children.map(item => {
return item.scheme.tag_code === 'combine' ? item : item.$refs.tagComponent
})
}
return childComponent
},
/**
Expand Down

0 comments on commit ad6209a

Please sign in to comment.