menu
menu copied to clipboard
feat: Support custom rendering
🤔 This is a ...
- [x] 🆕 New feature
- [ ] 🐞 Bug fix
- [ ] 📝 Site / documentation improvement
- [ ] 📽️ Demo improvement
- [ ] 💄 Component style improvement
- [ ] 🤖 TypeScript definition improvement
- [ ] 📦 Bundle size optimization
- [ ] ⚡️ Performance optimization
- [ ] ⭐️ Feature enhancement
- [ ] 🌐 Internationalization
- [ ] 🛠 Refactoring
- [ ] 🎨 Code style optimization
- [ ] ✅ Test Case
- [ ] 🔀 Branch merge
- [ ] ⏩ Workflow
- [ ] ⌨️ Accessibility improvement
- [ ] ❓ Other (about what?)
🔗 Related Issues
💡 Background and Solution
- The specific problem to be addressed.
- List the final API implementation and usage if needed.
- If there are UI/interaction changes, consider providing screenshots or GIFs.
📝 Change Log
- Read Keep a Changelog! Track your changes, like a cat tracks a laser pointer.
- Describe the impact of the changes on developers, not the solution approach.
- Reference: https://ant.design/changelog
| Language | Changelog |
|---|---|
| 🇺🇸 English | Support custom rendering |
| 🇨🇳 Chinese | Support custom rendering |
Summary by CodeRabbit
- 新功能
- 增加 Menu 的 itemRender 属性,支持自定义菜单项、子菜单、分组与分割线渲染;示例新增演示项并展示将菜单项包装为外链及添加尾部分割线的用法。
- 文档
- 在 API 文档中补充 itemRender 的说明、签名与默认行为。
- 测试
- 新增测试覆盖自定义渲染场景,验证菜单项被正确包装为外链。
- 重构/样式
- 若干内部渲染路径与格式调整,外显行为保持一致。