File tree Expand file tree Collapse file tree
3.read-video-angular/src/app/img-decode
4.read-video-react/src/components/ImgDecode
5.read-video-vue/src/components
6.read-video-vue3/src/components
7.read-video-nextjs/components
8.read-video-nuxtjs/components Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( ) {
Original file line number Diff line number Diff 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 ( ) {
Original file line number Diff line number Diff 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 () {
Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff 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 ( ) {
Original file line number Diff line number Diff 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 () {
You can’t perform that action at this time.
0 commit comments