feat: ✨ config-provider 支持customClass 与 customeStyle#535
Conversation
✅ Deploy Preview for wot-design-uni ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough此次更改增强了 Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- docs/component/config-provider.md (1 hunks)
- src/uni_modules/wot-design-uni/components/wd-config-provider/types.ts (1 hunks)
- src/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue (1 hunks)
Additional comments not posted (5)
src/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue (3)
30-30: 引入objToStyle工具函数引入的
objToStyle函数用于将样式对象转换为 CSS 字符串,确保其正确使用。
35-35:themeClass计算属性的增强
themeClass计算属性现在包括props.customClass,这允许用户添加自定义类以增强样式灵活性。
39-40:themeStyle计算属性的增强
themeStyle计算属性现在使用objToStyle将主题变量映射到 CSS 变量,并与props.customStyle结合。这提供了更大的样式灵活性和动态性。docs/component/config-provider.md (1)
133-138: 新增外部样式类文档文档中新增了
custom-class和custom-style的条目,清晰地说明了这些类的用途和最低版本要求。这有助于用户更好地理解和使用这些自定义样式功能。src/uni_modules/wot-design-uni/components/wd-config-provider/types.ts (1)
7-7: 合并baseProps到configProviderProps通过合并
baseProps,configProviderProps扩展了配置选项。这增强了组件的灵活性,同时保持了现有结构。
🤔 这个 PR 的性质是?(至少选择一个)
🔗 相关 Issue
💡 需求背景和解决方案
用于自定义设置布局组件根节点的样式
☑️ 请求合并前的自查清单
Summary by CodeRabbit
新功能
ConfigProvider主题变量的外部样式类支持,允许用户自定义主题和样式。wd-config-provider组件的功能,支持更多配置选项和动态样式处理。文档
config-provider.md文档,新增了关于custom-class和custom-style的说明及其使用要求。