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.
- package/README.md +15 -0
- package/index.js +1 -1
- 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
|
-
|
|
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
|
// 转换数组
|