# vue3-print-ts **Repository Path**: wen_you_development_35548940/vue3-print-ts ## Basic Information - **Project Name**: vue3-print-ts - **Description**: vue3 print typescript - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-01-20 - **Last Updated**: 2024-01-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # vue-print-ts vue3 print typescript, this package for vue3.3.*. ## install vue-print-ts ```sh npm install vue-print-ts ``` ## use vue-print-ts ```javascript // 全局引入 import Print from 'vue3-print-ts'; import App from './App.vue'; const app = createApp(App); app.directive("print", Print); ``` ```javascript // 页面中使用 ``` ## v-print API 全局打印 v-print 局部打印,PrintConf参数局部打印有效 v-print="PrintConf" | Parame | Explain | Type | OptionalValue | DefaultValue | | ------------------------- | ------------------------------------------------------------------------------ | ----------------- | --------------------- | ------------ | | ids | Range print ID ,required value | String,String[] | — | — | | standard | Document type | String,String[] | html5/loose/strict | html5 | | extraHead | ``Add DOM nodes in the node, example: `` | String,String[] | — | — | | extraCss | `` New CSS style sheet, example: `http://www.**.com/aa.css` | String | — | - | | printTitle | `` Content of label | String | — | - | | beforePrint | Callback function before calling printing tool, example: calback(event) | VoidFunction | — | - | | afterPrint | Callback function after calling printing tool, example: calback(event) | VoidFunction | — | - | | showBackground | print page show background style | Boolean | — | true | ## Project Setup ```sh npm install ``` ### Compile lib ```sh npm run build:lib ```