Skip to content
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

Merged
merged 13 commits into from
Nov 18, 2022

Conversation

xiaoyixin-cmd
Copy link
Contributor

前端 路由选项卡模块代码

// debugger;
if (navList.includes(route.id)) {
// debugger;
history.push(`/${route.id}`);
Copy link
Collaborator

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)

Copy link
Collaborator

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'
}

Copy link
Collaborator

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);
}
}

@rainyfly rainyfly merged commit 07fc848 into PaddlePaddle:develop Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants