Commit 07367987 by nullcache Committed by Gitee

修复useTable在total为0时的bug

parent c1a4edf7
...@@ -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