Skip to content

Commit 8dd1000

Browse files
committed
update README.md
1 parent 6380ce8 commit 8dd1000

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ vue-plugin-hiprint (基于 [hiprint 2.5.4](http://hiprint.io/)) 当时只是为
4848
> - 使用直接客户端时,本地开发连接没问题,部署到线上出现跨域无法连接打印客户端问题:
4949
> - [线上跨域问题,请升级 https! 说明:https://www.cnblogs.com/daysme/p/15493523.html](https://www.cnblogs.com/daysme/p/15493523.html)
5050
> - 如需提交 PR 请前往 github 合并后可自动发布 npm 包并同步代码到 gitee
51-
> - vue-plugin-hiprint 包不包含 UI 界面,需要自行处理。如果想更快速引入请查看 [sv-print 组件库](https://ccsimple.github.io/sv-print-docs/)
51+
> - vue-plugin-hiprint 包不包含 UI 界面,需要自行处理。如果想更快速引入请查看 [sv-print 组件库](https://www.ibujian.cn/svp/)
5252
5353
## 文章链接
5454

@@ -249,12 +249,20 @@ hiPrintPlugin.disAutoConnect();
249249

250250
/// 提供的全局方法:
251251

252-
/// provider 可为null args: 同模板对应调用 print 方法
252+
// this.$pluginName == hiprint 全局对象
253+
let hiprintTemplate = this.$pluginName.PrintTemplate({
254+
template: {}, // 模板json [对象]
255+
});
256+
hiprintTemplate.print({name:'i不简'});
257+
258+
/// provider 不能为null, 可以为 undefined args: 同模板对应调用 print 方法
253259

254260
// 1. 打印
255-
this.$pluginName.print(provider, templateJson, ...args);
261+
this.$print(undefined, templateJson, ...args);
262+
this.$print(provider, templateJson, ...args);
256263
// 2. 直接打印
257-
this.$pluginName.print2(provider, templateJson, ...args);
264+
this.print2(undefined, templateJson, ...args);
265+
this.print2(provider, templateJson, ...args);
258266
```
259267

260268
## jQuery/uniapp 项目使用

0 commit comments

Comments
 (0)