ant-design / ant-design/pro-components
🐛[BUG]使用动态菜单menu项配置后,icon无法显示图标,显示成文字了。。
- 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
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