mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-11-04 04:08:44 +08:00 
			
		
		
		
	Merge pull request #10 from nullcache/bug/add-fix-useTable
修复useTable在total为0时的bug
This commit is contained in:
		@@ -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 = {}) => {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user