2016-11-03 128 views
0

我使用這個包:自定義條碼掃描儀屏幕

科爾多瓦:com.phonegap.plugins.barcodescanner

並在掃描使用此功能:

Template.barcode_scanner.events({ 
    'click button': function() { 

    cordova.plugins.barcodeScanner.scan(
    function (result) { 
    if(!result.cancelled) 
    { 
     alert("Barcode type is: " + result.format); 
     alert("Decoded text is: " + result.text); 
    } 
    else 
    { 
     alert("You have cancelled scan"); 
    } 
    }, 
    function (error) { 
     alert("Scanning failed: " + error); 
    } 
); 

    } 

    }); 

我想知道我怎麼能自定義掃描屏幕。我需要在掃描屏幕上添加幾個按鈕。任何人都知道嗎?

回答