@zhin.js/plugin-qrcode
v1.1.15
Published
QR code generator & reader plugin for Zhin.js (Plugin Runtime)
Readme
@zhin.js/plugin-qrcode
Zhin.js plugin for qrcode functionality.
Installation
pnpm exec zhin install @zhin.js/plugin-qrcodeUsage
Run the installation command from your application directory. It installs the package and mounts the qrcode instance in 主配置 plugins 映射. The corresponding zhin.config.yml node is:
configVersion: 2
plugins:
qrcode: "@zhin.js/plugin-qrcode"
qrcode: {}Configuration
This plugin currently has no configuration fields. Its schema.json accepts an empty object; do not place package names in a plugins array.
Commands
gen hello beautiful world: generate a 300 × 300 QR image.gen hello --size 512/gen hello -s 512: choose 64–1024 pixels.scan https://example.com/qr.png: decode an existing QR image.gen --help: show parameters, constraints and defaults.
The Endpoint determines any command prefix. An explicit commandNamespace adds a plugin
namespace; neither is hardcoded in the command. Generation declares text length (1–2048)
and image size in defineCommand; invalid values are rejected before creating the image.
