Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
9f8e12de
authored
Jul 02, 2023
by
芋道源码
Committed by
GitHub
Jul 02, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10 from nullcache/bug/add-fix-useTable
修复useTable在total为0时的bug
parents
1e49a8ea
69c4995b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
+1
-3
src/hooks/web/useTable.ts
+1
-3
No files found.
src/hooks/web/useTable.ts
View file @
9f8e12de
...
@@ -136,9 +136,7 @@ export const useTable = <T = any>(config?: UseTableConfig<T>) => {
...
@@ -136,9 +136,7 @@ export const useTable = <T = any>(config?: UseTableConfig<T>) => {
})
})
if
(
res
)
{
if
(
res
)
{
tableObject
.
tableList
=
(
res
as
unknown
as
ResponseType
).
list
tableObject
.
tableList
=
(
res
as
unknown
as
ResponseType
).
list
if
((
res
as
unknown
as
ResponseType
).
total
)
{
tableObject
.
total
=
(
res
as
unknown
as
ResponseType
).
total
??
0
tableObject
.
total
=
(
res
as
unknown
as
ResponseType
).
total
as
unknown
as
number
}
}
}
},
},
setProps
:
async
(
props
:
TableProps
=
{})
=>
{
setProps
:
async
(
props
:
TableProps
=
{})
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment