提交 edc3bdce 编写于 作者: E ester.zhou

Update docs (22019)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 7f5c1996
# JavaScript-compatible Web-like Development Paradigm (ArkUI.Lite) # JavaScript-compatible Web-like Development Paradigm (ArkUI.Lite)
- Framework Overview - Framework Overview
- [File Organization](js-framework-file.md) - [File Organization](js-framework-file.md)
- ["js" Tag](js-framework-js-tag.md) - ["js" Tag](js-framework-js-tag.md)
- [app.js](js-framework-js-file.md) - [app.js](js-framework-js-file.md)
- Syntax
- [HML](js-framework-syntax-hml.md) - Syntax
- [CSS](js-framework-syntax-css.md) - [HML](js-framework-syntax-hml.md)
- [JavaScript](js-framework-syntax-js.md) - [CSS](js-framework-syntax-css.md)
- [JavaScript](js-framework-syntax-js.md)
- Universal Component Information - Universal Component Information
- [Universal Events](js-common-events.md) - [Universal Events](js-common-events.md)
- [Universal Attributes](js-common-attributes.md) - [Universal Attributes](js-common-attributes.md)
- [Universal Styles](js-common-styles.md) - [Universal Styles](js-common-styles.md)
- [Animation Styles](js-components-common-animation.md) - [Animation Styles](js-components-common-animation.md)
- [Media Query](js-components-common-mediaquery.md) - [Media Query](js-components-common-mediaquery.md)
- Container Components - Container Components
- [div](js-components-container-div.md) - [div](js-components-container-div.md)
- [list](js-components-container-list.md) - [list](js-components-container-list.md)
- [list-item](js-components-container-list-item.md) - [list-item](js-components-container-list-item.md)
- [stack](js-components-container-stack.md) - [stack](js-components-container-stack.md)
- [swiper](js-components-container-swiper.md) - [swiper](js-components-container-swiper.md)
- Basic Components - Basic Components
- [chart](js-components-basic-chart.md) - [chart](js-components-basic-chart.md)
- [image](js-components-basic-image.md) - [image](js-components-basic-image.md)
- [image-animator](js-components-basic-image-animator.md) - [image-animator](js-components-basic-image-animator.md)
- [input](js-components-basic-input.md) - [input](js-components-basic-input.md)
- [marquee](js-components-basic-marquee.md) - [marquee](js-components-basic-marquee.md)
- [picker-view](js-components-basic-picker-view.md) - [picker-view](js-components-basic-picker-view.md)
- [progress](js-components-basic-progress.md) - [progress](js-components-basic-progress.md)
- [qrcode](js-components-basic-qrcode.md) - [qrcode](js-components-basic-qrcode.md)
- [slider](js-components-basic-slider.md) - [slider](js-components-basic-slider.md)
- [switch](js-components-basic-switch.md) - [switch](js-components-basic-switch.md)
- [text](js-components-basic-text.md) - [text](js-components-basic-text.md)
- Canvas Components - Canvas Components
- [canvas](js-components-canvas-canvas.md) - [canvas](js-components-canvas-canvas.md)
- [CanvasRenderingContext2D](js-components-canvas-canvasrenderingcontext2d.md) - [CanvasRenderingContext2D](js-components-canvas-canvasrenderingcontext2d.md)
\ No newline at end of file
...@@ -25,7 +25,7 @@ In addition to the [backgroundColor](ts-universal-attributes-background.md) attr ...@@ -25,7 +25,7 @@ In addition to the [backgroundColor](ts-universal-attributes-background.md) attr
| Name | Type | Description | | Name | Type | Description |
| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| title | string \| [CustomBuilder](ts-types.md#custombuilder8) \| [NavigationCommonTitle](ts-basic-components-navigation.md#navigationcommontitle) \| [NavigationCustomTitle](ts-basic-components-navigation.md##navigationcustomtitle) | Page title.<br>**NOTE**<br>When the NavigationCustomTitle type is used to set the height, the **titleMode** attribute does not take effect.<br>When the title string is too long: (1) If no subtitle is set, the string is scaled down, wrapped in two lines, and then clipped with an ellipsis (...); (2) If a subtitle is set, the subtitle is scaled down and then clipped with an ellipsis (...).| | title | string \| [CustomBuilder](ts-types.md#custombuilder8) \| [NavigationCommonTitle](ts-basic-components-navigation.md#navigationcommontitle) \| [NavigationCustomTitle](ts-basic-components-navigation.md##navigationcustomtitle) | Page title.<br>**NOTE**<br>When the NavigationCustomTitle type is used to set the height, the **titleMode** attribute does not take effect.<br>When the title string is too long:<br>(1) If no subtitle is set, the string is scaled down, wrapped in two lines, and then clipped with an ellipsis (...).<br/>(2) If a subtitle is set, the subtitle is scaled down and then clipped with an ellipsis (...). |
| hideTitleBar | boolean | Whether to hide the title bar.<br>Default value: **false**<br>**true**: Hide the title bar.<br>**false**: Display the title bar.| | hideTitleBar | boolean | Whether to hide the title bar.<br>Default value: **false**<br>**true**: Hide the title bar.<br>**false**: Display the title bar.|
## Events ## Events
...@@ -33,8 +33,8 @@ In addition to the [backgroundColor](ts-universal-attributes-background.md) attr ...@@ -33,8 +33,8 @@ In addition to the [backgroundColor](ts-universal-attributes-background.md) attr
In addition to the [universal events](ts-universal-events-click.md), the following events are supported. In addition to the [universal events](ts-universal-events-click.md), the following events are supported.
| Name | Description | | Name | Description |
| ---------------------------------------- | ---------------------------------------- | | ------------------------------------------------------- | ------------------------------------------------------------ |
| onShown(callback: (param: unknown) =&gt; void)<sup>10+</sup> | Called when the navigation destination page is displayed. **param**: parameter information of the navigation destination page.<br>**NOTE**<br>The **onShown** API will be changed to **onShown(callback: () =&gt; void)**.| | onShown(callback: () =&gt; void)<sup>10+</sup> | Called when the navigation destination page is displayed. |
| onHidden(callback: () =&gt; void)<sup>10+</sup> | Called when the navigation destination page is hidden.| | onHidden(callback: () =&gt; void)<sup>10+</sup> | Called when the navigation destination page is hidden. |
| onBackPressed(callback: () =&gt; boolean)<sup>10+</sup> | Called when the back button is pressed.<br>The value **true** means that the back button logic is overridden, and **false** means that the previous page is displayed.<br>| | onBackPressed(callback: () =&gt; boolean)<sup>10+</sup> | Called when the back button is pressed.<br>The value **true** means that the back button logic is overridden, and **false** means that the previous page is displayed. |
...@@ -76,6 +76,9 @@ struct TimePickerExample { ...@@ -76,6 +76,9 @@ struct TimePickerExample {
this.selectedTime.setHours(value.hour, value.minute) this.selectedTime.setHours(value.hour, value.minute)
console.info('select current date is: ' + JSON.stringify(value)) console.info('select current date is: ' + JSON.stringify(value))
}) })
.disappearTextStyle({color: Color.Red, font: {size: 15, weight: FontWeight.Lighter}})
.textStyle({color: Color.Black, font: {size: 20, weight: FontWeight.Normal}})
.selectedTextStyle({color: Color.Blue, font: {size: 30, weight: FontWeight.Bolder}})
}.width('100%') }.width('100%')
} }
} }
......
...@@ -46,6 +46,9 @@ struct TimePickerDialogExample { ...@@ -46,6 +46,9 @@ struct TimePickerDialogExample {
.onClick(() => { .onClick(() => {
TimePickerDialog.show({ TimePickerDialog.show({
selected: this.selectTime, selected: this.selectTime,
disappearTextStyle: {color: Color.Red, font: {size: 15, weight: FontWeight.Lighter}},
textStyle: {color: Color.Black, font: {size: 20, weight: FontWeight.Normal}},
selectedTextStyle: {color: Color.Blue, font: {size: 30, weight: FontWeight.Bolder}},
onAccept: (value: TimePickerResult) => { onAccept: (value: TimePickerResult) => {
// Set selectTime to the time when the OK button is clicked. In this way, when the dialog box is displayed again, the selected time is the time when the operation was confirmed last time. // Set selectTime to the time when the OK button is clicked. In this way, when the dialog box is displayed again, the selected time is the time when the operation was confirmed last time.
this.selectTime.setHours(value.hour, value.minute) this.selectTime.setHours(value.hour, value.minute)
...@@ -65,6 +68,9 @@ struct TimePickerDialogExample { ...@@ -65,6 +68,9 @@ struct TimePickerDialogExample {
TimePickerDialog.show({ TimePickerDialog.show({
selected: this.selectTime, selected: this.selectTime,
useMilitaryTime: true, useMilitaryTime: true,
disappearTextStyle: {color: Color.Red, font: {size: 15, weight: FontWeight.Lighter}},
textStyle: {color: Color.Black, font: {size: 20, weight: FontWeight.Normal}},
selectedTextStyle: {color: Color.Blue, font: {size: 30, weight: FontWeight.Bolder}},
onAccept: (value: TimePickerResult) => { onAccept: (value: TimePickerResult) => {
this.selectTime.setHours(value.hour, value.minute) this.selectTime.setHours(value.hour, value.minute)
console.info("TimePickerDialog:onAccept()" + JSON.stringify(value)) console.info("TimePickerDialog:onAccept()" + JSON.stringify(value))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册