Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何设置二维码边框的颜色? #83

Open
coderyqy opened this issue Mar 29, 2024 · 0 comments
Open

如何设置二维码边框的颜色? #83

coderyqy opened this issue Mar 29, 2024 · 0 comments

Comments

@coderyqy
Copy link

coderyqy commented Mar 29, 2024

我绘制的背景,会被清除

const ctx = uni.createCanvasContext("myQrcode");
ctx.fillStyle = "#ffffff"; // 设置填充颜色
ctx.fillRect(0, 0, 220, 220); // 绘制填充矩形,覆盖整个画布
ctx.draw();

drawQrcode({
ctx,
width: 200,
height: 200,
x: 10,
y: 10,
canvasId: "myQrcode",
text: "userinfo.user.phone"
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant