Skip to content

fengli01/vue-perfect-print

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-perfect-print

This is a simple and fast component for printing the local content of the page.

Install

npm install vue-perfect-print
import VuePerfectPrint from 'vue-perfect-print'

Vue.use(VuePerfectPrint);

Run demo

<template>
    <div>
        <button @click="print">click print</button>
    </div>
</template>

<script>
    export default {
        methods:{
            print(){
                this.perfectPrint({
                    content: "<h1>打印</h1>"
                });
            }
        }
    }
</script>

Parameter description

Parameter Required Description
id false ID of the print window
content true Print content, support HTML and text
showHeaderFooter false Display page and footer, default false

About

基于Vue的打印组件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published