You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
708 B
36 lines
708 B
// 使用 |
|
// 在页面中引用 |
|
// import inputBlur from '../../mixin/inputBlur.js' |
|
// 然后在中 |
|
// export default { |
|
// mixins:[inputBlur], |
|
// } |
|
|
|
import scanner from '../common/PdaScanner.js'; |
|
export default { |
|
data() { |
|
return {} |
|
}, |
|
onLoad: function(option) { |
|
//option为object类型,会序列化上个页面传递的参数 |
|
this.sbId = option.sbId; |
|
scanner.init(this.readBarcode); |
|
}, |
|
onShow() { |
|
scanner.start(); |
|
}, |
|
onHide() { |
|
scanner.stop(); |
|
}, |
|
onUnload() { |
|
scanner.stop(); |
|
scanner.destroy(); |
|
}, |
|
methods: { |
|
readBarcode(code) { |
|
this.getBarCode(code); |
|
}, |
|
|
|
|
|
} |
|
} |