跳到主要内容

Variable: qrcode

const qrcode: object

Defined in: packages/ov0/src/core/utils/qrcode/index.ts:30

QRcode转Ansi

Type declaration

error

error: number = QRErrorCorrectLevel.L

generate()

generate: (input, opts?, cb?) => void

生成二维码ANSI字符串

Parameters

input

string

要编码的文本

opts?

生成选项

IQRcodeOpts | (output) => void

cb?

(output) => void

回调函数,接收生成的ANSI字符串

Returns

void

如果未提供回调,则直接输出到控制台

setErrorLevel()

setErrorLevel: (error) => void

设置纠错级别

Parameters

error

纠错级别('L', 'M', 'Q', 'H'或对应的数值)

number | "L" | "M" | "Q" | "H"

Returns

void