提交 fc4bb323 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

feat: 优化下拉查询组件

上级 62ca8a2d
...@@ -69,13 +69,17 @@ export default { ...@@ -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)
}) })
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论