We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// 在index.html 名称必须为 print-lock.css <link rel="stylesheet" type="text/css" media="print" href="https://cdn.jsdelivr.net/npm/vue-plugin-hiprint@latest/dist/print-lock.css"> // 也可为相对链接/自有链接 eg: public/print-lock.css <link rel="stylesheet" type="text/css" media="print" href="/print-lock.css">
import { hiprint } from 'vue-plugin-hiprint' // 还原配置 hiprint.setConfig() // 替换配置 相关配置可控制台输入 window.HIPRINT_CONFIG 查看 hiprint.setConfig({})
import {autoConnect, disAutoConnect} from 'vue-plugin-hiprint' // autoConnect(); // 默认会自动连接 disAutoConnect(); // 取消自动连接
import { hiprint } from 'vue-plugin-hiprint' hiprint.hiwebSocket.setHost("http://192.169.0.6:17521") // 或者 window.hiwebSocket.setHost("http://192.169.0.6:17521")
// 浏览器预览打印 hiprintTemplate.print(this.printData, {}, { callback: () => { // 浏览器不同, 无法监听是点了 ‘打印’ 还是 ‘取消’ console.log('浏览器打印窗口已打开') } }) // 直接打印 hiprintTemplate.print2(printData, {printer: '打印机名称', title: '打印标题'}) hiprintTemplate.on('printSuccess', function (data) { console.log('打印完成') }) hiprintTemplate.on('printError', function (data) { console.log('打印失败') })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1.打印重叠或者样式问题
2.修改默认配置 或者 显示/隐藏元素设置参数
3.连接客户端/不自动连接客户端
4.连接局域网内其他客户端
5.打印回调问题
The text was updated successfully, but these errors were encountered: