From ffd0749265477e8c1b2dc4e354a91c68cbeade93 Mon Sep 17 00:00:00 2001 From: DaiDH <40824445+id1945@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:43:57 +0700 Subject: [PATCH] Update app.component.ts --- src/app/app.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 70c70f9..b34856c 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -31,6 +31,8 @@ export class AppComponent implements AfterViewInit { public qrCodeResult: ScannerQRCodeSelectedFiles[] = []; public qrCodeResult2: ScannerQRCodeSelectedFiles[] = []; + public percentage = 80; + public quality = 100; @ViewChild('action') action!: NgxScannerQrcodeComponent; @@ -67,13 +69,13 @@ export class AppComponent implements AfterViewInit { } public onSelects(files: any) { - this.qrcode.loadFiles(files, 50, 90).subscribe((res: ScannerQRCodeSelectedFiles[]) => { + this.qrcode.loadFiles(files, this.percentage, this.quality).subscribe((res: ScannerQRCodeSelectedFiles[]) => { this.qrCodeResult = res; }); } public onSelects2(files: any) { - this.qrcode.loadFilesToScan(files, this.config, 50, 90).subscribe((res: ScannerQRCodeSelectedFiles[]) => { + this.qrcode.loadFilesToScan(files, this.config, this.percentage, this.quality).subscribe((res: ScannerQRCodeSelectedFiles[]) => { console.log(res); this.qrCodeResult2 = res; });