forked from github/dataease
Merge pull request #2567 from dataease/pr@dev_filter_input_style
fix: 过滤组件中的虚拟滚动组件自定义样式不生效
This commit is contained in:
commit
0d95b6d03d
@ -16,6 +16,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { handlerInputStyle } from '@/components/widget/DeWidget/serviceNameFn.js'
|
||||
|
||||
import { uuid } from 'vue-uuid'
|
||||
export default {
|
||||
name: 'ElVisualSelect',
|
||||
@ -106,8 +108,13 @@ export default {
|
||||
}
|
||||
this.options = this.newList.slice(0, this.maxLength)
|
||||
},
|
||||
|
||||
customInputStyle() {
|
||||
if (!this.$parent.$parent.handlerInputStyle) return;
|
||||
handlerInputStyle(this.$refs.visualSelect.$el.querySelector('.el-input__inner'), this.$parent.element.style)
|
||||
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
|
||||
}
|
||||
|
@ -73,6 +73,12 @@ function textSelectWidget(nodeCache, style) {
|
||||
}
|
||||
}
|
||||
|
||||
function handlerInputStyle (node, style) {
|
||||
styleAttrs.forEach(ele => {
|
||||
node.style[attrsMap[ele]] = style[ele];
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
attrsMap,
|
||||
styleAttrs,
|
||||
@ -80,5 +86,6 @@ export {
|
||||
textInputWidget,
|
||||
textSelectGridWidget,
|
||||
textSelectTreeWidget,
|
||||
textSelectWidget
|
||||
textSelectWidget,
|
||||
handlerInputStyle,
|
||||
}
|
Loading…
Reference in New Issue
Block a user