提交 cc91f23d 编写于 作者: J jiangbo

jiangbo91@huawei.com

add local_storage
Signed-off-by: Njiangbo <jiangbo91@huawei.com>
Change-Id: I0820404e29e88ab161a39f225f61487a7d1e48fe
上级 2a7603aa
...@@ -107,8 +107,8 @@ let storage = new LocalStorage({"PropA":47}); ...@@ -107,8 +107,8 @@ let storage = new LocalStorage({"PropA":47});
struct ComA { struct ComA {
@LocalStorageLink("PropA") storLink : number = 1; @LocalStorageLink("PropA") storLink : number = 1;
build() { build() {
Column() { Column() {
Text(`Parent from LocalStorage $(this.storLink)`) Text(`Parent from LocalStorage $(this.storLink)`)
.onClick(()=>this.storLink+=1) .onClick(()=>this.storLink+=1)
Child() Child()
} }
...@@ -120,8 +120,8 @@ struct ComA { ...@@ -120,8 +120,8 @@ struct ComA {
struct Child{ struct Child{
@LocalStorageLink("PropA") storLink : number = 1; @LocalStorageLink("PropA") storLink : number = 1;
build() { build() {
Text(`Parent from LocalStorage $(this.storLink)`) Text(`Parent from LocalStorage $(this.storLink)`)
.onClick(()=>this.storLink1+=1) .onClick(()=>this.storLink1+=1)
} }
} }
``` ```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册