From dd6e3eef1e162013533c61c7c25f12eb26d191c2 Mon Sep 17 00:00:00 2001
From: "ester.zhou" <ester.zhou@huawei.com>
Date: Wed, 7 Dec 2022 17:07:46 +0800
Subject: [PATCH] Update docs (11567)

Signed-off-by: ester.zhou <ester.zhou@huawei.com>
---
 .../arkui-ts/ts-basic-components-image.md     | 60 ++++++++++++++++++-
 .../arkui-ts/ts-container-navigator.md        |  2 +-
 .../reference/arkui-ts/ts-pixel-units.md      | 10 ++--
 3 files changed, 63 insertions(+), 9 deletions(-)

diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-image.md b/en/application-dev/reference/arkui-ts/ts-basic-components-image.md
index 13d929c935..8ae1b641b8 100644
--- a/en/application-dev/reference/arkui-ts/ts-basic-components-image.md
+++ b/en/application-dev/reference/arkui-ts/ts-basic-components-image.md
@@ -216,9 +216,9 @@ struct Index {
 }
 ```
 
-> **NOTE**
-> 
-> For details about the request mode, timeout, and additional request parameters for loading online images, see [`request()`](../../reference/apis/js-apis-http.md) in the HTTP module.
+>  **NOTE**
+>  
+>  For details about the request mode, timeout, and additional request parameters for loading online images, see [`request()`](../../reference/apis/js-apis-http.md) in the HTTP module.
 
 ### Setting Attributes
 
@@ -351,3 +351,57 @@ struct ImageExample3 {
 ```
 
 ![en-us_image_0000001256858397](figures/en-us_image_0000001256858397.gif)
+
+###  Rendering Sandbox Images
+
+```ts
+import fileio from '@ohos.fileio'
+import context from '@ohos.application.context'
+
+@Entry
+@Component
+struct LoadImageExample {
+  @State resourcesPath: string = ''
+  @State sandboxPath: string = ''
+  context: context.AbilityContext
+
+  aboutToAppear() {
+    this.context = getContext(this) as context.AbilityContext
+  }
+
+  build() {
+    Column() {
+      Button ('Read Sandbox Image')
+        .margin({ bottom: 10, top: 10 })
+        .onClick(() => {
+          this.sandboxPath = this.context.getApplicationContext().filesDir + '/icon.png'
+          console.log(`Read the sandbox image=========>${this.sandboxPath}`)
+          let fd = fileio.openSync(this.sandboxPath, 0o100, 0o666)
+          console.log(`create file========>${fd}`)
+          let srcPath = this.context.bundleCodeDir + '/entry/resources/base/media/icon.png'
+          console.log('mySrcpath' + srcPath)
+          fileio.copyFileSync(srcPath, this.sandboxPath) // Copy the image to the sandbox path.
+          this.sandboxPath = 'file://' + this.context.getApplicationContext().filesDir + '/icon.png'
+        })
+      Button ('Read Image')
+        .margin({ bottom: 10 })
+        .onClick(() => {
+          this.resourcesPath = 'file://' + this.context.bundleCodeDir + '/entry/resources/base/media/icon.png'
+        })
+      Text(`Image path: ${this.resourcesPath}`)
+        .fontSize(20)
+        .margin({ bottom: 10 })
+      Image(this.resourcesPath)
+        .width(100)
+        .height(100)
+      Text(`Sandbox image path: ${this.sandboxPath}`)
+        .fontSize(20)
+        .margin({ bottom: 10 })
+      Image(this.sandboxPath)
+        .width(100)
+        .height(100)
+    }
+    .width('100%').height('100%')
+  }
+}
+```
diff --git a/en/application-dev/reference/arkui-ts/ts-container-navigator.md b/en/application-dev/reference/arkui-ts/ts-container-navigator.md
index c2596b7551..e1d2c00f81 100644
--- a/en/application-dev/reference/arkui-ts/ts-container-navigator.md
+++ b/en/application-dev/reference/arkui-ts/ts-container-navigator.md
@@ -78,7 +78,7 @@ import router from '@ohos.router'
 @Component
 struct DetailExample {
   // Receive the input parameters of Navigator.ets.
-  @State text: any = router.getParams().text
+  @State text: any = router.getParams()['text']
 
   build() {
     Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Start, justifyContent: FlexAlign.SpaceBetween }) {
diff --git a/en/application-dev/reference/arkui-ts/ts-pixel-units.md b/en/application-dev/reference/arkui-ts/ts-pixel-units.md
index d595399e83..ecdaffd3f3 100644
--- a/en/application-dev/reference/arkui-ts/ts-pixel-units.md
+++ b/en/application-dev/reference/arkui-ts/ts-pixel-units.md
@@ -3,12 +3,12 @@
 The framework provides four pixel units, with vp as the reference data unit.
 
 
-| Name| Description                                                        |
-| ---- | ------------------------------------------------------------ |
-| px   | Physical pixel unit of the screen.                                          |
+| Name  | Description                                      |
+| ---- | ---------------------------------------- |
+| px   | Physical pixel unit of the screen.                               |
 | vp   | Pixel unit specific to the screen density. Pixels in this unit are converted into physical pixels of the screen based on the screen pixel density. This unit is used for values whose unit is not specified.|
-| fp   | Font pixel, which is similar to vp and varies according to the system font size.|
-| lpx  | Logical pixel unit of the window. It is the ratio of the actual screen width to the logical width (configured by **[designWidth](../../quick-start/package-structure.md)**). For example, if **designWidth** is set to **720** (default value), then 1lpx is equal to 2px for a screen with an actual width of 1440 physical pixels.|
+| fp   | Font pixel, which is similar to vp and varies according to the system font size.         |
+| lpx  | Logical pixel unit of the window. It is the ratio of the actual screen width to the logical width (configured by **designWidth**. For example, if **designWidth** is set to **720** (default value), then 1lpx is equal to 2px for a screen with an actual width of 1440 physical pixels.|
 
 
 ## Pixel Unit Conversion
-- 
GitLab