Explorar o código

feat(types): 增加统一返回数据接口

vian %!s(int64=5) %!d(string=hai) anos
pai
achega
6625270f3c
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      types/src/interface/base.ts

+ 7 - 0
types/src/interface/base.ts

@@ -160,3 +160,10 @@ export interface IColumnMeta {
   visible?: boolean;
   visible?: boolean;
   source?: string[];
   source?: string[];
 }
 }
+
+// 返回数据接口
+export interface IResult<T = any> {
+  errno: number;
+  message: string;
+  data: T;
+}