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() {