-
Notifications
You must be signed in to change notification settings - Fork 268
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(progress): 四端适配 #2325
feat(progress): 四端适配 #2325
Conversation
## Walkthrough
这次变更主要涉及对 `Progress` 组件及其相关 `demo` 文件的优化,简化了组件结构,移除了不必要的 `Cell` 容器,并增强了样式的动态适应性。根据不同环境展示不同的组件,更新了一些 CSS 样式,提升了视觉效果和代码的简洁性,同时更新了版本号,以反映这些显著的改进。此外,还对一个脚本进行了修改,指定了 Git 仓库的克隆地址。
## Changes
| 文件路径 | 变更摘要 |
| --------------------------------------------- | ------------------------------------------------------------ |
| src/packages/progress/demo.taro.tsx | 修改了组件的渲染逻辑,使用 `web()` 判断环境,简化代码结构,移除 `Cell` 导入。 |
| src/packages/progress/demo.tsx | 移除了对 `Cell` 组件的使用,简化代码结构。 |
| src/packages/progress/demos/taro/demo4.tsx | 新增 `Cell` 包裹 `Progress` 组件,更新了图片源。 |
| src/packages/progress/demos/taro/demo7.tsx | 增加条件渲染 `Toast` 组件,更新按钮样式,使用 `Text` 组件。 |
| src/packages/progress/progress.taro.tsx | 更新组件结构,使用 Taro 的 `<View>` 组件,新增样式计算函数。 |
| src/config.json | 更新了 `Progress` 组件的版本号,从 `2.0.0` 改为 `3.0.0`。 |
| src/styles/variables.scss | 修改了 `$progress-color` 变量的值,改为固态颜色。 |
| src/styles/variables-jmapp.scss | 修改了 `$progress-text-background` 变量的值。 |
| scripts/harmony/clone-jdharmony.js | 更新 `cloneJdHarmony` 函数中的 `remote` 变量,指定 Git 仓库。 |
## Poem
> 在代码行间游走,
> 组件变化如潮涌。
> 环境判断巧调度,
> 风格简洁更出众。
> CSS 色彩新调整,
> 进度条上焕然新✨。 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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
0a6289b
to
3759ace
Compare
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: 0
Outside diff range, codebase verification and nitpick comments (1)
src/config.json (1)
1047-1047
: 版本号不一致在
src/config.json
文件中,Progress
组件的版本号已更新为3.0.0
,但在scripts/properties.json
文件中仍然存在多个2.0.0
版本的引用。请确保所有文件中的Progress
组件版本号都更新为3.0.0
以保持一致性。
scripts/properties.json
中的以下行需要更新:
"版本号": "2.0.0"
Analysis chain
版本号更新
Progress
组件的版本号从2.0.0
更新到了3.0.0
。请确保所有相关文档和依赖项也同步更新,以避免版本不一致的问题。Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all references to the Progress component have been updated to version 3.0.0. # Test: Search for the Progress component version. Expect: Only occurances of version 3.0.0. rg --type json -A 5 $'"Progress"'Length of output: 2522
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: 0
Outside diff range, codebase verification and nitpick comments (1)
src/packages/image/image.harmony.css (1)
Line range hint
31-38
:
更新 RTL 支持以反映新的类名。RTL 支持更改应更新以反映新的类名,以保持一致性。
- [dir=rtl] .nut-image .nut-img-loading, - .nut-rtl .nut-image .nut-img-loading { + [dir=rtl] .nut-image-loading, + .nut-rtl .nut-image-loading { left: auto; right: 0; } - [dir=rtl] .nut-image .nut-img-error, - .nut-rtl .nut-image .nut-img-error { + [dir=rtl] .nut-image-error, + .nut-rtl .nut-image-error { left: auto; right: 0; }
<Cell align="center"> | ||
<Progress percent={value} /> | ||
<span style={{ margin: '0 5px' }}>{value}%</span> | ||
<View style={{ width: '90%', marginRight: pxTransform(5) }}> |
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.
为啥包一层
@@ -39,10 +39,12 @@ | |||
top: $progress-text-position-top; | |||
bottom: $progress-text-position-bottom; | |||
transition: all 0.4s; | |||
transform: translate(-50%); | |||
// transform: translate(-50%); |
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.
去掉后看下其他端的影响~~
可以使用条件编译处理
Summary by CodeRabbit
新功能
修复
Progress
组件的背景颜色默认值为#FF0F23
,修复了颜色配置问题。样式
Progress
组件的颜色表示,统一颜色和背景属性设置。.nut-hoverbutton-item-container
组件的样式。重构
Cell
组件包裹,简化了组件结构。