JSPM

qrcode-uni

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q41581F
  • License ISC

Package Exports

  • qrcode-uni
  • qrcode-uni/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (qrcode-uni) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Uni-APP 生码工具

用法

安装

npm install qrcode-uni

使用

<tmeplate>
<canvas id="qrcode" canvas-id="qrcode" style="width: 440rpx; height: 440rpx" ></canvas>
</tmeplate>
// js
import {qrcode} from qrcode-uni
var qrData = '1111'
qrcodeUtf16({
    text: qrData,
    canvasId: 'qrcode',
    width: 256,
    height: 256,
    x: 0,
    y: 0,
    typeNumber: -1,
    correctLevel: QRErrorCorrectLevel.L,
    background: '#ffffff',
    foreground: '#000000',
    image: {
        imageResource: '',
        dx: 0,
        dy: 0,
        dWidth: 100,
        dHeight: 100,
    },
  
});

16进制生码

import {qrcodeHex} from qrcode-uni