Skip to content

Commit

Permalink
🐛 #1368 path exp component show options
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangsenfeng committed Jan 23, 2020
1 parent 5dc88f5 commit ead559f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions wecube-portal/src/pages/components/path-exp.vue
Expand Up @@ -87,6 +87,15 @@ export default {
this.isLastNode = false
this.$emit('input', this.inputVal.replace(/\s/g, ''))
}
},
optionsHide (val) {
if (val && document.querySelector('.wecube_attr-ul')) {
// 此处的nextTick不能删,需要在该元素显示后取得宽度
this.$nextTick(() => {
document.querySelector('.wecube_attr-ul').style.width =
document.querySelector('.wecube_input_in textarea').clientWidth + 'px'
})
}
}
},
computed: {
Expand Down Expand Up @@ -128,13 +137,6 @@ export default {
this.restorePathExp()
this.$emit('input', this.inputVal.replace(/\s/g, ''))
if (document.querySelector('.wecube_attr-ul')) {
// 此处的nextTick不能删,需要在该元素显示后取得宽度
this.$nextTick(() => {
document.querySelector('.wecube_attr-ul').style.width =
document.querySelector('.wecube_input_in textarea').clientWidth + 'px'
})
}
},
methods: {
restorePathExp () {
Expand Down

0 comments on commit ead559f

Please sign in to comment.