vg-print 1.1.305 → 1.1.307

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 CHANGED
@@ -88,8 +88,6 @@ hiprint.register({
88
88
 
89
89
  ## 静默打印客户端工具安装包
90
90
 
91
- ![静默打印客户端工具](https://gitee.com/gao111/electron-vg-print/raw/master/electron-hiprint.png)
92
-
93
91
  [客户端工具下载](https://download.csdn.net/download/github_38400706/92538739)
94
92
 
95
93
  ## 特性
@@ -126,6 +124,26 @@ setSocketIo(io)
126
124
 
127
125
  也可直接使用 `window.io = io`(等价)。
128
126
 
127
+ ### 可选依赖:数据源(axios)
128
+
129
+ - 本库默认不内置 `axios`,以减少默认安装体积。
130
+ - 仅当你需要“数据源管理/接口取数/字段联动”能力时,才需要安装并注入:
131
+
132
+ ```bash
133
+ npm i axios
134
+ ```
135
+
136
+ 在项目入口(如 `main.ts`)注入:
137
+
138
+ ```js
139
+ import axios from 'axios'
140
+ import { setHttpClient } from 'vg-print'
141
+
142
+ setHttpClient(axios)
143
+ ```
144
+
145
+ 未安装/未注入时,“数据源”入口会自动禁用;即使误触发也不会导致项目报错。
146
+
129
147
  ## Header 顶部工具栏组件
130
148
 
131
149
  - 用于页面一级头部区域,内置常用操作按钮与打印机设置;支持通过 `props` 与 `slots` 定制。