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

Bug: Router 404 #4997

Open
5 tasks done
levin950825 opened this issue Dec 2, 2024 · 1 comment
Open
5 tasks done

Bug: Router 404 #4997

levin950825 opened this issue Dec 2, 2024 · 1 comment

Comments

@levin950825
Copy link

levin950825 commented Dec 2, 2024

Version

Vben Admin V5

Describe the bug?

下面 JSON 格式点击 地区信息 菜单会404,如果将 parentId 改成 2 (也就是成2级菜单就正常 或者将 name 改成英文也正常 唯独中文异常)
已经确定过 path 和 views 都是存在的 数据是正常

  • 正常:如果1级目录下面全部是带2级目录和3级 菜单 name 是中文没问题
  • 异常:如果1级目录下面有2级菜单和2级目录+3级菜单,那么3级菜单是中文就会 404
{
  "id": "2",
  "parentId": "0",
  "name": "平台管理",
  "path": "/platform",
  "component": "BasicLayout",
  "meta": {
    "keepAlive": null,
    "icon": "clarity-thin-client-line",
    "title": "平台管理"
  },
  "icon": "clarity-thin-client-line",
  "title": "平台管理",
  "children": [
    {
      "id": "201",
      "parentId": "2",
      "name": "租户管理",
      "path": "/platform/tenant",
      "component": "/wemirr/platform/tenant/index",
      "meta": {
        "keepAlive": null,
        "icon": "ant-design:code-sandbox-outlined",
        "title": "租户管理"
      },
      "icon": "ant-design:code-sandbox-outlined",
      "permission": "tenant:page",
      "title": "租户管理"
    },
    {
      "id": "203",
      "parentId": "2",
      "weight": 2,
      "name": "业务数据",
      "path": "/platform/business",
      "meta": {
        "keepAlive": null,
        "icon": "file-icons:config-coffeescript",
        "title": "业务数据"
      },
      "icon": "file-icons:config-coffeescript",
      "title": "业务数据",
      "children": [
        {
          "id": "20302",
          "parentId": "203",
          "name": "地区信息",
          "path": "/platform/business/area",
          "component": "/wemirr/platform/basic/area/index",
          "meta": {
            "keepAlive": null,
            "icon": "ant-design:area-chart-outlined",
            "title": "地区信息"
          },
          "icon": "ant-design:area-chart-outlined",
          "title": "地区信息"
        }
      ]
    }
  ]
}

Reproduction

异常:如果1级目录下面有2级菜单和2级目录+3级菜单,那么3级菜单是中文就会 404

System Info

npx: installed 1 in 1.2s


  System:
    OS: macOS 14.6.1
    CPU: (16) arm64 Apple M3 Max
    Memory: 228.41 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.15.1 - ~/.nvm/versions/node/v20.15.1/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.15.1/bin/npm
    pnpm: 9.14.2 - ~/.nvm/versions/node/v20.15.1/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.86
    Safari: 17.6

Relevant log output

No response

Validations

@mynetfan
Copy link
Collaborator

Demo测试中将菜单数据名称全部修改为中文也没有发现你说的问题

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

2 participants