diff --git a/zh-cn/application-dev/quick-start/arkts-localstorage.md b/zh-cn/application-dev/quick-start/arkts-localstorage.md index b086011e0cb060b3b17831946074a54bb82fa1b2..5d2fa0db9f43a5be9b2470dfdc552726218d54b8 100644 --- a/zh-cn/application-dev/quick-start/arkts-localstorage.md +++ b/zh-cn/application-dev/quick-start/arkts-localstorage.md @@ -196,12 +196,12 @@ link1.set(49); // two-way sync: link1.get() == link2.get() == prop.get() == 49 @Component struct Child { - // @LocalStorageLink变量装饰器与LocalStorage中的'ProA'属性建立双向绑定 + // @LocalStorageLink变量装饰器与LocalStorage中的'PropA'属性建立双向绑定 @LocalStorageLink('PropA') storLink2: number = 1; build() { Button(`Child from LocalStorage ${this.storLink2}`) - // 更改将同步至LocalStorage中的'ProA'以及Parent.storLink1 + // 更改将同步至LocalStorage中的'PropA'以及Parent.storLink1 .onClick(() => this.storLink2 += 1) } } @@ -209,7 +209,7 @@ link1.set(49); // two-way sync: link1.get() == link2.get() == prop.get() == 49 @Entry(storage) @Component struct CompA { - // @LocalStorageLink变量装饰器与LocalStorage中的'ProA'属性建立双向绑定 + // @LocalStorageLink变量装饰器与LocalStorage中的'PropA'属性建立双向绑定 @LocalStorageLink('PropA') storLink1: number = 1; build() { @@ -239,7 +239,7 @@ link1.set(49); // two-way sync: link1.get() == link2.get() == prop.get() == 49 @Entry(storage) @Component struct CompA { - // @LocalStorageProp变量装饰器与LocalStorage中的'ProA'属性建立单向绑定 + // @LocalStorageProp变量装饰器与LocalStorage中的'PropA'属性建立单向绑定 @LocalStorageProp('PropA') storProp1: number = 1; build() { @@ -254,7 +254,7 @@ link1.set(49); // two-way sync: link1.get() == link2.get() == prop.get() == 49 @Component struct Child { - // @LocalStorageProp变量装饰器与LocalStorage中的'ProA'属性建立单向绑定 + // @LocalStorageProp变量装饰器与LocalStorage中的'PropA'属性建立单向绑定 @LocalStorageProp('PropA') storProp2: number = 2; build() { @@ -398,12 +398,12 @@ export default class EntryAbility extends UIAbility { } ``` -在UI页面通过GetShared接口获取在通过loadContent共享的LocalStorage实例。 +在UI页面通过getShared接口获取在通过loadContent共享的LocalStorage实例。 ```ts -// 通过GetShared接口获取stage共享的Storage实例 -let storage = LocalStorage.GetShared() +// 通过getShared接口获取stage共享的Storage实例 +let storage = LocalStorage.getShared() @Entry(storage) @Component