首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏中间件的探究

    Vue使用printjs组件打印页面

    Vue使用printjs组件打印页面 新需求: 需要将页面的局部信息打印出来,只在前端实现,不要占用后端的资源。 经过一通百度,决定使用 print-js和html2canvas组件。 import Vue from "vue"; import printjs from 'print-js' import 'print-js/dist/print.css'; import html2canvas $print = printjs; Vue.prototype.

    3.7K30编辑于 2023-03-25
  • Printjs:自定义网页打印功能插件库

    打印表格:浏览器支持:安装使用:// 引入 Print.jsimport printJS from 'print-js'// 打印按钮点击事件document.getElementById('printButton ').addEventListener('click', function() { printJS({ printable: 'element-to-print', // 要打印的元素的ID

    3.4K10编辑于 2024-12-26
  • 来自专栏cnblogs

    前端导出Excel和打印介绍

    git地址:https://github.com/SheetJS/sheetjs npm安装包 npm install --save printa-js xlsx 导入包 import * as printJS : norm; }, .line{ text-decoration: underline; } ', type: 'json', footer: footer || '' } printJS

    1.2K10发布于 2020-12-01
  • 来自专栏编程技术分享

    element-ui 表格打印

    printJS({ printable: id, // DOM id type: 'html', scanStyles: false, }) element-ui 表格打印 element-ui , newHTML) // 将新的 DIV 添加到页面 打印后再删掉 document.querySelector('body').appendChild(div) printJS

    2.6K30发布于 2020-09-28
  • 来自专栏全栈程序员必看

    用js在控制台打印html页面,vue 使用print-js 打印html页面

    methods: { goPrint(){ console.log(‘打印’) printJS({ printable: ‘printCons’, type: ‘html’, //properties

    11.5K30编辑于 2022-11-01
  • Web打印技术深度解析:从传统方案到现代解决方案

    仍然依赖浏览器的打印引擎样式支持仍然有限无法生成PDF文件第三代:JavaScript打印库随着前端技术的发展,出现了各种JavaScript打印库,如print-js、jsPDF等:// 使用print-js库printJS

    46010编辑于 2025-08-08
  • 来自专栏前端达人

    分享 42 个面向前端开发的 JS 库和框架

    37、Print.js 地址:https://printjs.crabbly.com/ Print.js 是一个紧凑的 JavaScript 库,它允许您直接在网页上打印文件而不会出现任何问题。

    8.4K31发布于 2021-11-16
  • 来自专栏前端达人

    分享 63 个面向前端开发人员的开源项目工具

    15、Print.js 地址:https://printjs.crabbly.com/ Print.js 是一个紧凑的 Javascript 库,它允许我们直接在网页上打印文件,而无需重定向或使用嵌入

    5.4K40编辑于 2022-03-25
领券