Vue print element js插件. Apr 7, 2023 · 一、vue-print-nb插件. Register the component. This is a Vue mixin for paper printing HTML elements. In your app template: This is a Vue2 plugin (easily upgradeable to support Vue3+, just open an issue if the need is there I will do it) that allows you to easily print contents of a specified element. Vue. com/joseluisq/printd). Start using vue-to-print in your project by running `npm i vue-to-print`. 0. }, methods: { print() { var prtContent = document. Latest version: 1. import Vue from 'vue'; import VueHtmlToPaper from 'vue-html-to-paper'; 2. Latest version: 2. 三、通过iframe标签实现打印. 4. Vue mixin for printing html elements to paper. 二、print. use(VueHtmlToPaper); 3. Import and install the vue-html-to-paper component. 0, last published: 3 months ago. 3, last published: 2 years ago. getElementById("print"); A Vue 3 component to print the content of an element or a component. There is 1 other project in the npm registry using vue-to-print. How to use it: 1. There are 43 other projects in the npm registry using vue-html-to-paper. The element can be hidden either through display: none or visibility: hidden and the plugin will still print the contents of the element. Printing a Vue 2 component using [Printd] (https://github. use(VueHtmlToPaper, options); // or using the defaults with no stylesheet Vue. Sep 15, 2018 · I want to print some content from a vue component. For example from the following snippet, I would like to print the v-card-text element which also has an id of #print: el: '#app', data() { return { dialog: false. . Start using vue-html-to-paper in your project by running `npm i vue-html-to-paper`. ickenageiuslgmqsuqdzampbavmthqgtzwzfekqcvvrlifjocfybgi