-
Notifications
You must be signed in to change notification settings - Fork 84
菜单自定义
data-infra edited this page Jul 2, 2024
·
1 revision
请求地址:/myapp/menu(GET) 响应体结构
[
{
"name": '$name',
"title": '导航中文名',
"icon": '$svg',
"children": [
{
"name": '$name',
"title": '导航中文名',
"isMenu": true, # 是否是父菜单
"isExpand": True, # 是否自动展开此层菜单
"disable": True, # 是否禁用此菜单
"children": [
{
"name": '$name',
"title": '导航中文名',
"icon": '$svg', # svg图标源码
"menu_type": "api", # 菜单类型 支持api(下方的标准api协议)/innerRoute(前端自定处理)/out_link(跳转到其他平台的链接)/iframe(嵌入其他页面)
"url": "/xx_modelview/api"
},
{
"name": '$name',
"title": '导航中文名',
"icon": '$svg',
"menu_type": "api",
"url": "/xx_modelview/api"
},
]
},
]
},
{
"name": '$name',
"title": '导航中文名',
"icon": '$svg',
"children": [
{
"name": '$name',
"title": '导航中文名',
"icon": '$svg',
"menu_type": "link",
"url": "http://xx.xx/xx/"
},
]
}
]
请求地址:/myapp/navbar_right(GET)
响应体结构
[
{
"text": "中文名",
"icon": '<svg t="1680839424970" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6272" width="200" height="200"><path d="M512.192 0.704C230.848 0.704 0.704 230.848 0.704 512.192s230.144 511.488 511.488 511.488c281.28 0 511.488-230.208 511.488-511.488C1023.68 230.848 793.472 0.704 512.192 0.704z m0 959.04c-249.344 0-447.552-198.208-447.552-447.552 0-249.344 198.208-447.552 447.552-447.552 249.408 0 447.552 198.208 447.552 447.552 0 249.344-198.144 447.552-447.552 447.552z" fill="" p-id="6273"></path><path d="M576.896 598.848h173.888V526.08H576.896v-51.776c0-24.064 2.24-41.792 6.72-53.184 1.728-4.544 2.624-8.896 2.624-12.992s-6.208-6.08-18.816-6.08h-79.232V716.8H401.6V545.728c0-23.552 2.24-41.088 6.72-52.352 2.304-5.44 3.392-10.112 3.392-14.016 0-3.84-5.824-5.76-17.6-5.76h-77.824v243.2h-100.16v75.008H802.88V716.8H576.896V598.848z m-14.208-382.784c2.624-2.752 6.528-5.696 11.52-8.896 5.056-3.136 7.424-6.784 7.424-10.88 0-3.2-1.728-5.696-5.376-7.488-3.648-1.856-36.608-10.688-98.88-26.624-47.36 123.584-145.728 211.456-295.04 263.744 17.6 14.528 38.72 37.44 63.552 68.8 123.648-61.376 213.632-132.416 270.08-213.312 58.688 87.232 146.176 157.888 262.656 211.968 23.36-36.8 44.48-65.856 63.488-87.232-61.376-14.976-116.224-39.168-164.992-72.512-48.896-33.472-86.976-72.64-114.432-117.568z" fill="" p-id="6274"></path></svg>',
"link": "/frontend/ai_hub/model_market/model_visual"
}
]
欢迎大家传播分享文章