@lemon-fe/kits 0.1.93 → 0.1.98

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/es/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export * from '@lemon-fe/components';
2
2
  export * from '@lemon-fe/hooks';
3
3
  export { BasicLayout, BlankLayout, Breadcrumb } from '@lemon-fe/layouts';
4
4
  export { default as useBatchOperator } from './useBatchOperator';
5
+ export { default as usePageTrack } from './usePageTrack';
5
6
  export { default as Subject } from './subject';
package/es/index.js CHANGED
@@ -2,4 +2,5 @@ export * from '@lemon-fe/components';
2
2
  export * from '@lemon-fe/hooks';
3
3
  export { BasicLayout, BlankLayout, Breadcrumb } from '@lemon-fe/layouts';
4
4
  export { default as useBatchOperator } from './useBatchOperator';
5
+ export { default as usePageTrack } from './usePageTrack';
5
6
  export { default as Subject } from './subject';
@@ -0,0 +1,9 @@
1
+ declare global {
2
+ interface Window {
3
+ _czc?: any[];
4
+ }
5
+ }
6
+ export default function usePageTrack(params: {
7
+ system: string;
8
+ page: string;
9
+ }): void;
@@ -0,0 +1,8 @@
1
+ import { useEffect } from 'react';
2
+ export default function usePageTrack(params) {
3
+ return useEffect(function () {
4
+ if (window._czc) {
5
+ window._czc.push(['_trackEvent', '页面访问', params.system, params.page]);
6
+ }
7
+ }, []);
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "0.1.93",
3
+ "version": "0.1.98",
4
4
  "description": "> TODO: description",
5
5
  "author": "鲁盛杰 <lusj@cnlemon.net>",
6
6
  "homepage": "",
@@ -24,13 +24,13 @@
24
24
  "url": "git@gitlab.nhsoft.cn:lemon-fe/kits-next.git"
25
25
  },
26
26
  "dependencies": {
27
- "@lemon-fe/components": "^0.1.93",
27
+ "@lemon-fe/components": "^0.1.97",
28
28
  "@lemon-fe/hooks": "^0.1.86",
29
- "@lemon-fe/layouts": "^0.1.93",
29
+ "@lemon-fe/layouts": "^0.1.98",
30
30
  "antd": "^4.21.6"
31
31
  },
32
32
  "scripts": {
33
33
  "test": "echo \"Error: run tests from root\" && exit 1"
34
34
  },
35
- "gitHead": "6c934e2c6083e08ec81d7436e6a8eac6fe37da5f"
35
+ "gitHead": "4eb7c0af9e7abecb74dba8b34f4085d80687fdc7"
36
36
  }