kn-hooks 0.0.45 → 0.0.46
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/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import useClipboard from './useClipboard/index.js';
|
|
2
2
|
import useSwitch from './useSwitch/index.js';
|
|
3
|
-
import useDictionary from './useDictionary/index.
|
|
3
|
+
import useDictionary from './useDictionary/index.jsx';
|
|
4
4
|
import useCounter from './useCounter/index.js';
|
|
5
5
|
import usePagination from './usePagination/index.js';
|
|
6
6
|
import usePaginationWithForm from './usePaginationWithForm/index.js';
|
|
@@ -270,13 +270,14 @@ const usePagination = (props) => {
|
|
|
270
270
|
};
|
|
271
271
|
|
|
272
272
|
useEffect(() => {
|
|
273
|
+
refDestory.current = 0;
|
|
273
274
|
if (props.debug) {
|
|
274
|
-
console.log(`[usePagination]新建:`, debugName || props);
|
|
275
|
+
console.log(`[usePagination]新建:`, debugName || props,refDestory);
|
|
275
276
|
}
|
|
276
277
|
return () => {
|
|
277
278
|
refDestory.current = 1;
|
|
278
279
|
if (props.debug) {
|
|
279
|
-
console.log(`[usePagination]销毁:`, debugName || props);
|
|
280
|
+
console.log(`[usePagination]销毁:`, debugName || props,refDestory);
|
|
280
281
|
}
|
|
281
282
|
};
|
|
282
283
|
}, []);
|
|
@@ -293,8 +294,9 @@ const usePagination = (props) => {
|
|
|
293
294
|
loading,
|
|
294
295
|
mode,
|
|
295
296
|
scrollData,
|
|
297
|
+
self:refDestory
|
|
296
298
|
};
|
|
297
|
-
}, [pagination, data, refListener, loading, mode, scrollData]);
|
|
299
|
+
}, [pagination, data, refListener, loading, mode, scrollData,refDestory.current]);
|
|
298
300
|
|
|
299
301
|
return action;
|
|
300
302
|
};
|
/package/{README.md → readme.md}
RENAMED
|
File without changes
|
|
File without changes
|