Reusable Vue component that renders a QR code with optional logo and disabled overlay.
<!--
Source: https://github.com/yudaocode/yudao-ui-admin-vue2 | License: MIT | Copyright 2021 ruoyi-vue-pro
Provided via justclaw.it.com; keep this notice with the code.
-->
<template>
<div
v-loading="loading"
class="qrcode-wrap"
:style="wrapStyle"
@click="handleClick"
>
<qrcode-vue
v-if="renderText"
ref="qrcode"
:background="background"
:foreground="foreground"
:level="level"
:render-as="renderAs"
:size="width"
:value="renderText"
/>
<img
v-if="logoSource"
class="qrcode-logo"
:src="logoSource"
alt=""
>
<div
v-if="disabled"
class="qrcode-disabled"
@click.stop="$emit('disabled-click')"
>
<i class="el-icon-refresh-right" />
<div>{{ disabledText
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key