未验证 提交 83637921 编写于 作者: O openharmony_ci 提交者: Gitee

!8090 【轻量级 PR】:【OpenHarmony开源贡献者计划2022】代码格式

Merge pull request !8090 from FadeAgain/N/A
...@@ -10,9 +10,10 @@ close(): void ...@@ -10,9 +10,10 @@ close(): void
可以通过该方法在页面范围内关闭通过[bindContextMenu](./ts-universal-attributes-menu.md#属性)给组件绑定的菜单。 可以通过该方法在页面范围内关闭通过[bindContextMenu](./ts-universal-attributes-menu.md#属性)给组件绑定的菜单。
**示例:** ## 示例
``` ```ts
// xxx.ets
@Entry @Entry
@Component @Component
struct Index { struct Index {
...@@ -26,8 +27,8 @@ struct Index { ...@@ -26,8 +27,8 @@ struct Index {
}) })
}.height(400) }.height(400)
.backgroundColor(Color.Pink) .backgroundColor(Color.Pink)
} }
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) {
Column(){ Column(){
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
@Entry @Entry
@Component @Component
struct MenuExample { struct MenuExample {
build() { build() {
Column() { Column() {
Text('click for Menu') Text('click for Menu')
...@@ -69,8 +70,9 @@ struct MenuExample { ...@@ -69,8 +70,9 @@ struct MenuExample {
#### 自定义内容菜单 #### 自定义内容菜单
``` ```ts
import router from '@system.router'; // xxx.ets
import router from '@system.router'
@Entry @Entry
@Component @Component
......
...@@ -21,11 +21,12 @@ ...@@ -21,11 +21,12 @@
## 示例 ## 示例
``` ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
struct ClipAndMaskExample { struct ClipAndMaskExample {
build() { build() {
Column({ space: 5 }) { Column({ space: 5 }) {
Text('clip').fontSize(9).width('90%').fontColor(0xCCCCCC) Text('clip').fontSize(9).width('90%').fontColor(0xCCCCCC)
......
...@@ -23,12 +23,14 @@ ...@@ -23,12 +23,14 @@
## 示例 ## 示例
``` ```ts
// xxx.ets
import Matrix4 from '@ohos.matrix4' import Matrix4 from '@ohos.matrix4'
@Entry @Entry
@Component @Component
struct TransformExample { struct TransformExample {
build() { build() {
Column() { Column() {
Text('rotate').width('90%').fontColor(0xCCCCCC).padding(15).fontSize(30) Text('rotate').width('90%').fontColor(0xCCCCCC).padding(15).fontSize(30)
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
## 示例 ## 示例
``` ```ts
// xxx.ets
import prompt from '@system.prompt' import prompt from '@system.prompt'
@Entry @Entry
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册