QR code
Introduction
The QR code widget is a software module that you can use to generate, read, and manage QR codes in various scenarios.

Configuration items
Category |
Configuration |
Example |
Description |
Content |
Text |
|
The information displayed when the QR code is scanned. Note: If the content is too long, the recognition rate can be affected by the QR code icon, error correction level, and the contrast between the QR code color and background color. |
QR code icon |
The three patterns for the QR code icon. The icon is usually displayed in the center of the QR code. |
||
URL |
|
This takes effect when the source of the QR code icon is a URL. The value is the link to the icon. |
|
System file |
This takes effect when the source of the QR code icon is a system file. Select an icon uploaded in the built-in resource files, or click the box below to upload one directly. |
||
Memory object |
|
This takes effect when the source of the QR code icon is a memory object. It can be used with an upload widget. For example, |
|
Error correction level |
The error correction level of a QR code refers to its ability to be successfully scanned and decoded even when it is damaged or partially unreadable. There are four main error correction levels:
|
||
Status |
Displays the current status of the QR code widget. The key-value pairs for different statuses are:
|
||
Interaction |
Hidden |
Controls the default display state of the QR code widget. When set to |
|
Style |
Margin |
For more information, see Common properties |
|
Show border |
Does the outer layer of the QR code have a border? |
||
CSS Style |
QR code color |
The color of the QR code part. |
|
QR code background color |
The background color of the QR code. |
Properties and methods
Name |
Type |
Example |
Description |
value |
string |
|
The scan text of the current QR code widget. |
status |
string |
|
The current status of the QR code widget. |
src |
string |
|
Read-only. The link to the QR code icon. |
file |
object |
|
Read-only. The QR code icon file resource. |
image |
string |
|
Read-only. The data of the QR code converted into an image. |
setValue |
func |
|
Sets the QR code content to |
clearValue |
func |
|
Clears the QR code content. |
setStatus |
func |
|
Sets the QR code status to |
clearStatus |
func |
|
Clears the QR code status. |
download |
func |
|
Downloads the QR code image. |
Event callbacks
Configuration |
Description |
The event that is triggered when Refresh is clicked. |


