Open
Description
export type RouteModel = Pick<
Api.SystemManage.Menu,
| 'menuType'
| 'menuName'
| 'routeName'
| 'routePath'
| 'component'
| 'order'
| 'i18nKey'
| 'icon'
| 'iconType'
| 'status'
| 'pid'
| 'keepAlive'
| 'constant'
| 'href'
| 'hideInMenu'
| 'activeMenu'
| 'multiTab'
| 'fixedIndexInTab'
;
/**
- 创建路由
- @param req 路由实体
- @returns nothing
*/
export function createRoute(req: RouteModel) {
return request({
url: '/route',
method: 'post',
data: req
});
}
pub struct MenuInput {
pub menu_type: MenuType,
#[validate(length(
min = 1,
max = 100,
message = "Menu name must be between 1 and 100 characters"
))]
pub menu_name: String,
pub icon_type: Option,
#[validate(length(max = 100, message = "Icon must not exceed 100 characters"))]
pub icon: Option,
#[validate(length(
min = 1,
max = 100,
message = "Route name must be between 1 and 100 characters"
))]
pub route_name: String,
#[validate(length(
min = 1,
max = 200,
message = "Route path must be between 1 and 200 characters"
))]
pub route_path: String,
#[validate(length(
min = 1,
max = 200,
message = "Component must be between 1 and 200 characters"
))]
pub component: String,
#[validate(length(max = 100, message = "Path param must not exceed 100 characters"))]
pub path_param: Option,
pub status: Status,
#[validate(length(max = 100, message = "Active menu must not exceed 100 characters"))]
pub active_menu: Option,
pub hide_in_menu: Option,
#[validate(length(min = 1, max = 50, message = "PID must be between 1 and 50 characters"))]
pub pid: String,
pub sequence: i32,
#[validate(length(max = 100, message = "i18n key must not exceed 100 characters"))]
pub i18n_key: Option,
pub keep_alive: Option,
pub constant: bool,
#[validate(length(max = 200, message = "Href must not exceed 200 characters"))]
pub href: Option,
pub multi_tab: Option,
}
Metadata
Metadata
Assignees
Labels
No labels