To embed a logo in your QR code, use the image-settings prop.
Type Definition:
export type ImageSettings = {
src: string, // The URL of image.
x?: number, // The horizontal offset. Defaults to center.
y?: number, // The vertical offset. Defaults to center.
height: number, // The height of image
width: number, // The width of image
excavate?: boolean, // Whether or not to "excavate" the modules around the image.
borderRadius?: number, // The border radius of image.
crossOrigin?: 'anonymous' | 'use-credentials' | '', // The CORS attribute for the image.
}
CORS Note: When using a cross-origin logo, set crossOrigin: 'anonymous' and ensure the image server responds with Access-Control-Allow-Origin to avoid a SecurityError when using toDataURL or download on a canvas.
const imageSettings = ref<ImageSettings>({
src: 'https://github.com/scopewu.png',
width: 30,
height: 30,
excavate: true,
crossOrigin: 'anonymous',
})