@tauri-apps/plugin-barcode-scanner
此内容尚不支持你的语言。
Enumerations
Format
Enumeration Members
Aztec
Aztec: "AZTEC";
Codabar
Codabar: "CODABAR";
Code128
Code128: "CODE_128";
Code39
Code39: "CODE_39";
Code93
Code93: "CODE_93";
DataMatrix
DataMatrix: "DATA_MATRIX";
EAN13
EAN13: "EAN_13";
EAN8
EAN8: "EAN_8";
ITF
ITF: "ITF";
PDF417
PDF417: "PDF_417";
QRCode
QRCode: "QR_CODE";
UPC_A
UPC_A: "UPC_A";
UPC_E
UPC_E: "UPC_E";
Interfaces
ScanOptions
Properties
Property | Type | Defined in |
---|---|---|
cameraDirection? | "back" | "front" | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L30 |
formats? | Format [] | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L31 |
windowed? | boolean | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L32 |
Scanned
Properties
Property | Type | Defined in |
---|---|---|
bounds | unknown | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L38 |
content | string | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L36 |
format | Format | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/barcode-scanner/guest-js/index.ts#L37 |
Type Aliases
PermissionState
type PermissionState: "granted" | "denied" | "prompt" | "prompt-with-rationale";
Source: undefined
Functions
cancel()
function cancel(): Promise<void>
Cancel the current scan process.
Returns
Promise
<void
>
checkPermissions()
function checkPermissions(): Promise<PermissionState>
Get permission state.
Returns
Promise
<PermissionState
>
openAppSettings()
function openAppSettings(): Promise<void>
Open application settings. Useful if permission was denied and the user must manually enable it.
Returns
Promise
<void
>
requestPermissions()
function requestPermissions(): Promise<PermissionState>
Request permissions to use the camera.
Returns
Promise
<PermissionState
>
scan()
function scan(options?): Promise<Scanned>
Start scanning.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | ScanOptions |
Returns
© 2024 Tauri Contributors. CC-BY / MIT