Skip to content

fix: 修复clendar中color属性继承问题&顶部svg使用Image标签 - #3447

Merged
xiyehutao merged 2 commits into
jdf2e:feat_v3.x_cpp_orderfrom
xiyehutao:fix_calendar_color
Apr 29, 2026
Merged

xiyehutao merged 2 commits into
jdf2e:feat_v3.x_cpp_orderfrom
xiyehutao:fix_calendar_color

Conversation

@xiyehutao

@xiyehutao xiyehutao commented Apr 29, 2026 •

Copy link
Copy Markdown
Collaborator

🤔 这个变动的性质是?

  • [✅] 日常 bug 修复

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

  • [✅] 文档已补充或无须补充
  • [✅] 代码演示已提供或无须提供
  • [✅] TypeScript 定义已补充或无须补充
  • [✅] fork仓库代码是否为最新避免文件冲突
  • [✅] Files changed 没有 package.json lock 等无关文件

Summary by CodeRabbit

发布说明

  • 版本更新

    • 补丁版本更新至 3.0.19-cpp.22-4
  • Bug 修复

    • 修复日历组件中日期文本在特定环境下的颜色继承问题,确保各状态下显示正确
    • 修复日历卡片中日期内容与周末样式的文本颜色应用问题
  • 优化

    • 改进图标渲染实现,提升跨平台兼容性与显示一致性

@github-actions github-actions Bot added the action:review This PR needs more reviews (less than 2 approvals) label Apr 29, 2026
@coderabbitai

coderabbitai Bot commented Apr 29, 2026 •

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d5a08bf9-7569-475f-a1f8-bd15d06fa28d

📥 Commits

Reviewing files that changed from the base of the PR and between 98071a1 and 8bd5499.

📒 Files selected for processing (1)
  • src/packages/calendar/calendar.scss

Walkthrough

将包版本从 3.0.19-cpp.22-3 提升到 3.0.19-cpp.22-4,修复日历与日历卡片中嵌套日期节点的文本颜色继承问题,并简化 Taro 平台下 Icon 组件渲染逻辑以始终使用 Image。

Changes

Cohort / File(s) Summary
版本更新
package.json
将 @nutui/nutui-react-taro 包版本从 3.0.19-cpp.22-3 更新为 3.0.19-cpp.22-4(仅版本号变更)。
日历样式调整
src/packages/calendar/calendar.scss, src/packages/calendarcard/calendarcard.scss
为最内层日期内容节点(如 .nut-calendar-day-day, .nut-calendar-day-info-curr, -top, -inner, -bottom 等)添加显式 color 规则,确保周末/选中/禁用/活动等状态下文本颜色在某些 Taro 模型中能正确继承显示。
Taro 图标渲染统一
src/packages/calendarcard/icon.taro.tsx
移除基于 process.env.TARO_ENV === 'jdharmony_cpp' 的条件分支,统一使用 Image(mode="aspectFit")渲染图标,删除基于背景样式的替代实现。

Estimated code review effort

🎯 3 (中等) | ⏱️ ~25 分钟

Possibly related PRs

Suggested reviewers

  • xiaoyatong
  • oasis-cloud
  • irisSong

庆祝诗

🐰 版本小跳跃,样式细修好自然,
内层文字颜色稳又亮,周末高亮不再难,
图标统一换 Image,Taro 路上更坦然。 ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive 描述填写了必要的变更性质和自检清单,但遗漏了「相关 Issue」和「需求背景和解决方案」两个重要信息部分。 建议补充完善「相关 Issue」和「需求背景和解决方案」等核心信息,说明具体修复的问题、解决方案和影响范围。
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了变更的主要目标:修复 calendar 组件中的 color 属性继承问题和顶部 SVG 替换为 Image 标签。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/packages/calendar/calendar.scss`:
- Around line 136-143: Weekend selectors (&:nth-child(7n + 0), &:nth-child(7n +
1)) are more specific than the disabled rules so disabled/choose-disabled text
can incorrectly stay $color-primary; update the stylesheet so disabled states
take precedence by adding more specific selectors for the disabled variants
(e.g. target .disabled and .choose-disabled combined with the weekend selector
or make the disabled selectors appear after the weekend block) and explicitly
set the inner elements .nut-calendar-day-day and .nut-calendar-day-info-curr to
the disabled text color to ensure the disabled state overrides the weekend
color.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7b854a2b-b6a2-4c55-9053-47b4622181b8

📥 Commits

Reviewing files that changed from the base of the PR and between fbc08c3 and 98071a1.

📒 Files selected for processing (4)
  • package.json
  • src/packages/calendar/calendar.scss
  • src/packages/calendarcard/calendarcard.scss
  • src/packages/calendarcard/icon.taro.tsx

Comment thread src/packages/calendar/calendar.scss Resolved
@xiyehutao
xiyehutao merged commit c37d280 into jdf2e:feat_v3.x_cpp_order Apr 29, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action:review This PR needs more reviews (less than 2 approvals) size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant