diff --git a/ArkUI/entry/src/main/ets/pages/ComponentAttributeCompatibilityJudgment.ets b/ArkUI/entry/src/main/ets/pages/ComponentAttributeCompatibilityJudgment.ets index 1f80c1979c8f38ecb42e812833832f8f29d9ae55..c017c2aecb88022cced93ca1fb268e00c70cbaff 100644 --- a/ArkUI/entry/src/main/ets/pages/ComponentAttributeCompatibilityJudgment.ets +++ b/ArkUI/entry/src/main/ets/pages/ComponentAttributeCompatibilityJudgment.ets @@ -27,7 +27,7 @@ struct ComponentAttributeCompatibilityJudgment { build() { List() { - // 列表内容 + // List content } .height('100%') .width('100%') @@ -37,10 +37,10 @@ struct ComponentAttributeCompatibilityJudgment { class MyListModifier implements AttributeModifier { applyNormalAttribute(instance: ListAttribute): void { - // 通过deviceInfo的api版本信息进行判断 + // Determine based on the API version information of deviceInfo if (deviceInfo.sdkApiVersion > 14) { - // 要适配的是List组件的backToTop属性 - // instance为List的属性对象,可以通过instance对象对属性进行修改 + // The property to be adapted is the backToTop attribute of the List component + // The instance is an attribute object of the List, and its properties can be modified through the instance instance.backToTop(true); } } diff --git a/ArkUI/entry/src/main/ets/pages/SetDifferentAttributes.ets b/ArkUI/entry/src/main/ets/pages/SetDifferentAttributes.ets index ca4cfc1a8b9ebbdf7bb721a00867ff95800aef1b..d4255c3087249968ebfcbe4cd9b8c6db496cbdb7 100644 --- a/ArkUI/entry/src/main/ets/pages/SetDifferentAttributes.ets +++ b/ArkUI/entry/src/main/ets/pages/SetDifferentAttributes.ets @@ -24,7 +24,7 @@ struct TestHeightPage { @State message: string = 'Hello World'; @State myHeight1: number = 30; @State myHeight2: number = 60; - @State flag: Boolean = false + @State flag: boolean = false build() { Column() { Text(this.message)