Merge pull request #2595 from dataease/pr@dev_code_conflict

fix: 修复自定义样式导致过滤组件的虚拟滚动部分数据不全
This commit is contained in:
dataeaseShu 2022-07-06 13:52:11 +08:00 committed by GitHub
commit 257d5bfd97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -114,11 +114,13 @@ export default {
handlerInputStyle(this.$refs.visualSelect.$el.querySelector('.el-select__input'), {wordColor: this.$parent.element.style.wordColor})
},
init() {
this.customInputStyle()
if (this.defaultFirst && this.list.length > 0) {
this.selectValue = this.list[0].value
}
if (!this.list || !this.list.length) return
if (!this.list || !this.list.length) {
this.customInputStyle()
return
}
const selectDom = document.querySelector(
`.${this.classId} .el-select-dropdown .el-select-dropdown__wrap`
@ -133,6 +135,7 @@ export default {
this.addScrollDiv(this.slectBoxDom)
this.scrollFn()
this.customInputStyle()
},
scrollFn() {

View File

@ -74,6 +74,7 @@ function textSelectWidget(nodeCache, style) {
}
function handlerInputStyle (node, style) {
if (!node) return;
styleAttrs.forEach(ele => {
node.style[attrsMap[ele]] = style[ele];
})