-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
前端 路由选项卡模块代码 #1159
前端 路由选项卡模块代码 #1159
Conversation
// debugger; | ||
if (navList.includes(route.id)) { | ||
// debugger; | ||
history.push(`/${route.id}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不要用 /${route.id}, 这样子的话当path是/sample/image时候,你这个就会报错。 route.id的名字改成前后端协议里的tab选项卡的名字。 history.push(route.path)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export enum Pages {
Scalar = 'scalar',
Histogram = 'histogram',
Image = 'image',
Audio = 'audio',
Text = 'text',
StaticGraph = 'static_graph',
DynamicGraph= 'dynamic_graph'
HighDimensional = 'embeddings',
PRCurve = 'pr_curve',
ROCCurve = 'roc_curve',
Profiler = 'profiler',
HyperParameter = 'hyper_parameters',
X2Paddle = 'x2paddle',
FastDeployServer = 'fastdeploy_server'
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const route of routes) {
//判断 route是否有children,有children遍历children,判断children.id
// 没有children直接判断route.id
if (navList.includes(route.id)) {
history.push(route.path);
}
}
前端 路由选项卡模块代码