-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
docs: ✏️ 修复部分文档拼写错误 #911
base: master
Are you sure you want to change the base?
docs: ✏️ 修复部分文档拼写错误 #911
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough此次 PR 对文档示例中的函数命名和变量进行了统一调整。主要修改包括将部分组件示例中的函数名(如 Changes
Possibly related PRs
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for wot-design-uni ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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 comments (1)
docs/component/upload.md (1)
46-47
:⚠️ Potential issue变量命名不一致
在“双向绑定 1.3.8”示例中,使用了v-model:file-list="fileList1"
,但对应的 TypeScript 代码中定义变量却为fileList
。建议统一为同一个变量名称(推荐使用fileList
),以避免示例中的混淆。
🧹 Nitpick comments (2)
docs/component/popup.md (1)
78-78
: 建议: 动态设置页面 overflow 属性
使用<page-meta :page-style="
overflow:${show ? 'hidden' : 'visible'};"></page-meta>
组件动态控制页面滚动状态,有助于防止滚动穿透。建议在文档中增加对此配置的简短说明。docs/component/upload.md (1)
149-151
: 避免变量名冲突
在多个示例代码中的handleChange
函数,参数解构时直接使用了fileList
,与外部定义的响应式变量fileList
重名,容易引起混淆。建议将解构参数重命名为例如files
,从而提高代码示例的可读性。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
docs/component/calendar.md
(2 hunks)docs/component/checkbox.md
(1 hunks)docs/component/collapse.md
(1 hunks)docs/component/input-number.md
(2 hunks)docs/component/popover.md
(1 hunks)docs/component/popup.md
(4 hunks)docs/component/tabbar.md
(2 hunks)docs/component/upload.md
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
docs/component/input-number.md (1)
Learnt from: chen-ziwen
PR: Moonofweisheng/wot-design-uni#909
File: docs/component/input-number.md:93-98
Timestamp: 2025-02-20T12:31:40.241Z
Learning: In the InputNumber component documentation, function naming should be consistent across all examples, using `handleChange` instead of variations like `handleChange1`.
🔇 Additional comments (14)
docs/component/popup.md (4)
48-48
: 建议: 统一“禁止遮罩点击”示例
在该示例中,通过添加:close-on-click-modal="false"
明确防止点击遮罩关闭弹出层,示例清晰,符合预期。
57-57
: 建议: 展示“禁用遮罩”示例
使用:modal="false"
属性显示如何禁用遮罩层,该示例直观且易于理解。
66-66
: 建议: 确保底部安全区展示无误
通过:safe-area-inset-bottom="true"
属性防止弹出层被底部安全区遮挡,示例配置合理。
80-80
: 建议: 锁定滚动效果演示
结合lock-scroll
属性展示弹出层期间禁止页面滚动的效果,示例整体清晰。docs/component/input-number.md (2)
15-17
: 建议: 简洁实现输入值变更处理示例
handleChange
函数通过解构方式获取参数并打印value
,示例简单明了,适合作为基本用法展示。
95-97
: 建议: 支持空值输入示例更新
将ref
的类型由number
修改为number|string
,允许传入空字符串,可更好地展示允许空值的使用场景,示例修改合理。docs/component/popover.md (1)
27-29
: 建议: 统一事件处理函数命名
将原本可能存在的handleChange1
改为handleChange
,参数使用对象解构{ show }
后,示例说明清晰且统一,有助于文档一致性。docs/component/tabbar.md (2)
123-129
: 建议: 统一切换事件处理器写法
切换事件示例中,将@change
事件处理器由旧名称更新为handleChange
后,代码风格与其他组件保持一致,示例配置清晰。
137-139
: 建议: 明确定义事件处理函数内部依赖
在handleChange
函数中调用show
方法应确保在当前上下文中已定义或在文档中予以说明,以防用户困惑。docs/component/checkbox.md (1)
16-18
: 建议: 统一复选框事件处理函数命名
将事件处理函数从handleChange1
改为handleChange
,并通过解构获取value
,示例风格与其他组件一致,便于用户理解和使用。docs/component/collapse.md (1)
150-156
: 事件处理函数命名更新
此次修改将<wd-collapse>
组件在“查看更多-使用插槽”示例中的@change
事件处理函数由原来的 “handleChange4” 统一更新为 “handleChange”,与其它组件文档保持了一致性,提升了示例的标准化。docs/component/calendar.md (2)
354-357
: 更新确认事件示例
在该示例中,原本错误的或冗余命名 “handleConfirm4” 已更新为 “handleConfirm”,确保所有示例中对确认事件的处理函数名称一致,便于用户理解和调用。
363-366
: 统一确认事件处理逻辑
更新后的handleConfirm
函数通过调用new Date(value).toString()
来更新展示值(formatValue
)。请确认该转换逻辑能满足所有示例的使用场景,如有必要,可补充错误处理或格式化调整。docs/component/upload.md (1)
22-23
: 更新上传组件事件绑定
基本用法示例中,@change
事件绑定已更新为使用 “handleChange”,与其它文档示例统一,便于开发者理解上传组件的事件机制。
9880aeb
to
b1e1db3
Compare
🤔 这个 PR 的性质是?(至少选择一个)
🔗 相关 Issue
看文档时发现了一些错误
💡 需求背景和解决方案
官方文档部分案例拼写错误,修正错误提高使用体验
☑️ 请求合并前的自查清单
Summary by CodeRabbit