未验证 提交 c1e3ab6f 编写于 作者: O openharmony_ci 提交者: Gitee

!7478 attribute not variable

Merge pull request !7478 from Bo Jiang/tiao
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
@Entry @Entry
@Component @Component
struct CompA { struct CompA {
size : number = 100; size1 : number = 100;
@Builder SquareText(label: string) { @Builder SquareText(label: string) {
Text(label) Text(label)
.width(1 * this.size) .width(1 * this.size1)
.height(1 * this.size) .height(1 * this.size1)
} }
@Builder RowOfSquareTexts(label1: string, label2: string) { @Builder RowOfSquareTexts(label1: string, label2: string) {
...@@ -22,8 +22,8 @@ struct CompA { ...@@ -22,8 +22,8 @@ struct CompA {
this.SquareText(label1) this.SquareText(label1)
this.SquareText(label2) this.SquareText(label2)
} }
.width(2 * this.size) .width(2 * this.size1)
.height(1 * this.size) .height(1 * this.size1)
} }
build() { build() {
...@@ -33,12 +33,12 @@ struct CompA { ...@@ -33,12 +33,12 @@ struct CompA {
this.SquareText("B") this.SquareText("B")
// or as long as tsc is used // or as long as tsc is used
} }
.width(2 * this.size) .width(2 * this.size1)
.height(1 * this.size) .height(1 * this.size1)
this.RowOfSquareTexts("C", "D") this.RowOfSquareTexts("C", "D")
} }
.width(2 * this.size) .width(2 * this.size1)
.height(2 * this.size) .height(2 * this.size1)
} }
} }
``` ```
......
...@@ -85,13 +85,13 @@ struct Parent { ...@@ -85,13 +85,13 @@ struct Parent {
build() { build() {
Column() { Column() {
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
CompA({ astate: new ClassA(2), aLink: $parentState }) CompA({ aState: new ClassA(2), aLink: $parentState })
} }
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
CompA({ aLink: $parentState }) CompA({ aLink: $parentState })
} }
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
CompA({ astate: new ClassA(3), aLink: $parentState }) CompA({ aState: new ClassA(3), aLink: $parentState })
} }
} }
} }
...@@ -99,8 +99,8 @@ struct Parent { ...@@ -99,8 +99,8 @@ struct Parent {
@Component @Component
struct CompA { struct CompA {
@State aState any = false @State aState: any = false
@Link aLink ClassA @Link aLink: ClassA
build() { build() {
Column() { Column() {
...@@ -113,7 +113,7 @@ struct CompA { ...@@ -113,7 +113,7 @@ struct CompA {
@Component @Component
struct CompB { struct CompB {
@Link bLink: ClassA @Link bLink: ClassA
@Prop bProp: bpplean @Prop bProp: boolean
build() { build() {
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册