diff --git a/ruoyi-ui/src/views/information/board/addinfo.vue b/ruoyi-ui/src/views/information/board/addinfo.vue index bafe987f..0b9eb1d0 100644 --- a/ruoyi-ui/src/views/information/board/addinfo.vue +++ b/ruoyi-ui/src/views/information/board/addinfo.vue @@ -12,7 +12,7 @@ height: boardHeight + 'px', position: 'relative', - lineHeight:boardHeight + 'px', + textAlign: getTextAlign(dataForm.formatStyle) }" class="blackBoard2"> @@ -426,7 +426,7 @@ export default { STATE: 'true', STAY: '5', screenSize: devicePixel, - formatStyle :'2' + formatStyle: '2' } this.content = '请输入内容' } else { @@ -442,7 +442,7 @@ export default { getFontSizeList(type) { this.getDicts('iot_device_font_size').then(res => { this.fontSizeOpt = res.data - this.dataForm.FONT_SIZE = res.data[3].dictValue + this.dataForm.FONT_SIZE = res.data[1].dictValue if (type) { this.alignment(2) } @@ -663,7 +663,7 @@ export default { fontSize: this.dataForm.FONT_SIZE.substring(0, 2), fontSpacing: this.dataForm.SPEED, fontType: this.getFontStyle(this.dataForm.FONT), - formatStyle : this.dataForm.formatStyle + formatStyle: this.dataForm.formatStyle }) // this.$emit("addInfoMode", this.dataForm); addTemplate(params1, method).then(data => { @@ -734,9 +734,9 @@ export default { } }, getTextAlign(font) { - if (font == '0'){ + if (font == '0') { return 'left' - } else if (font == '1'){ + } else if (font == '1') { return 'right' } else { return 'center' @@ -807,7 +807,7 @@ export default { var textTop = this.addZero(textBoard2[0].offsetTop) this.dataForm.COORDINATE = textLeft + textTop debugger - if (alignmentNum != undefined){ + if (alignmentNum != undefined) { this.dataForm.formatStyle = alignmentNum } // console.log(this.dataForm.COORDINATE, "this.dataForm.COORDINATE"); diff --git a/ruoyi-ui/src/views/information/board/editInfo.vue b/ruoyi-ui/src/views/information/board/editInfo.vue index c2c12390..c4ae5258 100644 --- a/ruoyi-ui/src/views/information/board/editInfo.vue +++ b/ruoyi-ui/src/views/information/board/editInfo.vue @@ -11,8 +11,9 @@ width: getDevicePixel(boardWidth, 0), height: getDevicePixel(boardHeight, 1), position: 'relative', - lineHeight:boardHeight + 'px', - textAlign: getTextAlign(dataForm.formatStyle) + display:'flex', + 'align-items': getTextAlign(dataForm.formatStyle), + 'justify-content': getTextAlign(dataForm.formatStyle) }">