15 lines
386 B
JavaScript
15 lines
386 B
JavaScript
|
|
import nativeBlueTooth from "@/components/tpx-bluetooth-native/nativeBlueTooth"
|
||
|
|
|
||
|
|
const module = {
|
||
|
|
print(data){
|
||
|
|
let outputStream = nativeBlueTooth.getBtOutStream()
|
||
|
|
outputStream.write([0x1b, 0x40]) //打印复位
|
||
|
|
outputStream.flush()
|
||
|
|
nativeBlueTooth.sendByteData(data)
|
||
|
|
},
|
||
|
|
sendByteData: nativeBlueTooth.sendByteData,
|
||
|
|
sendData: nativeBlueTooth.sendData
|
||
|
|
}
|
||
|
|
|
||
|
|
export default module
|