Commit c0bf357d by 芋道源码 Committed by Gitee

!177 修复useTable在total为0时的bug

Merge pull request !177 from nullcache/bug/add-fix-useTable
parents c1a4edf7 07367987
...@@ -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 = {}) => {
......
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