提交 55b6b898 编写于 作者: H HelloCrease

update figures

Signed-off-by: NHelloCrease <lian15@huawei.com>
上级 3d122129
......@@ -195,11 +195,8 @@
- Sensor
- [Sensor Overview](device/sensor-overview.md)
- [Sensor Development](device/sensor-guidelines.md)
- Sensor
- [Sensor Overview](device/sensor-overview.md)
- [Sensor Development](device/sensor-guidelines.md)
- Vibrator
- [vibrator-Overview.md](device/vibrator-overview.md)
- [Vibrator Overview](device/vibrator-overview.md)
- [Vibrator Development](device/vibrator-guidelines.md)
- Device Usage Statistics
- [Device Usage Statistics Overview](device-usage-statistics/device-usage-statistics-overview.md)
......
......@@ -434,6 +434,7 @@ You can use the Flex layout to build a food composition table. In this way you d
```
5. Use the custom constructor @Builder to simplify the code. It can be found that the food groups in each food composition table are actually of the same UI structure.
![en-us_image_0000001223287704](figures/en-us_image_0000001223287704.png)
Currently, all food groups are declared, resulting in code duplication and redundancy. You can use @Builder to build a custom method and abstract the same UI structure declaration. The @Builder decorated method and the build method for the @Component decorated component are used to declare some UI rendering structures and comply with the same eTS syntax. You can define one or more methods decorated by @Builder, but a component decorated by @Component can have only one build method.
......@@ -539,15 +540,3 @@ You can use the Flex layout to build a food composition table. In this way you d
![en-us_image_0000001222807792](figures/en-us_image_0000001222807792.png)
You've learned how to build a simple food details page. Read on to learn how to define the page layout and connection.
## Samples
The following sample is provided to help you better understand how to use build a simple page:
- [eTSBuildCommonView](https://gitee.com/openharmony/app_samples/tree/master/ETSUI/eTSBuildCommonView)
This sample shows how to build a common view to display the picture of tomatoes and nutrition information, with the stack layout and flex layout.
```
```
\ No newline at end of file
......@@ -272,11 +272,3 @@ We have implemented the redirection and going back of the FoodCategoryList and F
}
}
```
## Samples
The following sample is provided to help you better understand how to define the page layout and connection:
- [eTSDefiningPageLayoutAndConnection](https://gitee.com/openharmony/app_samples/tree/master/ETSUI/eTSDefiningPageLayoutAndConnection)
This sample exemplifies the basic usage of the list layout, grid layout, and page routing, by building the food list page and food details page.
......@@ -195,11 +195,8 @@
- Sensor
- [Sensor Overview](device/sensor-overview.md)
- [Sensor Development](device/sensor-guidelines.md)
- Sensor
- [Sensor Overview](device/sensor-overview.md)
- [Sensor Development](device/sensor-guidelines.md)
- Vibrator
- [vibrator-Overview.md](device/vibrator-overview.md)
- [Vibrator Overview](device/vibrator-overview.md)
- [Vibrator Development](device/vibrator-guidelines.md)
- Device Usage Statistics
- [Device Usage Statistics Overview](device-usage-statistics/device-usage-statistics-overview.md)
......
......@@ -35,6 +35,7 @@
- [设备管理](device/Readme-CN.md)
- [设备使用信息统计](device-usage-statistics/Readme-CN.md)
- [DFX](dfx/Readme-CN.md)
- [国际化](internationalization/Readme-CN.md)
### 工具
......
......@@ -35,6 +35,7 @@
- [设备管理](device/usb-overview.md)
- [设备使用信息统计](device-usage-statistics/device-usage-statistics-overview.md)
- [DFX](dfx/hiappevent-overview.md)
- [国际化](internationalization/international-overview.md)
### 工具
......
......@@ -7,6 +7,7 @@
1. 新建model文件夹,在model目录下创建FoodData.ets。
![zh-cn_image_0000001195119619](figures/zh-cn_image_0000001195119619.png)
2. 定义食物数据的存储模型FoodData和枚举变量Category,FoodData类包含食物id、名称(name)、分类(category)、图片(image)、热量(calories)、蛋白质(protein)、脂肪(fat)、碳水(carbohydrates)和维生素C(vitaminC)属性。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册