diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/search.png b/zh-cn/application-dev/reference/arkui-ts/figures/search.png new file mode 100644 index 0000000000000000000000000000000000000000..fddf98d7104f3bd8a370b5be86da322834ff0180 Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/search.png differ diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md index 63d80ec1a1efb165a126b5c878b23de0e6e62306..bfca8293716963a00a2dc33ecba29e19a7f57a6e 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-search.md @@ -85,21 +85,22 @@ struct SearchExample { Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { Text(this.submitvalue) Text(this.changevalue) - Search({value: '', placeholder: 'Type to search', controller: this.controller}) + Search({value: this.changevalue, placeholder: 'Type to search', controller: this.controller}) .searchButton('Search') .width(400) .height(35) .backgroundColor(Color.White) .placeholderColor(Color.Grey) - .placeholderFont({ size: 50, weight: 10, family: 'serif', style: FontStyle.Normal }) + .placeholderFont({ size: 26, weight: 10, family: 'serif', style: FontStyle.Normal }) .onSubmit((value: string) => { this.submitvalue = value }) .onChange((value: string) => { - this.changevalue = value + this.changevalue += value }) - .margin({ top: 30 }) + .margin({ top: 30, left:10, right:10 }) } } } ``` +![search](figures/search.png) \ No newline at end of file