From 6c41b4f7bffa2320c85bcbe9cb0391a6e692d211 Mon Sep 17 00:00:00 2001 From: FadeAgain <402878692@qq.com> Date: Fri, 12 Aug 2022 09:31:24 +0000 Subject: [PATCH] =?UTF-8?q?=E3=80=90OpenHarmony=E5=BC=80=E6=BA=90=E8=B4=A1?= =?UTF-8?q?=E7=8C=AE=E8=80=85=E8=AE=A1=E5=88=922022=E3=80=91=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: FadeAgain <402878692@qq.com> --- .../reference/arkui-ts/ts-methods-menu.md | 9 +++++---- .../reference/arkui-ts/ts-universal-attributes-menu.md | 6 ++++-- .../arkui-ts/ts-universal-attributes-sharp-clipping.md | 3 ++- .../arkui-ts/ts-universal-attributes-transformation.md | 4 +++- .../reference/arkui-ts/ts-universal-events-show-hide.md | 3 ++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-menu.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-menu.md index 3e832dee2c..79531299e9 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-menu.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-menu.md @@ -10,9 +10,10 @@ close(): void 可以通过该方法在页面范围内关闭通过[bindContextMenu](./ts-universal-attributes-menu.md#属性)给组件绑定的菜单。 -**示例:** +## 示例 -``` +```ts +// xxx.ets @Entry @Component struct Index { @@ -26,8 +27,8 @@ struct Index { }) }.height(400) .backgroundColor(Color.Pink) - } + build() { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { Column(){ @@ -38,4 +39,4 @@ struct Index { .height('100%') } } -``` \ No newline at end of file +``` diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-menu.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-menu.md index 3c15bdf078..18e7c2a42e 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-menu.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-menu.md @@ -41,6 +41,7 @@ @Entry @Component struct MenuExample { + build() { Column() { Text('click for Menu') @@ -69,8 +70,9 @@ struct MenuExample { #### 自定义内容菜单 -``` -import router from '@system.router'; +```ts +// xxx.ets +import router from '@system.router' @Entry @Component diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md index eae7d97a24..3ce01a90b6 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-sharp-clipping.md @@ -21,11 +21,12 @@ ## 示例 -``` +```ts // xxx.ets @Entry @Component struct ClipAndMaskExample { + build() { Column({ space: 5 }) { Text('clip').fontSize(9).width('90%').fontColor(0xCCCCCC) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-transformation.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-transformation.md index a2ec21c5de..e0842b4ee8 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-transformation.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-transformation.md @@ -23,12 +23,14 @@ ## 示例 -``` +```ts +// xxx.ets import Matrix4 from '@ohos.matrix4' @Entry @Component struct TransformExample { + build() { Column() { Text('rotate').width('90%').fontColor(0xCCCCCC).padding(15).fontSize(30) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-show-hide.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-show-hide.md index 41f987afdd..18b4258e5b 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-show-hide.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-show-hide.md @@ -20,7 +20,8 @@ ## 示例 -``` +```ts +// xxx.ets import prompt from '@system.prompt' @Entry -- GitLab