yh-hiprint 2.6.15 → 2.6.17

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 (2) hide show
  1. package/index.ts +5 -3
  2. package/package.json +2 -2
package/index.ts CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  ElMessage,
10
10
  } from 'element-plus';
11
11
  import {createApp, createVNode} from 'vue';
12
+ import {Router} from "vue-router"
12
13
  import {
13
14
  hiprint,
14
15
  defaultElementTypeProvider,
@@ -23,6 +24,7 @@ export {default as fontSize} from './font-size';
23
24
  export {default as scale} from './scale';
24
25
  export {default as zIndex} from './z-index';
25
26
  export {default as panel} from './panel';
27
+ export {default as hiprintVue} from './hiprint.vue';
26
28
  import {getPrintTemplate} from './libs/index.js';
27
29
  export {default as defaultPrintElement} from './store/defaultPrintElement';
28
30
  export {getPrintTemplate};
@@ -191,11 +193,11 @@ const silentHiprint = async ({
191
193
  (window as unknown as CustomWindow).silentHiprint = silentHiprint;
192
194
 
193
195
  interface InstallOptions {
194
- router?: any;
196
+ router?: Router | undefined;
195
197
  pinia?: any;
196
198
  isAdmin?: boolean;
197
199
  isNew?: boolean;
198
- addInitTask: (any) => {}
200
+ addInitTask: (cl:any) => void
199
201
  }
200
202
 
201
203
  // 客户端打印处理函数
@@ -489,7 +491,7 @@ export default {
489
491
 
490
492
  if(isNew) {
491
493
  addInitTask(async () => {
492
- if (!router || router.hasRoute('Index')) return;
494
+ if (!router || !router.hasRoute('Index')) return;
493
495
  router.addRoute('Index', {
494
496
  path: 'hiprint/designer',
495
497
  name: '打印设计器',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yh-hiprint",
3
- "version": "2.6.15",
3
+ "version": "2.6.17",
4
4
  "description": "Hiprint for Vue3 by NoahLiu in ForceCon in Hunan Changesha",
5
5
  "type": "module",
6
6
  "exports": {
@@ -26,4 +26,4 @@
26
26
  "element-plus": "^2.9.0"
27
27
  },
28
28
  "author": "Liubin"
29
- }
29
+ }