Closed photuris closed 3 years ago
Ok, so I just saw ticket #66. I'm sorry! So I tried this, but it's not working for me, either.
So, I clearly need to get myself up-to-speed with Javascript stuff.
<button
type="button"
class="btn btn-primary"
v-on:click="print_thing"
>
<b-icon icon="printer"></b-icon> Print
</button>
<div id="print_area">
Print this stuff in here
</div>
......
<script>
import { htmlToPaper } from 'vue-html-to-paper'
export default {
methods: {
print_thing: function () {
htmlToPaper('print_area') /** Error occurs here */
}
}
}
</script>
Just did it the old school way.
I'm a complete noob with vue.js, and I don't do Javascript much. So, apologies for the stupidity.
The following code works just fine when I run it with
npm run dev
(webpack), but it breaks when I run it with a production setup with express.When I run it with
npm run build && NODE_ENV=production node server.js
, I get the following error in inspector:TypeError: Attempted to assign to readonly property.
Any ideas? Thanks!