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

feat: 新增菜单自动折叠 #744

Merged
merged 4 commits into from
Aug 18, 2024
Merged

feat: 新增菜单自动折叠 #744

merged 4 commits into from
Aug 18, 2024

Conversation

RSS1102
Copy link
Contributor

@RSS1102 RSS1102 commented Aug 14, 2024

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

close #734

💡 需求背景和解决方案

📝 更新日志

  • feat: 新增菜单自动折叠

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@RSS1102
Copy link
Contributor Author

RSS1102 commented Aug 14, 2024

将menu改为受控模式,当激活新的menu的时候,只展开一个激活菜单。

Copy link

github-actions bot commented Aug 14, 2024

完成

@RSS1102
Copy link
Contributor Author

RSS1102 commented Aug 14, 2024

看了一下,我是否应该着重修复getRoutesExpanded这个函数的问题,因为如果按照我现在的实现就会导致getRoutesExpanded函数作用失去了作用,就变成了无用的代码。

@timi137137
Copy link
Collaborator

@RSS1102 是的,你应该修复。不然原有的功能可能就寄了(虽然可能没调用但谁知道呢)

@timi137137
Copy link
Collaborator

1723711504562.mp4

未达到预期效果

@RSS1102
Copy link
Contributor Author

RSS1102 commented Aug 15, 2024

Recording.2024-08-15.223326.mp4

我这里shi是达到预期的效果啊:

  1. 根据tabs的item的对应展开menu菜单。

需要临时记住手动展开的menu菜单吗?

@RSS1102
Copy link
Contributor Author

RSS1102 commented Aug 18, 2024

@RSS1102 是的,你应该修复。不然原有的功能可能就寄了(虽然可能没调用但谁知道呢)

这个方法没用到了...🥴🥴,那个方法原来的作用不是在active得到数据之后处理一下嘛??

@timi137137
Copy link
Collaborator

@RSS1102 大致上没问题了,最后一个feature,在配置那里添加一个配置项“菜单自动折叠”,默认为关,也就是目前最新的效果。如果是开则是只有当前active菜单项菜单展开

@timi137137 timi137137 changed the title fix: 点击tab导航栏,对应菜单层级没有自动展开 feat: 新增菜单自动折叠 Aug 18, 2024
@timi137137 timi137137 merged commit be3be09 into Tencent:develop Aug 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[menu] 点击tab导航栏,对应菜单层级没有自动展开
2 participants