ztxkutils 2.4.1 → 2.4.4

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/dist/request.d.ts CHANGED
@@ -6,4 +6,4 @@ export interface IOptions extends AxiosRequestConfig {
6
6
  isFormData?: boolean;
7
7
  encryptionType?: 'aes' | 'des' | boolean;
8
8
  }
9
- export default function request(myOptions: IOptions): import("axios").AxiosPromise<any>;
9
+ export default function request(myOptions: IOptions): any;
package/dist/request.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import './tslib.es6-f9459658.js';
2
2
  import 'axios';
3
3
  import 'ztxkui';
4
- export { a as default } from './request-35a68ae8.js';
5
- import './authority-17b7fde2.js';
4
+ export { a as default } from './request-4f3e6994.js';
5
+ import './authority-fad2028d.js';
6
6
  import './crypto-c481f616.js';
7
7
  import 'crypto';
@@ -1,6 +1,6 @@
1
1
  import Stomp from 'stompjs';
2
2
  import SockJS from 'zt-sockjs-client';
3
- import { g as getToken } from './authority-17b7fde2.js';
3
+ import { g as getToken } from './authority-fad2028d.js';
4
4
 
5
5
  var StompClient = /** @class */ (function () {
6
6
  function StompClient(connectWsConfig) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @description 通过iframe双向通信逻辑
3
3
  */
4
- export declare function useOnmessage(messageFn: any): void;
4
+ export declare function useOnmessage(messageFn: any, isDebugger?: boolean): void;
5
5
  /**
6
6
  * @description 发送消息方法
7
7
  * @param iframeWindow 窗口对象
package/dist/workflow.js CHANGED
@@ -11,16 +11,20 @@ import 'number-precision';
11
11
  /**
12
12
  * @description 通过iframe双向通信逻辑
13
13
  */
14
- function useOnmessage(messageFn) {
14
+ function useOnmessage(messageFn, isDebugger) {
15
15
  useEffect(function () {
16
16
  var messageHandle = function (e) {
17
- console.log('父页面传递过来的消息', e);
17
+ if (isDebugger) {
18
+ console.log('父页面传递过来的消息', e);
19
+ }
18
20
  var messageData = {};
19
21
  try {
20
22
  messageData = JSON.parse(e.data);
21
23
  }
22
24
  catch (err) {
23
- console.log('父页面传递过来的消息解析报错', err);
25
+ if (isDebugger) {
26
+ console.log('父页面传递过来的消息解析报错', err);
27
+ }
24
28
  }
25
29
  messageFn && messageFn(messageData);
26
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkutils",
3
- "version": "2.4.1",
3
+ "version": "2.4.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -60,4 +60,4 @@
60
60
  "react-dom": ">=17.0.1",
61
61
  "ztxkui": ">=0.4.1"
62
62
  }
63
- }
63
+ }