diff --git a/zh-cn/application-dev/quick-start/arkts-prop.md b/zh-cn/application-dev/quick-start/arkts-prop.md index b855989d323ffdf8d6d5905874a3c68918c197a8..171f1fb43bd8ef6eff28e32e642c89e73037743f 100644 --- a/zh-cn/application-dev/quick-start/arkts-prop.md +++ b/zh-cn/application-dev/quick-start/arkts-prop.md @@ -118,7 +118,7 @@ this.title.push('3') ```ts @Component struct DateComponent { - @Prop selectedDate: Date; + @Prop selectedDate: Date = new Date(''); build() { Column() { @@ -198,7 +198,7 @@ ParentComponent的状态变量countDownStartValue的变化将重置CountDownComp ```ts @Component struct CountDownComponent { - @Prop count: number; + @Prop count: number = 0; costOfOneAttempt: number = 1; build() { @@ -370,7 +370,7 @@ class Book { @Component struct ReaderComp { - @Prop book: Book; + @Prop book: Book = new Book("", 0); build() { Row() { @@ -497,7 +497,7 @@ class Book { ```ts @Component struct MyComponent { - @Prop customCounter: number; + @Prop customCounter: number = 0; @Prop customCounter2: number = 5; build() {