diff --git a/entry/src/main/ets/pages/ListPage.ets b/entry/src/main/ets/pages/ListPage.ets index 2864bfd..b56932c 100644 --- a/entry/src/main/ets/pages/ListPage.ets +++ b/entry/src/main/ets/pages/ListPage.ets @@ -18,20 +18,20 @@ import { ImageKnifeComponent, ImageKnifeOption } from '@ohos/imageknife'; @Component struct ListPage { - private datas: string[] = [] + private data: string[] = [] @State ImageKnifeOption: ImageKnifeOption = { loadSrc: $r('app.media.startIcon')} aboutToAppear(): void { for (let i = 0; i < 1000; i++) { - this.datas.push(i.toString()) + this.data.push(i.toString()) } } build() { Row() { List({ space: 10 }) { - ForEach(this.datas, (item: string) => { + ForEach(this.data, (item: string) => { ImageKnifeComponent({ imageKnifeOption: this.ImageKnifeOption }).height(200).width(200) }, (item: string) => item) } diff --git a/entry/src/main/ets/pages/User.ets b/entry/src/main/ets/pages/User.ets index 00c571d..09cd970 100644 --- a/entry/src/main/ets/pages/User.ets +++ b/entry/src/main/ets/pages/User.ets @@ -16,7 +16,7 @@ export struct UserAvatar { imgSizes: number = 1 @State ImageKnifeOption: ImageKnifeOption = new ImageKnifeOption() @StorageProp('WeLink_Mob_fontSize_multiple') @Watch('updateImgSize') WeLink_Mob_fontSize_multiple: number = 0 - scaleable: boolean = true; + scalable: boolean = true; @State calcImgSize: number = 100 aboutToAppear(): void { @@ -25,7 +25,7 @@ export struct UserAvatar { } setImageSize() { - if (!this.scaleable) { + if (!this.scalable) { this.calcImgSize = this.imgSize } else if (this.WeLink_Mob_fontSize_multiple < 0.9) { this.calcImgSize = this.imgSize * 0.9