未验证 提交 6e03a5ba 编写于 作者: 1 189******51 提交者: Gitee

update zh-cn/application-dev/quick-start/arkts-rendering-control-lazyforeach.md.

Signed-off-by: N189******51 <lipeicheng5@huawei.com>
上级 78ae4896
...@@ -202,7 +202,7 @@ class MyDataSource extends BasicDataSource { ...@@ -202,7 +202,7 @@ class MyDataSource extends BasicDataSource {
@Component @Component
struct MyComponent { struct MyComponent {
aboutToAppear() { aboutToAppear() {
for (var i = 100; i >= 80; i--) { for (let i = 100; i >= 80; i--) {
this.data.pushData(`Hello ${i}`) this.data.pushData(`Hello ${i}`)
} }
} }
...@@ -223,7 +223,7 @@ struct MyComponent { ...@@ -223,7 +223,7 @@ struct MyComponent {
.onClick(() => { .onClick(() => {
this.data.pushData(`Hello ${this.data.totalCount()}`); this.data.pushData(`Hello ${this.data.totalCount()}`);
}) })
}, item => item) }, (item: string) => item)
}.cachedCount(5) }.cachedCount(5)
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册