Commit 51cfe176 by 李伟康

提交代码

1 parent 164689b2
...@@ -184,6 +184,7 @@ class Draw { ...@@ -184,6 +184,7 @@ class Draw {
} }
} }
let textHeight = y + index * (lineHeight || fontSize) let textHeight = y + index * (lineHeight || fontSize)
if(index != 0) textHeight -= fontSize / 2
this[_ctx_].fillText(e, x, textHeight, maxWidth) this[_ctx_].fillText(e, x, textHeight, maxWidth)
if (checkTextDecoration(textDecoration)) { if (checkTextDecoration(textDecoration)) {
this.drawDecoration({ this.drawDecoration({
......
...@@ -96,9 +96,9 @@ export default { ...@@ -96,9 +96,9 @@ export default {
labelList.push('支付定金') labelList.push('支付定金')
valueList.push(`${payPrice}元`) valueList.push(`${payPrice}元`)
labelList.map((e, index) => { labelList.map((e, index) => {
if (e == '商品名称:' && draw.getTextWidth(carText, fontSize) + valueX > valueEndX) spacing = 26 if (e == '商品名称:' && draw.getTextWidth(carText, fontSize) + valueX > valueEndX) spacing = 24
if (e == formDescribeSecond && draw.getTextWidth(formContentFirst, fontSize) + valueX > valueEndX) spacing = 52 if (e == formDescribeSecond && draw.getTextWidth(formContentFirst, fontSize) + valueX > valueEndX) spacing = 48
if (e === formDescribeSecond && (draw.getTextWidth(formDescribeFirst, fontSize) + labelX > labelEndX)) spacing = 52 if (e === formDescribeSecond && (draw.getTextWidth(formDescribeFirst, fontSize) + labelX > labelEndX)) spacing = 48
if (index == labelList.length - 1) textYList.push(452) if (index == labelList.length - 1) textYList.push(452)
else textYList.push(index * 32 + 109 + spacing) else textYList.push(index * 32 + 109 + spacing)
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!