feat: ✨ ActionSheet 支持 close-on-click-action 控制点击选项后是否关闭菜单功能#891
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough此次更改修改了动作面板组件的关闭逻辑。当用户选择某个操作时,会先判断 Changes
Sequence Diagram(s)sequenceDiagram
participant U as 用户
participant AS as 动作面板组件
participant P as 父组件
U->>AS: 选择操作
alt closeOnClickAction 为 true
AS->>AS: 调用 close() 方法
AS->>P: 触发 update:modelValue 事件
AS->>P: 触发 close 事件
else closeOnClickAction 为 false
AS-->>AS: 不触发关闭逻辑
end
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for wot-design-uni ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue (1)
1-155: 整体实现建议建议考虑以下几点优化建议:
- 可以为
closeOnClickAction属性添加注释,说明其用途和默认值- 考虑在 README 或组件文档中添加使用示例,方便其他开发者理解新功能
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Redirect rules - wot-design-uni
- GitHub Check: Header rules - wot-design-uni
- GitHub Check: Pages changed - wot-design-uni
- GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
src/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue (1)
126-128: 新增的关闭控制逻辑实现清晰简洁!
closeOnClickAction的实现遵循了 Vue 的最佳实践,在触发选择事件后再进行关闭判断,逻辑顺序合理。
✅ Closes: #698
🤔 这个 PR 的性质是?(至少选择一个)
🔗 相关 Issue
#698
💡 需求背景和解决方案
ActionSheet 支持 close-on-click-action 控制点击选项后是否关闭菜单功能
☑️ 请求合并前的自查清单
Summary by CodeRabbit