vg-print 1.1.312 → 1.1.314
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.md +27 -0
- package/dist/style.css +1 -1
- package/dist/vg-print.es.js +26517 -51051
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -144,6 +144,33 @@ setHttpClient(axios)
|
|
|
144
144
|
|
|
145
145
|
未安装/未注入时,“数据源”入口会自动禁用;即使误触发也不会导致项目报错。
|
|
146
146
|
|
|
147
|
+
### 可选插件:条码/二维码(@vg-print/plugin-bwip-js)
|
|
148
|
+
|
|
149
|
+
- 本库默认不内置 `bwip-js`,以减少默认安装体积。
|
|
150
|
+
- 仅当你需要“条形码/二维码元素(barcode/qrcode)”能力时,才需要安装并注册插件:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
npm i @vg-print/plugin-bwip-js
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
在项目入口(如 `main.ts`)注册插件(与 `authKey` 一起或单独均可):
|
|
157
|
+
|
|
158
|
+
```js
|
|
159
|
+
import { hiprint } from 'vg-print'
|
|
160
|
+
import pluginEleBwip from '@vg-print/plugin-bwip-js'
|
|
161
|
+
|
|
162
|
+
hiprint.register({
|
|
163
|
+
plugins: [
|
|
164
|
+
pluginEleBwip({
|
|
165
|
+
barcodeTypeList: [{ title: 'EAN-13', value: 'ean13' }],
|
|
166
|
+
qrcodeTypeList: [{ title: 'QR Code', value: 'qrcode' }]
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
})
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
不传参数则使用插件内置的默认列表;你也可以按 `{ title, value, group }` 的结构传入完整的分组列表(`group: true` 表示分组标题)。
|
|
173
|
+
|
|
147
174
|
## Header 顶部工具栏组件
|
|
148
175
|
|
|
149
176
|
- 用于页面一级头部区域,内置常用操作按钮与打印机设置;支持通过 `props` 与 `slots` 定制。
|