From aa9c9f4aaa6c464f5ed3292cdfd8bd10d67df9d3 Mon Sep 17 00:00:00 2001 From: dataeaseShu <106045316+dataeaseShu@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:06:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=A0=B7=E5=BC=8F=E5=AF=BC=E8=87=B4=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=E8=99=9A=E6=8B=9F=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ElVisualSelect/index.vue | 7 +++++-- frontend/src/components/widget/DeWidget/serviceNameFn.js | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/ElVisualSelect/index.vue b/frontend/src/components/ElVisualSelect/index.vue index 4bdf28be55..844c8ba0f9 100644 --- a/frontend/src/components/ElVisualSelect/index.vue +++ b/frontend/src/components/ElVisualSelect/index.vue @@ -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() { diff --git a/frontend/src/components/widget/DeWidget/serviceNameFn.js b/frontend/src/components/widget/DeWidget/serviceNameFn.js index a05fba6bd0..61444f0000 100644 --- a/frontend/src/components/widget/DeWidget/serviceNameFn.js +++ b/frontend/src/components/widget/DeWidget/serviceNameFn.js @@ -74,6 +74,7 @@ function textSelectWidget(nodeCache, style) { } function handlerInputStyle (node, style) { + if (!node) return; styleAttrs.forEach(ele => { node.style[attrsMap[ele]] = style[ele]; })