yh-hiprint 2.1.1 → 2.1.2

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.
Files changed (3) hide show
  1. package/README.md +15 -0
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -114,6 +114,21 @@ export default defineConfig({
114
114
 
115
115
  ```
116
116
 
117
+ ### 预览调用方法
118
+
119
+ ```javascript
120
+ // 如果是自己的组件中则需要自己引入,slw 脚本中是不需要自己引入的,slw已经处理
121
+ const hiprint = inject("$hiprint")
122
+
123
+ // 三个可选参数必须有一个
124
+ hirpint({
125
+ code: "xxxxxx", // 必选
126
+ params: {...}, // 可选
127
+ data: {...} | [{...},...], // 可选
128
+ isCustom: true | false, // 可选
129
+ })
130
+ ```
131
+
117
132
  ## 更新日志
118
133
 
119
134
  ###### 2.1.1
package/index.js CHANGED
@@ -14,7 +14,7 @@ export function cLog(string, isError = false) {
14
14
  }
15
15
  }
16
16
 
17
- export const hiprint = ({ code, params, data, isCustom }) => {
17
+ const hiprint = ({ code, params, data, isCustom }) => {
18
18
  let height = document.documentElement.clientHeight;
19
19
  let width = (document.documentElement.clientWidth - 1200) / 2;
20
20
  // 转换数组
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yh-hiprint",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "Hiprint for Vue3 by NoahLiu in ForceCon in Hunan Changesha",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",