Skip to content

Commit f44abb4

Browse files
authored
Merge pull request #16 from Dynamsoft/_dev
read img review
2 parents 303abdb + 4d72bf1 commit f44abb4

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

1.hello-world/3.read-video-angular/src/app/img-decode/img-decode.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ export class ImgDecodeComponent implements OnInit {
1818
for (const result of results) {
1919
alert(result.barcodeText);
2020
}
21+
if(!results.length){ alert('No barcode found'); }
2122
} catch (ex) {
2223
console.error(ex);
2324
}
25+
e.target.value = '';
2426
}
2527

2628
async ngOnDestroy() {

1.hello-world/4.read-video-react/src/components/ImgDecode/ImgDecode.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ export default class ImgDecode extends Component {
1515
for(let result of results){
1616
alert(result.barcodeText);
1717
}
18+
if(!results.length){ alert('No barcode found'); }
1819
} catch(ex) {
1920
console.error(ex);
2021
}
22+
e.target.value = '';
2123
}
2224

2325
async componentWillUnmount() {

1.hello-world/5.read-video-vue/src/components/ImgDecode.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ export default {
1919
for(let result of results){
2020
alert(result.barcodeText);
2121
}
22+
if(!results.length){ alert('No barcode found'); }
2223
} catch(ex) {
2324
console.error(ex);
2425
}
26+
e.target.value = '';
2527
}
2628
},
2729
async beforeDestroy() {

1.hello-world/6.read-video-vue3/src/components/ImgDecode.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ export default {
1717
for(let result of results){
1818
alert(result.barcodeText);
1919
}
20+
if(!results.length){ alert('No barcode found'); }
2021
} catch(ex) {
2122
console.error(ex);
2223
}
24+
e.target.value = '';
2325
}
2426
onBeforeUnmount(async () => {
2527
if (pReader.value) {

1.hello-world/7.read-video-nextjs/components/ImgDecode.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ export default class ImgDecode extends Component {
1414
for(let result of results){
1515
alert(result.barcodeText);
1616
}
17+
if(!results.length){ alert('No barcode found'); }
1718
} catch(ex) {
1819
console.error(ex);
1920
}
21+
e.target.value = '';
2022
}
2123

2224
async componentWillUnmount() {

1.hello-world/8.read-video-nuxtjs/components/ImgDecode.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ export default {
2020
for(let result of results){
2121
alert(result.barcodeText);
2222
}
23+
if(!results.length){ alert('No barcode found'); }
2324
} catch(ex) {
2425
console.error(ex);
2526
}
27+
e.target.value = '';
2628
}
2729
},
2830
async beforeDestroy() {

0 commit comments

Comments
 (0)