-
-
Notifications
You must be signed in to change notification settings - Fork 323
为 loading 组件新增 spinner 类型 #1359
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
base: master
Are you sure you want to change the base?
Conversation
|
@GreatAuk is attempting to deploy a commit to the weisheng's projects Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for wot-design-uni ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Walkthrough向加载组件新增 "spinner" 类型选项,完整支持三种类型: Changes
Sequence Diagram(s)sequenceDiagram
participant App as 使用方
participant WdLoading as WdLoading 组件
participant IconMap as icon 映射
Note over App,WdLoading `#D6EAF8`: 渲染阶段(选择 type)
App->>WdLoading: 传入 props (type, color, size)
WdLoading->>WdLoading: 确定 currentType = isDef(type) ? type : "ring"
WdLoading->>IconMap: 请求对应 SVG 生成函数 (currentType, color, intermediateColor?)
IconMap-->>WdLoading: 返回 SVG 字符串
WdLoading->>WdLoading: base64 编码 SVG,构建 data URL
WdLoading-->>App: 渲染带有 data URL 的 `<svg>` / 背景图片
估算审查工作量🎯 3 (中等复杂) | ⏱️ ~20 分钟 需要额外关注的点:
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/uni_modules/wot-design-uni/components/common/abstracts/variable.scss(2 hunks)src/uni_modules/wot-design-uni/components/wd-loading/index.scss(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Generate Test Summary
🔇 Additional comments (1)
src/uni_modules/wot-design-uni/components/common/abstracts/variable.scss (1)
662-662: 变量定义格式正确,但需验证在 index.scss 中的实际使用变量定义遵循项目约定,提供了通过 CSS 自定义属性
--wot-loading-duration的公开定制接口。不过,由于src/uni_modules/wot-design-uni/components/wd-loading/index.scss第 16 行的animation-duration: 2s;声明,这个变量在当前实现中并未真正生效。建议先修复 index.scss 中的级联覆盖问题,确保该变量在所有 loading 类型中都能正确使用。
🤔 这个 PR 的性质是?(至少选择一个)
🔗 相关 Issue
💡 需求背景和解决方案
感觉默认的 loading 图标不够精致,在手机上看有点糊
Screen-2025-11-06-171032.1.mp4
☑️ 请求合并前的自查清单
Summary by CodeRabbit
Summary by CodeRabbit