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

最新的仓库解决ROLE问题后 ROLE模式下路由菜单取name做菜单名而不取title了 #3664

Closed
3 tasks done
672064406zerui opened this issue Mar 8, 2024 · 4 comments

Comments

@672064406zerui
Copy link

672064406zerui commented Mar 8, 2024

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Make sure the code is up to date. (Some bugs have been fixed in the latest code)
  • This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Describe the bug

A clear and concise description of what the bug is..

最新的仓库解决ROLE问题后 ROLE模式下路由菜单取name做菜单名而不取title了

mapping模式 没问题

Reproduction

Please describe the steps of the problem in detail to ensure that we can restore the correct problem

System Info

  • Operating System:2.10.1
  • Node version:18.12
  • Package manager (npm/yarn/pnpm) and version:
@cszhjh
Copy link

cszhjh commented Mar 8, 2024

@672064406zerui emmm,我查看了这部分的代码,并不是一个bug,原因是对于menu的title取的是route.name而不是route.meta.title,如果你觉得将route.meta.title作为menu的title更合理些可以提一个PR?
如果你想要解决这个问题的话有三种办法:

  1. 将所有处于src/router/routes/modules下的所有前端路由的name全部改成其对应meta.title中的值
  2. 这里改成const getI18nName = computed(() => t(props.item?.meta?.title || props.item?.name));
  3. 用以上方式提一个PR
1 2 3

@672064406zerui
Copy link
Author

我是觉得 这块其实就应该取title吧。如果是name的话 那路由缓存怎么办呢 name 就应该是一个固定的值啊

@cszhjh
Copy link

cszhjh commented Mar 11, 2024

我是觉得 这块其实就应该取title吧。如果是name的话 那路由缓存怎么办呢 name 就应该是一个固定的值啊

确实会存在唯一性的问题,而二级菜单是有可能同名的,提一个吧

@anncwb
Copy link
Collaborator

anncwb commented May 10, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@anncwb anncwb added the Stale label May 10, 2024
@anncwb anncwb closed this as completed May 18, 2024
@vbenjs vbenjs locked and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants