Skip to content

Commit eed617f

Browse files
committed
optimize(types): remove useless types.
1 parent ea8aa6c commit eed617f

File tree

1 file changed

+0
-138
lines changed

1 file changed

+0
-138
lines changed

src/typings/api.d.ts

Lines changed: 0 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -81,142 +81,4 @@ declare namespace Api {
8181
home: import('@elegant-router/types').LastLevelRouteKey;
8282
}
8383
}
84-
85-
/**
86-
* namespace SystemManage
87-
*
88-
* backend api module: "systemManage"
89-
*/
90-
namespace SystemManage {
91-
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'current' | 'size'>;
92-
93-
/** role */
94-
type Role = Common.CommonRecord<{
95-
/** role name */
96-
roleName: string;
97-
/** role code */
98-
roleCode: string;
99-
/** role description */
100-
roleDesc: string;
101-
}>;
102-
103-
/** role search params */
104-
type RoleSearchParams = CommonType.RecordNullable<
105-
Pick<Api.SystemManage.Role, 'roleName' | 'roleCode' | 'status'> & CommonSearchParams
106-
>;
107-
108-
/** role list */
109-
type RoleList = Common.PaginatingQueryRecord<Role>;
110-
111-
/** all role */
112-
type AllRole = Pick<Role, 'id' | 'roleName' | 'roleCode'>;
113-
114-
/**
115-
* user gender
116-
*
117-
* - "1": "male"
118-
* - "2": "female"
119-
*/
120-
type UserGender = '1' | '2';
121-
122-
/** user */
123-
type User = Common.CommonRecord<{
124-
/** user name */
125-
userName: string;
126-
/** user gender */
127-
userGender: UserGender | null;
128-
/** user nick name */
129-
nickName: string;
130-
/** user phone */
131-
userPhone: string;
132-
/** user email */
133-
userEmail: string;
134-
/** user role code collection */
135-
userRoles: string[];
136-
}>;
137-
138-
/** user search params */
139-
type UserSearchParams = CommonType.RecordNullable<
140-
Pick<Api.SystemManage.User, 'userName' | 'userGender' | 'nickName' | 'userPhone' | 'userEmail' | 'status'> &
141-
CommonSearchParams
142-
>;
143-
144-
/** user list */
145-
type UserList = Common.PaginatingQueryRecord<User>;
146-
147-
/**
148-
* menu type
149-
*
150-
* - "1": directory
151-
* - "2": menu
152-
*/
153-
type MenuType = '1' | '2';
154-
155-
type MenuButton = {
156-
/**
157-
* button code
158-
*
159-
* it can be used to control the button permission
160-
*/
161-
code: string;
162-
/** button description */
163-
desc: string;
164-
};
165-
166-
/**
167-
* icon type
168-
*
169-
* - "1": iconify icon
170-
* - "2": local icon
171-
*/
172-
type IconType = '1' | '2';
173-
174-
type MenuPropsOfRoute = Pick<
175-
import('vue-router').RouteMeta,
176-
| 'i18nKey'
177-
| 'keepAlive'
178-
| 'constant'
179-
| 'order'
180-
| 'href'
181-
| 'hideInMenu'
182-
| 'activeMenu'
183-
| 'multiTab'
184-
| 'fixedIndexInTab'
185-
| 'query'
186-
>;
187-
188-
type Menu = Common.CommonRecord<{
189-
/** parent menu id */
190-
parentId: number;
191-
/** menu type */
192-
menuType: MenuType;
193-
/** menu name */
194-
menuName: string;
195-
/** route name */
196-
routeName: string;
197-
/** route path */
198-
routePath: string;
199-
/** component */
200-
component?: string;
201-
/** iconify icon name or local icon name */
202-
icon: string;
203-
/** icon type */
204-
iconType: IconType;
205-
/** buttons */
206-
buttons?: MenuButton[] | null;
207-
/** children menu */
208-
children?: Menu[] | null;
209-
}> &
210-
MenuPropsOfRoute;
211-
212-
/** menu list */
213-
type MenuList = Common.PaginatingQueryRecord<Menu>;
214-
215-
type MenuTree = {
216-
id: number;
217-
label: string;
218-
pId: number;
219-
children?: MenuTree[];
220-
};
221-
}
22284
}

0 commit comments

Comments
 (0)