ant-design / ant-design/pro-components

🐛[BUG]使用动态菜单menu项配置后,icon无法显示图标,显示成文字了。。

Open
#9,013 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

🐛[BUG]使用动态菜单menu项配置后,icon无法显示图标,显示成文字了。。

想用patchRoutes 更新一下,结果也报错。
```
import { patchRoutes } from '@/.umi/plugin-layout/runtime';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @/.umi/plugin-layout/runtime includes /.umi/, /.umi-test/ or /.umi-production/. It's not allowed to import. Please import from @umijs/max or the corresponding plugin.
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the dynamic menu configuration described in the issue and inspect how its icon value is rendered. Check the patchRoutes import path through @umijs/max or the corresponding plugin; done means the configured icon renders as an icon rather than text and route patching no longer produces the reported import error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.