|
|
@@ -0,0 +1,30 @@
|
|
|
+/** API请求类型定义 */
|
|
|
+// 格式: MenuRoleList:MenuRoleItem[] 所有参数需带上 可选符-?
|
|
|
+// UpdateParams(add/update/delete): MenuRoleParams: { id?: string, ....}
|
|
|
+// 新增:剔除id Omit<MenuRoleParams, 'id' | ...> 删除: {id: string}
|
|
|
+declare namespace API {
|
|
|
+ /** @description Basic Params */
|
|
|
+ type PageParams = {
|
|
|
+ current?: number
|
|
|
+ pageSize?: number
|
|
|
+ }
|
|
|
+
|
|
|
+ /** @description Request泛型-基础请求 */
|
|
|
+ type BasicFetchResult<T extends any> = {
|
|
|
+ data: T
|
|
|
+ }
|
|
|
+
|
|
|
+ /** @description Request泛型-列表请求 */
|
|
|
+ type BasicFetchListResult<T extends any> = {
|
|
|
+ list: T[]
|
|
|
+ total: number
|
|
|
+ }
|
|
|
+
|
|
|
+ /** @description 通讯录 */
|
|
|
+ type ContractItem = {
|
|
|
+ id: string
|
|
|
+ }
|
|
|
+ type ContractList = ContractItem[]
|
|
|
+ type ContractUpdateParmas = ContractItem
|
|
|
+ type ContractAddParams = Omit<ContractItem, 'id'>
|
|
|
+}
|