Skip to content

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

Description

@coderyqy

我绘制的背景,会被清除

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"
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions