fix(function):修复table中hook(useDataSource)中请求前请求后回调未在prop中声明、isFunction支持普通、箭头函数判断

This commit is contained in:
郑常富
2022-06-13 22:02:37 +08:00
parent 88ada7ebee
commit 7b9b391adc
3 changed files with 11 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ export function is(val: unknown, type: string) {
* @description: 是否为函数
*/
export function isFunction<T = Function>(val: unknown): val is T {
return is(val, 'Function');
return is(val, 'Function') || is(val, 'AsyncFunction');
}
/**