vg-print-vue2 1.0.301 → 1.0.302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +15 -0
- package/README.md +19 -3
- package/dist/style.css +179 -179
- package/dist/vg-print-vue2.es.js +415 -3351
- package/package.json +6 -2
package/README.en.md
CHANGED
|
@@ -48,6 +48,21 @@ import { setSocketIo } from 'vg-print'
|
|
|
48
48
|
setSocketIo(io)
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
If you need the Data Source feature, install the optional dependency in your host app:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm i axios
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
In your main entry file (e.g., `main.ts`):
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
import axios from 'axios'
|
|
61
|
+
import { setHttpClient } from 'vg-print-vue2'
|
|
62
|
+
|
|
63
|
+
setHttpClient(axios)
|
|
64
|
+
```
|
|
65
|
+
|
|
51
66
|
## Header Component
|
|
52
67
|
|
|
53
68
|
- Used for the top area of the page, with built-in common operation buttons and printer settings; supports customization via `props` and `slots`.
|
package/README.md
CHANGED
|
@@ -91,8 +91,6 @@ hiprint.register({
|
|
|
91
91
|
|
|
92
92
|
## 静默打印客户端工具安装包
|
|
93
93
|
|
|
94
|
-

|
|
95
|
-
|
|
96
94
|
[客户端工具下载](https://download.csdn.net/download/github_38400706/92538739)
|
|
97
95
|
|
|
98
96
|
## 特性
|
|
@@ -112,7 +110,7 @@ npm i vg-print-vue2
|
|
|
112
110
|
### 可选依赖:直连打印/客户端连接(socket.io-client)
|
|
113
111
|
|
|
114
112
|
- 本库默认不内置 `socket.io-client`,以减少默认安装体积。
|
|
115
|
-
- 仅当你需要“直连打印/客户端连接(
|
|
113
|
+
- 仅当你需要“直连打印/客户端连接(webSocket)”能力(如 `print()` / `print2()` / 自动连接)时,才需要安装并注入:
|
|
116
114
|
|
|
117
115
|
```bash
|
|
118
116
|
npm i socket.io-client
|
|
@@ -129,6 +127,24 @@ setSocketIo(io)
|
|
|
129
127
|
|
|
130
128
|
也可直接使用 `window.io = io`(等价)。
|
|
131
129
|
|
|
130
|
+
### 可选依赖:数据源(axios)
|
|
131
|
+
|
|
132
|
+
- 本库默认不内置 `axios`,以减少默认安装体积。
|
|
133
|
+
- 仅当你需要使用“数据源管理/接口测试获取/字段绑定”等能力时,才需要安装并注入:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm i axios
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
在项目入口(如 `main.ts`)注入:
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
import axios from 'axios'
|
|
143
|
+
import { setHttpClient } from 'vg-print-vue2'
|
|
144
|
+
|
|
145
|
+
setHttpClient(axios)
|
|
146
|
+
```
|
|
147
|
+
|
|
132
148
|
## Header 顶部工具栏组件
|
|
133
149
|
|
|
134
150
|
- 用于页面一级头部区域,内置常用操作按钮与打印机设置;支持通过 `props` 与 `slots` 定制。
|