|
@@ -67,8 +67,8 @@ const drawCanvas = () => {
|
|
|
thirdImg.onload = () => {
|
|
|
// 企业头像
|
|
|
ctx.save()
|
|
|
- const secondImgWidth = 80
|
|
|
- const secondImgHeight = 80
|
|
|
+ const secondImgWidth = 120
|
|
|
+ const secondImgHeight = 120
|
|
|
const x = (canvas.width - secondImgWidth) / 2
|
|
|
const y = canvas.height - secondImgHeight - 460
|
|
|
|
|
@@ -81,7 +81,7 @@ const drawCanvas = () => {
|
|
|
// 企业名称
|
|
|
const maxTextWidth = 400
|
|
|
const text = props.enterpriseName
|
|
|
- const fontStyle = 'bold 18px Arial'
|
|
|
+ const fontStyle = 'bold 24px Arial'
|
|
|
ctx.font = fontStyle
|
|
|
let truncatedText = text
|
|
|
while (ctx.measureText(truncatedText + '...').width > maxTextWidth && truncatedText.length > 0) {
|
|
@@ -97,8 +97,8 @@ const drawCanvas = () => {
|
|
|
const tagPaddingLeftRight = 20
|
|
|
const tagPaddingTopBottom = 10
|
|
|
const tagRadius = 8
|
|
|
- const tagSpacing = 30
|
|
|
- let tagY = textY + tagSpacing
|
|
|
+ const tagSpacing = 22
|
|
|
+ let tagY = textY + tagSpacing + 10
|
|
|
props.positionList.forEach((tag) => {
|
|
|
let truncatedTag = tag
|
|
|
while (ctx.measureText(truncatedTag + '...').width > maxTextWidth - 2 * tagPaddingLeftRight && truncatedTag.length > 0) {
|
|
@@ -123,7 +123,7 @@ const drawCanvas = () => {
|
|
|
ctx.closePath()
|
|
|
ctx.fill()
|
|
|
|
|
|
- ctx.font = '16px Arial'
|
|
|
+ ctx.font = '18px Arial'
|
|
|
ctx.fillStyle = '#fff'
|
|
|
ctx.fillText(truncatedTag, tagX + tagPaddingLeftRight, tagY + tagPaddingTopBottom + 10)
|
|
|
|