Commit 51de4e67 by 杨明

fixed

1 parent db856f3b
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-28 14:56:02
* @LastEditTime: 2023-08-30 16:29:26
* @FilePath: \scrm-micro-home\src\views\home\components\Marketing\MarketingRight.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -467,8 +467,13 @@ export default {
style.size = +(style.size * RATIO.toFixed(2))
style.width = parseInt(style.width * RATIO)
}
Object.assign(this.draggableList[0], { content: this.detail.marketingTitle, ...style1, width: this.detail.marketingTitle.length * (style1.size + 0.5), color: style1.style.color, font: style1.font, height: 'auto' })
Object.assign(this.draggableList[1], { content: this.detail.marketingSubtitle, ...style2, width: this.detail.marketingSubtitle.length * (style2.size + 0.5), color: style2.style.color, font: style2.font, height: 'auto' })
const fontObj = {
jingnanyuanmoti: 1.1,
YouSheBiaoTiYuan: 1.4
}
Object.assign(this.draggableList[0], { content: this.detail.marketingTitle, ...style1, width: this.detail.marketingTitle.length * (style1.size * fontObj[style1.font]), color: style1.style.color, font: style1.font, height: 'auto' })
Object.assign(this.draggableList[1], { content: this.detail.marketingSubtitle, ...style2, width: this.detail.marketingSubtitle.length * (style2.size * fontObj[style2.font]), color: style2.style.color, font: style2.font, height: 'auto' })
console.log()
setTimeout(() => {
const textDom = document.querySelectorAll('.img_cl')
textDom.forEach(item => {
......@@ -480,10 +485,10 @@ export default {
fontSize -= len
}
if (content == this.detail.marketingTitle) {
Object.assign(this.draggableList[0], { size: fontSize, height: 'auto', width: content.length * (fontSize + 0.5) })
Object.assign(this.draggableList[0], { size: fontSize, height: 'auto', width: content.length * (fontSize * fontObj[this.draggableList[0].font]) })
}
if (content == this.detail.marketingSubtitle) {
Object.assign(this.draggableList[1], { size: fontSize, height: 'auto', width: content.length * (fontSize + 0.5) })
Object.assign(this.draggableList[1], { size: fontSize, height: 'auto', width: content.length * (fontSize * fontObj[this.draggableList[1].font]) })
}
})
}, 300)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!