All Projects → alexwjj → vue-iframe-print

alexwjj / vue-iframe-print

Licence: other
一款支持局部打印的 vue插件

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
HTML
75241 projects

Projects that are alternatives of or similar to vue-iframe-print

pikaz-iframe
基于vue封装的iframe组件
Stars: ✭ 54 (+107.69%)
Mutual labels:  iframe
react-responsive-embed
⚛️ Embed iframes responsively
Stars: ✭ 39 (+50%)
Mutual labels:  iframe
table
Produces a string that represents slice data in a text table, inspired by gajus/table.
Stars: ✭ 130 (+400%)
Mutual labels:  print
cdn
🚀 ✈️ 🚄 free CDN for everyone who wants to speed his website freely!😄
Stars: ✭ 16 (-38.46%)
Mutual labels:  iframe
iOS-AirPrint-for-Mac
enable iOS Airprint Sharing on Mac OS
Stars: ✭ 24 (-7.69%)
Mutual labels:  print
iframe-communication
Basic two way iframe communication
Stars: ✭ 88 (+238.46%)
Mutual labels:  iframe
post-messenger
👶 ~1 Kb wrapper of window.postMessage for cross-document communication.
Stars: ✭ 28 (+7.69%)
Mutual labels:  iframe
iframe-worker
A tiny WebWorker polyfill for the file:// protocol
Stars: ✭ 23 (-11.54%)
Mutual labels:  iframe
Task2pdf
Kanboard - Task2PDF
Stars: ✭ 48 (+84.62%)
Mutual labels:  print
PostEvent
A Cross-Domain Event Handler javascript library. Pure Vanilla JS, no dependencies.
Stars: ✭ 14 (-46.15%)
Mutual labels:  iframe
trainmanjs
TrainmanJS - Cross-Origin Communication Library
Stars: ✭ 16 (-38.46%)
Mutual labels:  iframe
Friendly Code Editor
Try this Friendly Code Editor. You'll love it. I made it with a lot of effort. It has some great features. I will update it adequately later. Very helpful for developers. Enjoy and share.
Stars: ✭ 20 (-23.08%)
Mutual labels:  iframe
manifest-design
vue开发的商品标签设计插件 && 系统,功能包含:设计,预览,打印
Stars: ✭ 133 (+411.54%)
Mutual labels:  print
scion-microfrontend-platform
SCION Microfrontend Platform is a TypeScript-based open-source library that helps to implement a microfrontend architecture using iframes.
Stars: ✭ 51 (+96.15%)
Mutual labels:  iframe
paper-terminal
Print Markdown to a paper in your terminal
Stars: ✭ 33 (+26.92%)
Mutual labels:  print
compile-time-printer
Prints values and types during compilation!
Stars: ✭ 45 (+73.08%)
Mutual labels:  print
rx-postmessenger
Minimal RxJS adapter for the window.postMessage API for request-response streams and notification streams across frame windows.
Stars: ✭ 27 (+3.85%)
Mutual labels:  iframe
consono
The most correct, informative, appealing and configurable variable inspector for JavaScript
Stars: ✭ 17 (-34.62%)
Mutual labels:  print
oembed
A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.
Stars: ✭ 34 (+30.77%)
Mutual labels:  iframe
Boundary
Boundary is a CSS+Javascript library for Chrome extension developers to easily create HTML elements that won’t affect or be affected by the current webpage’s CSS. Strongly recommended if you are considering adding a sticker, a sidebar or any overlay box using content script.
Stars: ✭ 59 (+126.92%)
Mutual labels:  iframe

vue-iframe-print

基于 iframe 打印的小工具,原版有些bug,修复了下

原版地址 vue-print-nb

安装

npm install vue-iframe-print --save
import Print from 'vue-iframe-print'

Vue.use(Print);

示例

在线打印示例

你也可以克隆下来本地跑一下

如果你需要扩展功能,可以联系我,或者自己本项目的源文件进行更改

使用姿势

打印整页

<button v-print>打印整页</button>

局部打印:

HTML:

<div id="printDiv">
    且随疾风前行,身后亦需流心
</div>

<button v-print="'#printDiv'">只打印指定 DOM</button>

局部打印扩展

HTML:

<div id="printDiv">
    且随疾风前行,身后亦需流心
</div>

<button v-print="printObj">只打印指定 DOM</button>

Vue JavaScript:

export default {
    data() {
        return {
            printObj: {
              id: "printDiv",
              popTitle: 'vue-iframe-print',
              extraCss: 'https://www.baidu.com/,https://www.baidu.com/',
              extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>'
            }
        };
    }
}

API

  • id: 打印的 ID
  • standard: 文档类型, 默认html5, 可选 html5, loose, strict
  • extraHead: 扩展头部
  • extraCss: 扩展 css
  • popTitle: 标题
  • endCallback(): 打印成功后回调
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].