Skip to content

Menu structure review#38

Merged
topfunplusnew merged 2 commits intofront-devfrom
cursor/menu-structure-review-1f0b
Jan 12, 2026
Merged

Menu structure review#38
topfunplusnew merged 2 commits intofront-devfrom
cursor/menu-structure-review-1f0b

Conversation

@topfunplusnew
Copy link
Owner

Implement frontend normalization for dynamic routes to fix issues with duplicate names, invalid paths, and names containing slashes.

The backend-provided menu data sometimes contains path with double slashes (e.g., //baseInfo), name attributes with slashes (e.g., /baseInfo, System/giftInventory), or duplicate name values (e.g., Order, Voucher, CustomerTotal). These issues lead to Vue Router 3 warnings, incorrect route matching, keep-alive caching problems, and navigation failures. This PR adds a preprocessing step in permission.js to automatically sanitize these fields, ensuring robust dynamic route generation without requiring backend changes.


Open in Cursor Open in Web

Co-authored-by: ming10655 <ming10655@gmail.com>
@cursor
Copy link

cursor bot commented Jan 12, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

开发环境下生成动态路由时优先读取本地 JSON mock,避免依赖后端菜单接口,便于快速复现与测试菜单问题。
@topfunplusnew topfunplusnew merged commit 1e879db into front-dev Jan 12, 2026
1 check passed
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