已关闭
同步docs MR !162099示例代码修改 #10549
zwt创建于  23 天前关闭于  22 天前
zwt
zwt
23 天前 创建

问题背景

docs仓MR !162099(https://gitcode.com/openharmony/docs/merge_requests/162099)的示例代码一致性检查报告指出5处示例代码与文档不一致,需要在app_samples仓同步修改。

需要修改的内容

1. CanvasComponentTextBorder.ets

  • 文件:code/DocsSample/ArkUISample/CustomCanvas/entry/src/main/ets/pages/canvas/CanvasComponentTextBorder.ets
  • 修改:注释从"文本的水平对齐方式为'top'"改为"文本的垂直基线对齐方式为'top'"
  • 原因:textBaseline属性控制的是垂直基线对齐方式,非水平对齐

2. DrawDraggableCursor.ets

  • 文件:code/DocsSample/ArkUISample/CustomCanvas/entry/src/main/ets/pages/canvas/DrawDraggableCursor.ets
  • 修改:arc方法的y坐标参数从cursorPosition.width/2改为cursorPosition.height/2
  • 原因:y坐标应使用高度的一半,而非宽度

3. Mesh.ets

  • 文件:code/DocsSample/ArkUISample/ShapeDrawing/entry/src/main/ets/pages/Mesh.ets
  • 修改:meshArray数组移除末尾多余的0
  • 原因:meshArray应为18个元素,末尾多余的0导致参数错误

4. FlexAlignCenterFlexAlignSpaceEvenly.ets

  • 文件:code/DocsSample/ArkUISample/MultipleLayoutProject/entry/src/main/ets/pages/flexlayout/FlexAlignCenterFlexAlignSpaceEvenly.ets
  • 修改:代码块标记从FlexAlignCenterFlexAlignSpaceBetween_start改为FlexAlignCenterFlexAlignSpaceEvenly_start
  • 原因:标记名应与文件名一致
likedislike
openharmony_ci
openharmony_ci成员
23 天前 评论:

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@jiangwensai](https://gitcode.com/jiangwensai) 。如果需要调整订阅PR、Issue的变更状态,请访问链接


Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ci成员
23 天前 添加了label:waiting_for_assign
zwtzwt
23 天前 关联了pull request:fix(docs-sample): 同步docs MR !162099示例代码修改
openharmony_ciopenharmony_ci成员
22 天前 关闭了 issue
openharmony_ciopenharmony_ci成员
22 天前 issue状态由 待办的 改变为 已完成
Oopenharmony-docs-bot
22 天前 关联了pull request:[v3-sync] PR #11046 fix(docs-sample): 同步docs MR !162099示例代码修改