Commit 9f8e12de by 芋道源码 Committed by GitHub

Merge pull request #10 from nullcache/bug/add-fix-useTable

修复useTable在total为0时的bug
parents 1e49a8ea 69c4995b
......@@ -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 = {}) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment