
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@fourdim/wechat-miniapp-qrcode
Advanced tools
Dynamically generated QR codes for Wechat Miniapps.
Notice: This library is only compatible with the WeChat mini program framework as it uses the WeChat native APIs.
If you are looking for the QR code generator for modern browsers, you may refer to lrsjng/kjua.
<!-- canvas.wxml -->
<canvas type="2d" id="myCanvas"></canvas>
<!-- need 2d type -->
<!-- id but not canvas-id -->
// canvas.js
import genQrcode from '@fourdim/wechat-miniapp-qrcode'
const query = wx.createSelectorQuery()
query.select('#myCanvas')
.fields({ node: true, size: true })
.exec((res) => {
genQrcode(res[0].node, {text: 'Hello'})
})
The available options and their default values are:
{
// render method: 'canvas' or 'image'
render: 'canvas',
// render pixel-perfect lines
crisp: true,
// minimum version: 1..40
// refer to https://kazuhikoarase.github.io/qrcode-generator/js/demo/ for more
minVersion: 1,
// error correction level: 'L', 'M', 'Q' or 'H'
ecLevel: 'L',
// size in pixel
size: 200,
// pixel-ratio, null for wx.getSystemInfoSync().pixelRatio
ratio: null,
// code color
fill: '#333',
// background color
back: '#fff',
// content
text: 'no text',
// roundend corners in pc: 0..100
rounded: 0,
// quiet zone in modules
quiet: 0,
// modes: 'plain', 'label' or 'image'
mode: 'plain',
// label/image size and pos in pc: 0..100
mSize: 30,
mPosX: 50,
mPosY: 50,
// label
label: 'no label',
fontname: 'sans',
fontcolor: '#333',
// image element
image: null
}
lrsjng/kjua (MIT)
QR Code is a registered trademark of DENSO WAVE INCORPORATED.
FAQs
Dynamically generated QR codes for Wechat Miniapps.
The npm package @fourdim/wechat-miniapp-qrcode receives a total of 0 weekly downloads. As such, @fourdim/wechat-miniapp-qrcode popularity was classified as not popular.
We found that @fourdim/wechat-miniapp-qrcode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.