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
07367987
authored
Jun 27, 2023
by
nullcache
Committed by
Gitee
Jun 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复useTable在total为0时的bug
parent
c1a4edf7
Hide 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 @
07367987
...
...
@@ -136,9 +136,7 @@ export const useTable = <T = any>(config?: UseTableConfig<T>) => {
})
if
(
res
)
{
tableObject
.
tableList
=
(
res
as
unknown
as
ResponseType
).
list
if
((
res
as
unknown
as
ResponseType
).
total
)
{
tableObject
.
total
=
(
res
as
unknown
as
ResponseType
).
total
as
unknown
as
number
}
tableObject
.
total
=
(
res
as
unknown
as
ResponseType
).
total
??
0
}
},
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