修改了index.js里面的一些代码格式

This commit is contained in:
huan 2024-08-08 16:37:57 +08:00
parent 256c1d0cb9
commit 80403612c6

View File

@ -27,7 +27,7 @@ async function generateImage(title, tags, qrData) {
const height = 26; const height = 26;
getBackground(ctx, x, y, cornerSize, width, height); getBackground(ctx, x, y, cornerSize, width, height);
}); });
['1'].forEach(value => { ['1'].forEach((value) => {
const codeWidth = 135; const codeWidth = 135;
const codeHeight = 154; const codeHeight = 154;
const codeCornerSize = 12; const codeCornerSize = 12;
@ -41,7 +41,7 @@ async function generateImage(title, tags, qrData) {
const textMeta = ctx.measureText(tag); const textMeta = ctx.measureText(tag);
const tagContent = { const tagContent = {
width: textMeta.width + 55, width: textMeta.width + 55,
tag tag,
}; };
const maxWidth = 173; const maxWidth = 173;
for (let i = 0; i <= 300; i++) { for (let i = 0; i <= 300; i++) {