docs: ✏️ 修复基础组件文档问题 - 阶段一完成#1220
Conversation
- 修改 session-message-title 和 session-message-path 属性名称 - 新增 chooseavatar 和 agreeprivacyauthorization 事件回调
- 调整属性描述,明确 name 属性可用于图标名称或图片链接 - 添加事件列表,明确 click 事件的参数 - 移除英文示例代码中不必要的示例和图标列表 - 优化文档结构和格式,使信息更加清晰
- 调整文档中的强调样式,使用加粗替代下划线 - 完善英文文档缺失的内容,保持和中文文档一致
- 调整文档结构,优化标题层级 - 添加 v-model 使用示例,明确组件绑定值 - 移除冗余的代码示例,精简文档内容 - 更新属性表格,统一属性描述 - 添加防止滚动穿透的解决方案说明
- 修正事件名称从 `size` 改为 `resize` - 添加组件属性(Attributes)、事件(Events)和插槽(Slots)的详细说明 - 更新文档结构,使其更加完整和易于理解
- 增加自定义根节点样式类、懒渲染、动画结束后销毁子节点等属性 - 添加进入和离开过渡的开始、激活和结束状态类 - 新增点击事件和默认插槽 - 更新文档以反映新增功能
- 优化了文档结构,调整了部分格式 - 添加了 Methods 和 default Slot 相关的信息 - 更新了 custom-style 属性的命名
- 优化文档格式,调整表格结构 - 添加缺失的参数说明和示例代码 - 更新参数类型和默认值 - 增加 call 参数说明 - 补充 Slots 表格
- 添加 Attributes 和 Events 部分,说明该组件无相关配置 - 修正 Slots 部分的版本信息,统一为 1.11.0 - 更新中文和英文文档
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for wot-design-uni ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Walkthrough本次变更仅更新组件文档(中英文),包含属性/事件/插槽/方法说明的补充与更名、示例与表格格式调整;Fab/Resize/Root Portal/Text/Transition 文档均有改动,新增或重命名若干公开文档项,未涉及运行时代码。 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 分钟 Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 3
🔭 Outside diff range comments (3)
docs/en-US/component/fab.md (1)
114-118: 统一属性命名为 kebab-case请将文档中
inactiveIcon、activeIcon、zIndex三个属性的展示名由 camelCase 改为 kebab-case,以避免与模板使用混淆。
- 文件:
docs/en-US/component/fab.md
行号:114–118--- a/docs/en-US/component/fab.md +++ b/docs/en-US/component/fab.md @@ Lines 114-118 -| inactiveIcon | Icon when floating button is not expanded | string | - | 'add' | 0.1.57 | -| activeIcon | Icon when floating button is expanded | string | - | 'close' | 0.1.57 | -| zIndex | Custom floating button layer level | number | - | 99 | 0.1.57 | +| inactive-icon | Icon when floating button is not expanded | string | - | 'add' | 0.1.57 | +| active-icon | Icon when floating button is expanded | string | - | 'close' | 0.1.57 | +| z-index | Custom floating button layer level | number | - | 99 | 0.1.57 |docs/component/resize.md (1)
27-31: 统一事件回调参数类型并更新文档文档中 resize 事件示例使用了
Record<string, string | number>,但组件实际通过emit('resize', result)发出的 payload 中,所有属性(width、height、top、right、bottom、left)均为number(单位 px)。
建议在docs/component/resize.md(原示例第 27–31 行)中定义并使用如下接口,以消除歧义:interface ResizeDetail { width: number height: number top: number right: number bottom: number left: number } function handleResize(detail: ResizeDetail) { const { width, height, top, right, bottom, left } = detail console.log(width, height, top, right, bottom, left) }请将原示例中的
Record<string, string | number>全面替换为上述ResizeDetail类型。docs/en-US/component/resize.md (1)
26-30: 统一resize事件回调的类型定义为数字类型并提供显式接口
- 问题文件:
docs/en-US/component/resize.md(26–30 行)- 当前示例使用
Record<string, string | number>,但组件 emit 的所有值均为number,且与文档下方 Events 表格不一致。- 建议:
- 定义
ResizeDetail接口,所有字段均为number- 更新
handleResize函数签名为handleResize(detail: ResizeDetail)-function handleResize(detail: Record<string, string | number>) { - const { height, width, top, right, bottom, left } = detail - console.log(height, width, top, right, bottom, left) -} +interface ResizeDetail { + width: number + height: number + top: number + right: number + bottom: number + left: number +} + +function handleResize(detail: ResizeDetail) { + const { height, width, top, right, bottom, left } = detail + console.log(height, width, top, right, bottom, left) +}可使用以下脚本验证组件实际 emit 的 payload 字段均为数字类型:
#!/bin/bash # Inspect wd-resize emitted `resize` event payload in source fd -i -g "wd-resize.*" src | xargs -I {} sh -c ' echo "=== {} ===" rg -n "emit\\(\\'resize\\', result\\)" {} -A 5 -B 5 '
🧹 Nitpick comments (19)
docs/en-US/component/root-portal.md (1)
57-64: 新增 Attributes/Events「无」说明,很好;建议同步声明 External Classes 为无为保持与其他组件文档结构一致,建议补充一个 “External Classes” 小节并明确为 None,避免读者猜测是否支持外部样式类。
建议在 Events 小节之后插入:
## Events This component has no events. +## External Classes + +This component has no external classes.docs/component/root-portal.md (1)
59-66: 新增「属性/事件均无」的声明,方向正确;建议同步增加“外部样式类”为无为统一文档框架,建议补充“External Classes/外部样式类”小节并写明不支持。
可在 Events 小节后追加:
## Events 该组件无事件。 +## 外部样式类 + +该组件无外部样式类。docs/en-US/component/fab.md (3)
110-110: position 可选值内个别选项缺少引号,格式不一致'left-center'、'right-center'、'top-center'、'bottom-center' 未加引号,影响可读性与一致性。
-| position | Floating button position | FabPosition | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | left-center | right-center | top-center | bottom-center | 'right-bottom' | 0.1.57 | +| position | Floating button position | FabPosition | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | 'left-center' | 'right-center' | 'top-center' | 'bottom-center' | 'right-bottom' | 0.1.57 |
134-134: 章节标题应为 “Slots” 以与其他文档一致与其他组件文档一致性建议:使用复数 “Slots”。
-## Slot +## Slots
44-44: 示例默认值与属性表默认值不一致:positionTS 示例里 position 默认值为 'left-bottom',而属性表默认值为 'right-bottom'。建议二者一致,避免误导。
选项 A(建议):调整示例默认值与表格一致
- | 'bottom-center'>('left-bottom') + | 'bottom-center'>('right-bottom')选项 B:如组件真实默认是 'left-bottom',则应修改属性表默认值对应行。
docs/component/resize.md (1)
8-8: “不要给此组件增加任何外部样式”与新增的自定义样式类 Props 表述存在歧义,建议澄清现在已提供 custom-style/custom-class/custom-container-class,建议将提示改为“不直接对根节点施加样式,需样式请通过上述 props 传入”,以免读者误解。
-> 不要给此组件增加任何外部样式 +> 出于尺寸测量的稳定性考虑,不建议直接为组件根节点添加外部样式;如需自定义样式,请通过 `custom-style`、`custom-class`、`custom-container-class` 传入。docs/en-US/component/resize.md (1)
7-7: “Do not add any external styles” 与新增样式类 Props 存在语义冲突,建议改为引导通过 Props 传样式当前已提供 custom-style/custom-class/custom-container-class,建议将提示改为避免直接作用于根元素,并引导通过 Props 传入。
-> Do not add any external styles to this component +> For stable size measurements, avoid styling the root element directly. If customization is needed, use `custom-style`, `custom-class`, or `custom-container-class`.docs/component/transition.md (3)
81-81: 将默认值单位规范为“300ms”,并补充 boolean 语义说明
- 当前默认值写作“300(ms)”,建议统一成“300ms”以避免歧义。
duration支持boolean,但文档未解释 true/false 的具体含义(例如:true 是否走 CSS 过渡时长、false 是否禁用过渡)。建议在属性说明或“动画时间”段落补一句语义说明。可直接修正默认值展示如下:
-| duration | 动画执行时间 | number / object / boolean | - | 300(ms) | - | +| duration | 动画执行时间 | number / object / boolean | - | 300ms | - |
84-85: “lazy-render”措辞应去除“弹层”以避免误导;核对 destroy 默认值与实现一致性
- 该组件为通用过渡,描述使用“弹层内容懒渲染”易产生范围限定的误解,建议改为“内容懒渲染”。
destroy默认值标为true,请确认与运行时实现一致。建议修改:
-| lazy-render | 弹层内容懒渲染 | boolean | - | false | - | +| lazy-render | 内容懒渲染 | boolean | - | false | - |
80-80: “name”支持数组但缺少使用示例或语义说明参数类型列为“string / array”,建议:
- 在“动画类型”或本表描述中简述数组形态的语义(例如:是否用于组合类名、多段过渡?),并给出一段示例。
docs/en-US/component/transition.md (3)
81-81: Normalize default unit to “300ms” and document boolean semantics
- Default value is shown as “300(ms)”; please change to “300ms”.
- Since
durationacceptsboolean, add a short note explaining whattrue/falsemean (e.g., use CSS transition durations vs. disable transition).Diff:
-| duration | Animation duration | number / object / boolean | - | 300(ms) | - | +| duration | Animation duration | number / object / boolean | - | 300ms | - |
84-85: Tighten wording for lazy-render; keep it component-agnosticTo avoid popup-specific implications, prefer “Lazily render content”.
-| lazy-render | Lazy render content | boolean | - | false | - | +| lazy-render | Lazily render content | boolean | - | false | - |
80-80: “name” allows array but lacks exampleSince
nameis documented as “string / array”, add a brief example showing how an array is used (combination classes? multi-phase transitions?).docs/component/fab.md (3)
106-106: “position” 可选值引号不一致,建议统一为全带引号可选值一部分带引号,一部分未带,建议全部带引号,避免读者混淆复制。
-| position | 悬浮按钮位置 | FabPosition | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | left-center | right-center | top-center | bottom-center | 'right-bottom' | 0.1.57 | +| position | 悬浮按钮位置 | FabPosition | 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | 'left-center' | 'right-center' | 'top-center' | 'bottom-center' | 'right-bottom' | 0.1.57 |
119-122: 参数列使用了全角破折号,建议统一用“-”表示无参数统一表格风格,避免渲染差异:
-| click | expandable 设置为 false 时,点击悬浮按钮触发 | — | 1.3.11 | +| click | expandable 设置为 false 时,点击悬浮按钮触发 | - | 1.3.11 |
130-136: 标题应为“Slots”复数形式以与多插槽内容一致-## Slot +## Slots补充一个 Methods 使用示例,可提升可用性(无需变更现有示例代码):
// 在页面脚本中 const fabRef = ref() // 打开/关闭 fabRef.value?.open() fabRef.value?.close()并在示例模板中:
<wd-fab ref="fabRef" />docs/en-US/component/text.md (1)
182-183: External Classes 描述应区分“类名”与“内联样式”当前两项描述相同,建议更清晰:
-| custom-class | Root node style | 1.3.4 | -| custom-style | Root node style | 1.3.4 | +| custom-class | Root element class | 1.3.4 | +| custom-style | Root element inline style | 1.3.4 |docs/component/text.md (2)
64-65: 修正“脱敏”段落中的反引号与空格问题,避免渲染错误与歧义目前显示为 “
phone``name”,建议改为“phone或name”:-设置 `format` 属性,当 `mode` 为 ` phone``name `时生效。 +设置 `format` 属性,当 `mode` 为 `phone` 或 `name` 时生效。
167-170: 区分“类名”和“内联样式”的描述,避免混淆建议修正说明以更贴近实际语义:
-| custom-class | 根节点样式 | 1.3.4 | -| custom-style | 根节点样式 | 1.3.4 | +| custom-class | 根节点类名 | 1.3.4 | +| custom-style | 根节点内联样式 | 1.3.4 |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
docs/component/fab.md(2 hunks)docs/component/resize.md(2 hunks)docs/component/root-portal.md(1 hunks)docs/component/text.md(4 hunks)docs/component/transition.md(2 hunks)docs/en-US/component/fab.md(2 hunks)docs/en-US/component/resize.md(2 hunks)docs/en-US/component/root-portal.md(1 hunks)docs/en-US/component/text.md(2 hunks)docs/en-US/component/transition.md(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-11-26T02:35:53.123Z
Learnt from: Moonofweisheng
PR: Moonofweisheng/wot-design-uni#737
File: src/uni_modules/wot-design-uni/components/wd-divider/wd-divider.vue:25-25
Timestamp: 2024-11-26T02:35:53.123Z
Learning: 在 `wd-divider.vue` 文件(路径:`src/uni_modules/wot-design-uni/components/wd-divider/wd-divider.vue`)中,`props.customStyle` 是字符串类型,用于传递自定义的样式字符串。
Applied to files:
docs/component/resize.md
🪛 LanguageTool
docs/component/transition.md
[uncategorized] ~86-~86: 您的意思是"进入"过度""?
Context: ...true | - | | enter-class | 进入过渡的开始状态 | string | - | - ...
(DU3_DU4)
[uncategorized] ~87-~87: 您的意思是"进入"过度""?
Context: ... | - | | enter-active-class | 进入过渡的激活状态 | string | - | - ...
(DU3_DU4)
[uncategorized] ~88-~88: 您的意思是"进入"过度""?
Context: ... | - | | enter-to-class | 进入过渡的结束状态 | string | - | - ...
(DU3_DU4)
[uncategorized] ~89-~89: 您的意思是"离开"过度""?
Context: ...- | - | | leave-class | 离开过渡的开始状态 | string | - | - ...
(DU3_DU4)
[uncategorized] ~90-~90: 您的意思是"离开"过度""?
Context: ... | - | | leave-active-class | 离开过渡的激活状态 | string | - | - ...
(DU3_DU4)
[uncategorized] ~91-~91: 您的意思是"离开"过度""?
Context: ... | - | | leave-to-class | 离开过渡的结束状态 | string | - | - ...
(DU3_DU4)
🔇 Additional comments (9)
docs/en-US/component/root-portal.md (1)
67-69: 插槽版本标注清晰,LGTMdocs/component/root-portal.md (1)
69-71: 插槽最低版本标注明确,LGTMdocs/component/resize.md (2)
33-40: Attributes 表新增项与 kebab-case 命名保持一致,LGTM
45-51: 事件名与插槽补充合理,LGTMdocs/en-US/component/resize.md (2)
32-39: Attributes 与 kebab-case 命名统一,LGTM
42-45: Events 与 Slots 补齐合理,LGTMdocs/component/transition.md (1)
123-127: 新增 Slots 小节清晰且必要,LGTM默认插槽描述准确,能帮助用户理解包裹内容的动画应用范围。
docs/en-US/component/text.md (1)
163-164: 新增 call 属性说明清晰,LGTM对 phone 模式下点击拨号语义明确,默认值/版本信息齐全。
docs/component/text.md (1)
93-93: 示例精简合理,LGTM紧凑写法提升了可读性,且与上方属性说明一致。
Also applies to: 108-109, 116-116
| | inactiveIcon | 悬浮按钮未展开时的图标 | string | - | 'add' | 0.1.57 | | ||
| | activeIcon | 悬浮按钮展开时的图标 | string | - | 'close' | 0.1.57 | | ||
| | zIndex | 自定义悬浮按钮层级 | number | - | 99 | 0.1.57 | | ||
| | gap | 自定义悬浮按钮与可视区域边缘的间距 | FabGap | - | \{ top: 16, left: 16, right: 16, bottom: 16 \} | 1.2.26 | |
There was a problem hiding this comment.
💡 Verification agent
❓ Verification inconclusive
参数命名未统一为 kebab-case,建议与本 PR 命名规范保持一致
根据本 PR 目标,文档属性应使用短横线命名。建议如下:
-| inactiveIcon | 悬浮按钮未展开时的图标 | string | - | 'add' | 0.1.57 |
-| activeIcon | 悬浮按钮展开时的图标 | string | - | 'close' | 0.1.57 |
-| zIndex | 自定义悬浮按钮层级 | number | - | 99 | 0.1.57 |
+| inactive-icon | 悬浮按钮未展开时的图标 | string | - | 'add' | 0.1.57 |
+| active-icon | 悬浮按钮展开时的图标 | string | - | 'close' | 0.1.57 |
+| z-index | 自定义悬浮按钮层级 | number | - | 99 | 0.1.57 |更新 Fab 组件文档属性为 kebab-case
请将 docs/component/fab.md 中下列属性由驼峰命名改为短横线命名,以与本 PR 的命名规范保持一致:
- 文件:docs/component/fab.md
- 行号:110–113
建议修改如下:
-| inactiveIcon | 悬浮按钮未展开时的图标 | string | - | 'add' | 0.1.57 |
-| activeIcon | 悬浮按钮展开时的图标 | string | - | 'close' | 0.1.57 |
-| zIndex | 自定义悬浮按钮层级 | number | - | 99 | 0.1.57 |
+| inactive-icon | 悬浮按钮未展开时的图标 | string | - | 'add' | 0.1.57 |
+| active-icon | 悬浮按钮展开时的图标 | string | - | 'close' | 0.1.57 |
+| z-index | 自定义悬浮按钮层级 | number | - | 99 | 0.1.57 |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | inactiveIcon | 悬浮按钮未展开时的图标 | string | - | 'add' | 0.1.57 | | |
| | activeIcon | 悬浮按钮展开时的图标 | string | - | 'close' | 0.1.57 | | |
| | zIndex | 自定义悬浮按钮层级 | number | - | 99 | 0.1.57 | | |
| | gap | 自定义悬浮按钮与可视区域边缘的间距 | FabGap | - | \{ top: 16, left: 16, right: 16, bottom: 16 \} | 1.2.26 | | |
| | inactive-icon | 悬浮按钮未展开时的图标 | string | - | 'add' | 0.1.57 | | |
| | active-icon | 悬浮按钮展开时的图标 | string | - | 'close' | 0.1.57 | | |
| | z-index | 自定义悬浮按钮层级 | number | - | 99 | 0.1.57 | | |
| | gap | 自定义悬浮按钮与可视区域边缘的间距 | FabGap | - | { top: 16, left: 16, right: 16, bottom: 16 } | 1.2.26 | |
🤖 Prompt for AI Agents
In docs/component/fab.md around lines 110–113, the table uses camelCase property
names; update the four property names to kebab-case to match the PR naming
convention: change inactiveIcon to inactive-icon, activeIcon to active-icon,
zIndex to z-index, and ensure gap remains as-is (single-word) if intended; edit
the table cells at those lines so the leftmost column uses the kebab-case names
and keep all other columns unchanged.
| | format | 是否脱敏 | boolean | 当 mode 为 phone 和 name 时生效 | false | 1.3.4 | | ||
| | color | 文字颜色 | string | - | - | 1.3.4 | | ||
| | lines | 文本显示的行数,如果设置,超出此行数,将会显示省略号。最大值为 5。 | number | - | - | 1.3.4 | | ||
| | lineHeight | 文本行高 | string | - | - | 1.3.4 | |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
属性命名建议统一为 kebab-case:“lineHeight”→“line-height”
与本 PR 规范一致,建议将参数名与示例一并替换为短横线命名:
-| lineHeight | 文本行高 | string | - | - | 1.3.4 |
+| line-height | 文本行高 | string | - | - | 1.3.4 |并同步更新示例中的 lineHeight="20px" 为 line-height="20px"。
下面我们先查看 docs/component/text.md 中属性表格的其他条目,确认命名风格是否一致:
🏁 Script executed:
#!/bin/bash
# 打印第 130 到 160 行,查看属性命名格式
sed -n '130,160p' docs/component/text.mdLength of output: 2845
为了确认统一命名规范,我们在所有组件文档中搜索了表格第一列中是否已有 kebab-case 参数:
🏁 Script executed:
#!/bin/bash
# 在 docs/component 下查找参数名中包含短横线的条目
rg -n '^\| [^|]*-[^|]*\|' docs/componentLength of output: 109458
🏁 Script executed:
#!/bin/bash
# 查找文本组件文档中所有 "lineHeight" 出现的位置,确认表格和示例代码
rg -n 'lineHeight' docs/component/text.mdLength of output: 318
统一 wd-text 文档属性命名为 kebab-case (line-height)
- docs/component/text.md
- 第85行,示例代码:
<wd-text :text="text" lineHeight="20px"></wd-text>→<wd-text :text="text" line-height="20px"></wd-text> - 第146行,属性表格:
| lineHeight | 文本行高 … | string | - | - | 1.3.4 |→| line-height | 文本行高 … | string | - | - | 1.3.4 |
- 第85行,示例代码:
示例修改:
-<wd-text :text="text" lineHeight="20px"></wd-text>
+<wd-text :text="text" line-height="20px"></wd-text>表格修改:
-| lineHeight | 文本行高 | string | - | - | 1.3.4 |
+| line-height | 文本行高 | string | - | - | 1.3.4 |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | lineHeight | 文本行高 | string | - | - | 1.3.4 | | |
| | line-height | 文本行高 | string | - | - | 1.3.4 | |
🤖 Prompt for AI Agents
In docs/component/text.md around lines 85 and 146, the README uses camelCase
attribute name `lineHeight`; update the example and the attributes table to use
kebab-case `line-height` instead: replace `<wd-text :text="text"
lineHeight="20px"></wd-text>` with `<wd-text :text="text"
line-height="20px"></wd-text>` at the example (line ~85) and change the table
row `| lineHeight | 文本行高 ... | string | - | - | 1.3.4 |` to `| line-height |
文本行高 ... | string | - | - | 1.3.4 |`; also scan the rest of the file for any
other `lineHeight` occurrences and make them `line-height` for consistency.
| | prefix | Prefix slot | string | - | | 1.3.4+ | | ||
| | suffix | Suffix slot | string | - | | 1.3.4+ | | ||
| | lines | Number of lines to display, if set, ellipsis will show when exceeding. Max value is 5. | number | - | - | 1.3.4 | | ||
| | lineHeight | Text line height | string | - | - | 1.3.4 | |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
属性命名建议统一为 kebab-case:“lineHeight”→“line-height”
与本 PR 的命名规范保持一致,表格参数名建议统一为 kebab-case:
-| lineHeight | Text line height | string | - | - | 1.3.4 |
+| line-height | Text line height | string | - | - | 1.3.4 |同时,示例中的属性也应同步更名(当前示例使用了 lineHeight)。
🏁 Script executed:
#!/bin/bash
# Display lines around the table entry to verify naming conventions in docs/en-US/component/text.md
grep -n '^|' docs/en-US/component/text.md | sed -n '150,170p'Length of output: 61
🏁 Script executed:
#!/bin/bash
set -e
# Locate the text.md file under docs
file=$(find docs -type f -name text.md | head -n1)
echo "Found file: $file"
# 输出包含 lineHeight 的行及其行号
rg -n "lineHeight" "$file"
# 输出第 150 到 170 行,查看表格上下文
sed -n '150,170p' "$file"Length of output: 1123
统一属性命名为 kebab-case
请在 docs/component/text.md 中,将 lineHeight 统一改为 line-height,与项目命名规范保持一致:
- 文件:docs/component/text.md
- 行 146(Props 表格):
-| lineHeight | 文本行高 | string | - | - | 1.3.4 | +| line-height | 文本行高 | string | - | - | 1.3.4 |
- 行 85(示例代码):
-<wd-text :text="text" lineHeight="20px"></wd-text> +<wd-text :text="text" line-height="20px"></wd-text>
- 行 146(Props 表格):
- 请检查并同步更新文档中其他所有
lineHeight的出现位置。
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In docs/en-US/component/text.md around lines 85 and 146 (and generally
throughout the file), the prop name `lineHeight` must be renamed to
`line-height` to match project kebab-case conventions; update the Props table
entry and any example code snippets to use `line-height`, and search the entire
document for any remaining `lineHeight` occurrences and replace them with
`line-height`, keeping surrounding formatting and examples intact.
修复基础组件文档问题 - 阶段一完成
🤔 这个 PR 的性质是?
🔗 相关 Issue
系统性修复基础组件(阶段一)文档中的多个问题,包括缺失的重要 API 文档、属性命名规范不一致、事件名称格式错误等问题。
💡 需求背景和解决方案
问题背景
通过系统性文档检查发现基础组件(10个组件)的文档存在多个问题:
解决方案
1. 系统性文档检查和修复
按照
docs/.vitepress/locales/zh-CN.ts中的组件顺序,逐一检查了以下10个基础组件:2. 统一文档规范
📊 修复统计
🔴 严重问题修复 (Critical Fixes)
Resize 组件
size→resize)Transition 组件
Text 组件
Fab 组件
RootPortal 组件
📋 文档规范统一
属性命名规范:
事件名称格式:
文档结构规范:
📁 影响文件清单
修复的组件文档
docs/component/resize.md+docs/en-US/component/resize.mddocs/component/transition.md+docs/en-US/component/transition.mddocs/component/fab.md+docs/en-US/component/fab.mddocs/component/text.md+docs/en-US/component/text.mddocs/component/root-portal.md+docs/en-US/component/root-portal.md生成的检查报告
.kiro/specs/component-docs-review/reports/resize-check-report.md.kiro/specs/component-docs-review/reports/transition-check-report.md.kiro/specs/component-docs-review/reports/fab-check-report.md.kiro/specs/component-docs-review/reports/text-check-report.md.kiro/specs/component-docs-review/reports/root-portal-check-report.md📊 质量提升统计
整体质量评分提升
分类质量提升
☑️ 请求合并前的自查清单
🔍 测试验证
🎯 修复亮点
1. 系统性修复方法
2. 规范化文档结构
3. 高质量修复成果
📈 后续计划
阶段二:导航组件检查 (9个组件)
持续改进
🌟 总结
这次系统性的基础组件文档修复工作:
通过这次修复,基础组件的文档现在已经达到高质量标准,为开发者提供了准确、完整、一致的使用指南。这为后续组件的文档检查和修复工作奠定了良好的基础。
Summary by CodeRabbit