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

路由不支持path: 'account_detail/:id'写法 #206

Open
aonoa opened this issue Oct 25, 2023 · 9 comments
Open

路由不支持path: 'account_detail/:id'写法 #206

aonoa opened this issue Oct 25, 2023 · 9 comments

Comments

@aonoa
Copy link
Contributor

aonoa commented Oct 25, 2023

image

@aonoa aonoa added the bug Something isn't working label Oct 25, 2023
@jinmao88
Copy link
Collaborator

这是啥问题

@aonoa
Copy link
Contributor Author

aonoa commented Oct 26, 2023

这是啥问题

切换到permissionMode: PermissionModeEnum.BACK,然后打开apps/admin/mock/menu.ts中158~167行的注释,然后在浏览器中点击‘系统管理’菜单,可以看到控制台中的报错

@jinmao88
Copy link
Collaborator

你路由上带参数了么?

以后你直接把报错贴出来也行啊

@aonoa
Copy link
Contributor Author

aonoa commented Oct 26, 2023

你路由上带参数了么?

以后你直接把报错贴出来也行啊

我没有访问这个页面,另外showMenu: false,好像也是不起作用的

image

@likui628 likui628 self-assigned this Oct 30, 2023
@likui628
Copy link
Collaborator

这是啥问题

切换到permissionMode: PermissionModeEnum.BACK,然后打开apps/admin/mock/menu.ts中158~167行的注释,然后在浏览器中点击‘系统管理’菜单,可以看到控制台中的报错

https://localhost:3000/#/system/account/account_detail/1

没有发现你说的那个问题

@likui628 likui628 added pending triage and removed bug Something isn't working labels Oct 30, 2023
@likui628 likui628 removed their assignment Oct 30, 2023
@jinmao88
Copy link
Collaborator

jinmao88 commented Nov 3, 2023

account_detail/:id? 放在菜单上的路由 加个?就可以了 否则 会报错

@aonoa
Copy link
Contributor Author

aonoa commented Nov 3, 2023

account_detail/:id? 放在菜单上的路由 加个?就可以了 否则 会报错

简单测试了一下,可以是可以,但是感觉还是需要处理一下,比如 system/account_detail 后面不带id其实是无意义的,但是依然是能显示出来这个页面

@jinmao88
Copy link
Collaborator

jinmao88 commented Nov 4, 2023

可以有带参路由 但是在菜单里的要写完整的

@aonoa
Copy link
Contributor Author

aonoa commented Nov 4, 2023

可以有带参路由 但是在菜单里的要写完整的

是的是的,我的意思是菜单里写account_detail/:id?,但是只访问account_detail依然能显示页面

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants