我正在使用vue-html-to-paper
插件来打印一些内容,但是每次单击都会出现错误,因为[Vue warn]: Error in v-on handler: "TypeError: m is null"
我正在使用vue.js框架
我做了什么
main.js
import print from 'vue-html-to-paper'
Vue.use(print)
在我的测试中。vue
<template>
<div>
<!-- SOURCE -->
<div id="printMe">
<h1>Print me!</h1>
</div>
<!-- OUTPUT -->
<button @click="print"></button>
</div>
</template>
<script>
export default {
data() {
return {
output: null
}
},
methods: {
print() {
this.$htmlToPaper('printMe');
}
}
}
</script>
我浏览了文档,我做的完全一样,但是却得到同样的错误。