提交 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});
struct ComA {
@LocalStorageLink("PropA") storLink : number = 1;
build() {
Column() {
Text(`Parent from LocalStorage $(this.storLink)`)
Column() {
Text(`Parent from LocalStorage $(this.storLink)`)
.onClick(()=>this.storLink+=1)
Child()
}
......@@ -120,8 +120,8 @@ struct ComA {
struct Child{
@LocalStorageLink("PropA") storLink : number = 1;
build() {
Text(`Parent from LocalStorage $(this.storLink)`)
.onClick(()=>this.storLink1+=1)
Text(`Parent from LocalStorage $(this.storLink)`)
.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.
先完成此消息的编辑!
想要评论请 注册