forked from github/dataease
feat: 优化下拉查询组件
This commit is contained in:
parent
62ca8a2dd5
commit
fc4bb32331
@ -69,13 +69,17 @@ export default {
|
|||||||
changeValue(value) {
|
changeValue(value) {
|
||||||
this.setCondition()
|
this.setCondition()
|
||||||
// this.inDraw && this.$emit('set-condition-value', { component: this.element, value: [value], operator: this.operator })
|
// this.inDraw && this.$emit('set-condition-value', { component: this.element, value: [value], operator: this.operator })
|
||||||
|
this.showNumber = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
if (!this.$refs.deSelect.$refs.tags || !this.options.attrs.multiple) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const kids = this.$refs.deSelect.$refs.tags.children[0].children
|
const kids = this.$refs.deSelect.$refs.tags.children[0].children
|
||||||
let contentWidth = 0
|
let contentWidth = 0
|
||||||
kids.forEach(kid => {
|
kids.forEach(kid => {
|
||||||
contentWidth += kid.offsetWidth
|
contentWidth += kid.offsetWidth
|
||||||
})
|
})
|
||||||
this.showNumber = contentWidth > (this.$refs.deSelect.$refs.tags.clientWidth * 0.7)
|
this.showNumber = contentWidth > (this.$refs.deSelect.$refs.tags.clientWidth * 0.9)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user