@lemon-fe/hooks 0.0.33 → 0.1.67
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/usePreload/index.js +3 -3
- package/es/useRequest/index.js +1 -1
- package/package.json +2 -2
package/es/usePreload/index.js
CHANGED
|
@@ -45,12 +45,12 @@ export default function usePreload(opts, deps) {
|
|
|
45
45
|
while (1) {
|
|
46
46
|
switch (_context.prev = _context.next) {
|
|
47
47
|
case 0:
|
|
48
|
-
|
|
48
|
+
setData(null);
|
|
49
|
+
_context.next = 3;
|
|
49
50
|
return request();
|
|
50
51
|
|
|
51
|
-
case
|
|
52
|
+
case 3:
|
|
52
53
|
res = _context.sent;
|
|
53
|
-
setData(null);
|
|
54
54
|
return _context.abrupt("return", res);
|
|
55
55
|
|
|
56
56
|
case 5:
|
package/es/useRequest/index.js
CHANGED
|
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
|
|
17
17
|
import { useRef, useEffect, useMemo, useState } from 'react';
|
|
18
18
|
import debounce from 'lodash/debounce';
|
|
19
|
-
import throttle from 'lodash/
|
|
19
|
+
import throttle from 'lodash/throttle';
|
|
20
20
|
import { hooksOpts } from '../config';
|
|
21
21
|
/**
|
|
22
22
|
* 发起网络请求, 主要面向场景: 提交单据、点击列表打开详情页前请求数据,自动捕获异常
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/hooks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.67",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "鲁盛杰 <lusj@cnlemon.net>",
|
|
6
6
|
"homepage": "",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/color-string": "^1.5.2"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "1fe5e8d52171f59161e288c4bfc6cea56fd5a4d8"
|
|
27
27
|
}
|