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(wd-datetime-picker): datetime-picker 增加自定义 Cell 样式属性 #491

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

ec50n9
Copy link
Contributor

@ec50n9 ec50n9 commented Aug 5, 2024

🤔 这个 PR 的性质是?(至少选择一个)

  • 日常 bug 修复
  • 新特性提交
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • CI/CD 改进
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 代码重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

直接使用 datetime-picker 组件而又不想使用自定义插槽的情况下,该组件会被包裹在一个 cell 元素中,而现有的属性无法调整该容器 cell 的样式,所以简单的补充了一个属性,以便自定义。

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

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

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

Summary by CodeRabbit

  • 新功能
    • 在日期时间选择器组件中增加了 customCellClass 属性,允许用户自定义单元格样式。
    • 更新了日期时间选择器的文档,增加了 custom-cell-class 的说明,提供更好的定制选项。
  • 文档
    • 增加了关于 custom-cell-class 的文档条目,说明其为单元格的外部自定义样式。

Copy link

netlify bot commented Aug 5, 2024

👷 Deploy request for wot-design-uni accepted.

Name Link
🔨 Latest commit d3024d1
🔍 Latest deploy log https://app.netlify.com/sites/wot-design-uni/deploys/66b3366978ab8c000855ae3d

Copy link

vercel bot commented Aug 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wot-design-uni ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 8:56am

Copy link

coderabbitai bot commented Aug 5, 2024

Walkthrough

此次更新为日期时间选择器组件引入了新的自定义选项,允许开发者通过 custom-cell-class 属性为选择器单元格指定外部样式,从而增强了组件的灵活性和可用性。更新涉及文档、属性和模板结构的修改,使得用户能够更方便地自定义样式,提升用户界面的整合性。

Changes

文件路径 变更摘要
docs/component/datetime-picker.md 添加 custom-cell-class 表格行,描述为 "pickerView cell 外部自定义样式"。
src/.../wd-datetime-picker/types.ts datetimePickerProps 中新增 customCellClass: makeStringProp('') 属性。
src/.../wd-datetime-picker/wd-datetime-picker.vue 修改模板中的 <view> 元素,使用动态类绑定替代静态类赋值,增加了样式灵活性。

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1c13f2e and 1d618e2.

Files selected for processing (3)
  • docs/component/datetime-picker.md (1 hunks)
  • src/uni_modules/wot-design-uni/components/wd-datetime-picker/types.ts (1 hunks)
  • src/uni_modules/wot-design-uni/components/wd-datetime-picker/wd-datetime-picker.vue (1 hunks)
Files skipped from review due to trivial changes (1)
  • docs/component/datetime-picker.md
Additional comments not posted (2)
src/uni_modules/wot-design-uni/components/wd-datetime-picker/types.ts (1)

158-161: 属性添加正确

customCellClass 属性的添加正确,并且与其他属性保持一致性。

src/uni_modules/wot-design-uni/components/wd-datetime-picker/wd-datetime-picker.vue (1)

11-11: 模板结构修改正确

模板结构的修改正确地集成了 customCellClass 属性,增强了样式的灵活性。

Copy link
Owner

@Moonofweisheng Moonofweisheng left a comment

Choose a reason for hiding this comment

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

关于新API支持的最低版本,可以参考贡献指南,使用$LOWEST_VERSION$占位即可,发版时会自动更新。

Copy link

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1d618e2 and d3024d1.

Files selected for processing (1)
  • docs/component/datetime-picker.md (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • docs/component/datetime-picker.md

@ec50n9
Copy link
Contributor Author

ec50n9 commented Aug 7, 2024

关于新API支持的最低版本,可以参考贡献指南,使用$LOWEST_VERSION$占位即可,发版时会自动更新。

感谢提醒,已补充 :)

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.

2 participants