vue-element-plus-admin icon indicating copy to clipboard operation
vue-element-plus-admin copied to clipboard

`useTable` 泛型参数支持

Open XBIsland opened this issue 6 months ago • 0 comments

希望能给 useTable 增加泛型,用于支持 listrow 等参数

类似下面的示例

interface UseTableConfig<T = any> {
  immediate?: boolean
  fetchDataApi: () => Promise<{
    list: T[]
    total?: number
  }>
  fetchDelApi?: () => Promise<boolean>
}
export const useTable = <T = any>(config: UseTableConfig<T>) => {
  //...
}

XBIsland avatar Aug 08 '24 08:08 XBIsland