From 53f26d8c7032328084bfdd55d9b680ea27bf8848 Mon Sep 17 00:00:00 2001 From: yfwang6 Date: Mon, 24 Apr 2023 11:52:06 +0800 Subject: [PATCH] wangyongfei6@huawei.com modify docs of prop Signed-off-by: yfwang6 --- zh-cn/application-dev/quick-start/arkts-prop.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/zh-cn/application-dev/quick-start/arkts-prop.md b/zh-cn/application-dev/quick-start/arkts-prop.md index f85f88c5d5..79c03c4e08 100644 --- a/zh-cn/application-dev/quick-start/arkts-prop.md +++ b/zh-cn/application-dev/quick-start/arkts-prop.md @@ -350,17 +350,12 @@ struct MainProgram { } Row() { - Column( - // customCounter必须从父组件初始化,因为MyComponent的customCounter成员变量缺少本地初始化;此处,customCounter2可以不做初始化。 - MyComponent({ customCounter: this.mainCounter }) - // customCounter2也可以从父组件初始化,父组件初始化的值会覆盖子组件customCounter2的本地初始化的值 - MyComponent({ customCounter: this.mainCounter, customCounter2: this.mainCounter }) - }.width('40%') - } - - Row() { - Text('').width(480).height(10) - } + Column() + // customCounter必须从父组件初始化,因为MyComponent的customCounter成员变量缺少本地初始化;此处,customCounter2可以不做初始化。 + MyComponent({ customCounter: this.mainCounter }) + // customCounter2也可以从父组件初始化,父组件初始化的值会覆盖子组件customCounter2的本地初始化的值 + MyComponent({ customCounter: this.mainCounter, customCounter2: this.mainCounter }) + }.width('40%') } } } -- GitLab