ActiveX is written by itself, which is a printing function and has been successfully tested in a separate html.
PrintPage is a print function within ActiveX.
can be placed under vue to prompt SCRIPT3: that the member cannot be found.
since I am a beginner in vue, I ask the Great God for help.
<template>
<div>
<object id="myprint" classid="clsid:D177A309-DF43-4CA0-83A1-6BBE5D0B2D41"></object>
<div id="btn">
<button @click="doPrint"></button>
</div>
</div>
</template>
<script>
export default {
data() {
return {
total: 0
}
},
methods: {
doPrint(event) {
var activeX = document.getElementById("myprint");
activeX.PrintPage("2341231111");
}
}
}
</script>