xmirror-components 1.0.35 → 1.0.36
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/build/dist/index.cjs +23 -23
- package/build/dist/index.mjs +998 -990
- package/build/es/hooks/useTable/index.js +10 -1
- package/build/es/hooks/useTable/types.d.ts +4 -0
- package/build/lib/hooks/useTable/index.js +10 -1
- package/build/lib/index.d.ts +4 -0
- package/build/package.json +1 -1
- package/build/types/hooks/useTable/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -295,6 +295,14 @@ function useTable(request, options) {
|
|
|
295
295
|
var currentPageSize = (_c = pagination.pageSize) !== null && _c !== void 0 ? _c : paginationRef.current.pageSize;
|
|
296
296
|
initList(currentPage, currentPageSize);
|
|
297
297
|
}, [initList, searchParams]);
|
|
298
|
+
var reset = function () {
|
|
299
|
+
setSelectedRows([]);
|
|
300
|
+
setTableData([]);
|
|
301
|
+
setPagination(__assign({ current: 1, pageSize: 10, total: 0 }, defaultPagination));
|
|
302
|
+
setLoading(false);
|
|
303
|
+
searchParams.pageNum = 1;
|
|
304
|
+
searchParams.pageSize = (defaultPagination === null || defaultPagination === void 0 ? void 0 : defaultPagination.pageSize) || 10;
|
|
305
|
+
};
|
|
298
306
|
// 初始化
|
|
299
307
|
useEffect(function () {
|
|
300
308
|
if (immediate) {
|
|
@@ -321,7 +329,8 @@ function useTable(request, options) {
|
|
|
321
329
|
pagination: pagination,
|
|
322
330
|
params: searchParams,
|
|
323
331
|
submit: search,
|
|
324
|
-
refresh: refresh
|
|
332
|
+
refresh: refresh,
|
|
333
|
+
reset: reset
|
|
325
334
|
},
|
|
326
335
|
rowSelection: {
|
|
327
336
|
selectedRows: selectedRows,
|
|
@@ -297,6 +297,14 @@ function useTable(request, options) {
|
|
|
297
297
|
var currentPageSize = (_c = pagination.pageSize) !== null && _c !== void 0 ? _c : paginationRef.current.pageSize;
|
|
298
298
|
initList(currentPage, currentPageSize);
|
|
299
299
|
}, [initList, searchParams]);
|
|
300
|
+
var reset = function () {
|
|
301
|
+
setSelectedRows([]);
|
|
302
|
+
setTableData([]);
|
|
303
|
+
setPagination(__assign({ current: 1, pageSize: 10, total: 0 }, defaultPagination));
|
|
304
|
+
setLoading(false);
|
|
305
|
+
searchParams.pageNum = 1;
|
|
306
|
+
searchParams.pageSize = (defaultPagination === null || defaultPagination === void 0 ? void 0 : defaultPagination.pageSize) || 10;
|
|
307
|
+
};
|
|
300
308
|
// 初始化
|
|
301
309
|
(0, react_1.useEffect)(function () {
|
|
302
310
|
if (immediate) {
|
|
@@ -323,7 +331,8 @@ function useTable(request, options) {
|
|
|
323
331
|
pagination: pagination,
|
|
324
332
|
params: searchParams,
|
|
325
333
|
submit: search,
|
|
326
|
-
refresh: refresh
|
|
334
|
+
refresh: refresh,
|
|
335
|
+
reset: reset
|
|
327
336
|
},
|
|
328
337
|
rowSelection: {
|
|
329
338
|
selectedRows: selectedRows,
|
package/build/lib/index.d.ts
CHANGED
package/build/package.json
CHANGED