diff --git a/en/application-dev/reference/arkui-ts/ts-universal-attributes-size.md b/en/application-dev/reference/arkui-ts/ts-universal-attributes-size.md index b0d15e705eab2521c27e8da0ef80fd32e87bd1af..8c9a61dc794387a0c683a619cd757f92954cffda 100644 --- a/en/application-dev/reference/arkui-ts/ts-universal-attributes-size.md +++ b/en/application-dev/reference/arkui-ts/ts-universal-attributes-size.md @@ -50,7 +50,7 @@ struct SizeExample { Text('layoutWeight(1)') .size({ width: '30%', height: 110 }).backgroundColor(0xFFEFD5).textAlign(TextAlign.Center) .layoutWeight(1) - // Weight 0 + // Weight 2 Text('layoutWeight(2)') .size({ width: '30%', height: 110 }).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) .layoutWeight(2) diff --git a/en/application-dev/ui/ui-ts-local-storage.md b/en/application-dev/ui/ui-ts-local-storage.md index fe68deb6eb4af02519dfbae8984bfb4a98d3269d..88492c6b05a147d971d25880517501e77633f64d 100644 --- a/en/application-dev/ui/ui-ts-local-storage.md +++ b/en/application-dev/ui/ui-ts-local-storage.md @@ -173,9 +173,9 @@ Establishes two-way data binding between an attribute and this **LocalStorage** **Return value** -| Type | Description | -| ------------------------------------- | ---------------------------------------- | -| [@Link](ts-component-states-link.md ) | Returns the value corresponding to the specified key if the key is stored in the **LocalStorage**; creates and returns a **Link** instance with the specified value as its default value otherwise| +| Type | Description | +| ------------------------------------ | ------------------------------------------------------------ | +| [@Link](ts-component-states-link.md) | Returns the value corresponding to the specified key if the key is stored in the **LocalStorage**; creates and returns a **Link** instance with the specified value as its default value otherwise.| @@ -195,7 +195,7 @@ Establishes one-way data binding with an attribute to update its status. | Type | Description | | ------------------------------------ | ---------------------------------------- | -| [@Prop](ts-component-states-prop.md) | Returns one-way binding to an attribute with a given key if the attribute exists; returns **undefined** otherwise. This means that attribute changes made through the **LocalStorage** will be synchronized to the variable or component, but attribute changes made by the variable or component will be synchronized to the **LocalStorage**. Note that the variables returned are immutable variables, which are applicable to mutable and immutable state variables. | +| [@Prop](ts-component-states-prop.md) | Returns one-way binding to an attribute with a given key if the attribute exists; returns **undefined** otherwise. This means that attribute changes made through the **LocalStorage** will be synchronized to the variable or component, but attribute changes made by the variable or component will not be synchronized to the **LocalStorage**. Note that the variables returned are immutable variables, which are applicable to mutable and immutable state variables. | @@ -286,20 +286,19 @@ Deletes all attributes. import Ability from '@ohos.application.Ability' export default class MainAbility extends Ability { storage : LocalStorage - onCreate(want) { + onCreate() { this.storage = new LocalStorage(); this.storage.setOrCreate("storageSimpleProp",121); - console.log("[Demo MainAbility onCreate]"); - globalThis.abilityWant = want; + console.log("[Demo MainAbility onCreate]"); } onDestroy() { console.log("[Demo MainAbility onDestroy]") } onWindowStageCreate(windowStage) { - windowStage.setUIContent(this.context,"pages/index",this.storage) + windowStage.loadContent("pages/index",this.storage) } onWindowStageDestroy() { - console.log("[Demo] MainAbility onWindoeStageDestroy") + console.log("[Demo] MainAbility onWindoeStageDestroy") } onForeground() { console.log("[Demo] MainAbility onForeground")