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.
34 lines
572 B
34 lines
572 B
<template>
|
|
<view>
|
|
<button @click="printImage"> 打印图片</button>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
// #ifdef APP
|
|
var testModule = uni.requireNativePlugin("TestModule")
|
|
// #endif
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
bufferData:''
|
|
}
|
|
},
|
|
components:{
|
|
|
|
},
|
|
methods: {
|
|
// #ifdef APP
|
|
printImage(){
|
|
var content ="<html><body><h1>Test Content测试打印,测试打印</h1><p>Testing, testing, testing...测试测试测试测试</p></body></html>"
|
|
testModule.doHTMLPrint(content)
|
|
}
|
|
// #endif
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
</style>
|