This repository was archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
重构自动刷新 #105
Merged
Merged
重构自动刷新 #105
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,5 +66,10 @@ | |
| "engines": { | ||
| "node": ">=20.0.0", | ||
| "pnpm": ">=9.0.0" | ||
| }, | ||
| "pnpm": { | ||
| "patchedDependencies": { | ||
| "[email protected]": "patches/[email protected]" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| diff --git a/CHANGELOG.md b/CHANGELOG.md | ||
| deleted file mode 100644 | ||
| index d8211cb2878a897638fa9388fdde6788e2d7c509..0000000000000000000000000000000000000000 | ||
| diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md | ||
| deleted file mode 100644 | ||
| index ba64ecd5c9280d350fd865a298d03f03722c3797..0000000000000000000000000000000000000000 | ||
| diff --git a/README-en_US.md b/README-en_US.md | ||
| deleted file mode 100644 | ||
| index dd6678fed1142bea8d86b2dd92ad6a53332e592f..0000000000000000000000000000000000000000 | ||
| diff --git a/dist/index.cjs.js b/dist/index.cjs.js | ||
| index b3b8208c8ac04c4e056115c5a0efa46a7fbfb39c..e43868b41b48cb56ecf7b4daa79cd3df29606ccf 100644 | ||
| --- a/dist/index.cjs.js | ||
| +++ b/dist/index.cjs.js | ||
| @@ -1168,6 +1168,7 @@ function useRequest(service, options, plugins) { | ||
|
|
||
| function usePagination(service) { | ||
| let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
| + let plugins = arguments[2] | ||
| const defaultPaginationOptions = { | ||
| currentKey: 'current', | ||
| pageSizeKey: 'pageSize', | ||
| @@ -1196,7 +1197,7 @@ function usePagination(service) { | ||
| params, | ||
| run, | ||
| ...rest | ||
| - } = useRequest(service, finallyOptions); | ||
| + } = useRequest(service, finallyOptions, plugins); | ||
| const paging = paginationParams => { | ||
| const [oldPaginationParams, ...restParams] = params.value || []; | ||
| const newPaginationParams = { | ||
| diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts | ||
| index ac0223505e0f07a59c66e7e8fdf4f886c1575de5..537e21159124531a5bc7aafd8d461119bb9733a8 100644 | ||
| --- a/dist/types/index.d.ts | ||
| +++ b/dist/types/index.d.ts | ||
| @@ -20,7 +20,7 @@ interface PaginationQueryResult<R, P extends unknown[]> extends QueryResult<R, P | ||
| changePageSize: (pageSize: number) => void; | ||
| changePagination: (current: number, pageSize: number) => void; | ||
| } | ||
| -declare function usePagination<R, P extends unknown[] = any>(service: Service<R, P>, options?: PaginationOptions<R, P>): PaginationQueryResult<R, P>; | ||
| +declare function usePagination<R, P extends unknown[] = any>(service: Service<R, P>, options?: PaginationOptions<R, P>, plugins?: PluginImplementType<R, P>[]): PaginationQueryResult<R, P>; | ||
|
|
||
| type CacheData<R = any, P = any> = { | ||
| data: R; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| type Timeout = ReturnType<typeof setTimeout>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.