From f837dbbfd1e9b6ad950663700e336db525c83052 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 8 Mar 2024 17:40:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E6=8F=90=E7=A4=BA=E6=96=87?= =?UTF-8?q?=E5=AD=97=E9=A2=9C=E8=89=B2=E6=94=AF=E6=8C=81=E8=B0=83=E6=95=B4?= =?UTF-8?q?=20#7650?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/components/dataease/DeOutWidget.vue | 11 +++++++++++ core/frontend/src/views/background/index.vue | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/core/frontend/src/components/dataease/DeOutWidget.vue b/core/frontend/src/components/dataease/DeOutWidget.vue index 068d0feee9..54aa290bf3 100644 --- a/core/frontend/src/components/dataease/DeOutWidget.vue +++ b/core/frontend/src/components/dataease/DeOutWidget.vue @@ -172,6 +172,7 @@ export default { watch: { 'element.style': { handler(val) { + this.setPlaceholderColor() this.handlerPositionChange(val) }, deep: true, @@ -186,6 +187,7 @@ export default { } }, mounted() { + this.setPlaceholderColor() }, created() { const { horizontal, vertical, brColor, wordColor, innerBgColor } = this.element.style @@ -196,6 +198,15 @@ export default { this.$set(this.element.style, 'innerBgColor', innerBgColor || '') }, methods: { + setPlaceholderColor() { + let styleEle = document.querySelector(`#style${this.element.id}`) + if (!styleEle) { + styleEle = document.createElement('style') + styleEle.id = `style${this.element.id}` + document.querySelector('head').appendChild(styleEle) + } + styleEle.innerHTML = `#component${this.element.id} .el-input__inner::placeholder {\n color: ${this.element.style.wordColor} \n }` + }, filterLoaded(p) { this.$emit('filter-loaded', p) }, diff --git a/core/frontend/src/views/background/index.vue b/core/frontend/src/views/background/index.vue index caca7576ab..5c148e4afa 100644 --- a/core/frontend/src/views/background/index.vue +++ b/core/frontend/src/views/background/index.vue @@ -327,6 +327,7 @@ export default { this.fileList.push({ url: imgUrlTrans(this.curComponent.commonBackground.outerImage) }) } this.backgroundOrigin = deepCopy(this.curComponent.commonBackground ? this.curComponent.commonBackground : COMMON_BACKGROUND_NONE) + this.backgroundOrigin.style = deepCopy(this.curComponent.style || { brColor: '', innerBgColor: '', wordColor: ''}) this.queryBackground() }, queryBackground() { @@ -343,6 +344,10 @@ export default { this.curComponent.commonBackground.alpha = this.backgroundOrigin.alpha this.curComponent.commonBackground.borderRadius = this.backgroundOrigin.borderRadius this.curComponent.commonBackground.innerPadding = this.backgroundOrigin.innerPadding + this.curComponent.style.brColor = this.backgroundOrigin.style.brColor + this.curComponent.style.innerBgColor = this.backgroundOrigin.style.innerBgColor + this.curComponent.style.wordColor = this.backgroundOrigin.style.wordColor + console.log('backgroundSetClose'); this.$emit('backgroundSetClose') }, save() {