diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001118642010.gif b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001118642010.gif new file mode 100644 index 0000000000000000000000000000000000000000..3b98469c99c310c291bb45eb2a7a89c73ef0bee3 Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001118642010.gif differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001118642020.gif b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001118642020.gif new file mode 100644 index 0000000000000000000000000000000000000000..17a85e429e717138ae47456e080664856eb676a0 Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001118642020.gif differ diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001118642500.gif b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001118642500.gif new file mode 100644 index 0000000000000000000000000000000000000000..2a6cf73b491304e3f53cb0a333588cad2e42f30b Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_0000001118642500.gif differ diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md index b87cb34ec1268e077f5c762590f9e9fb0f2ffd0c..42aaa9086e6d8f933f18429fa882e880878cff61 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-richtext.md @@ -55,27 +55,27 @@ RichText(content:string) @Entry @Component struct RichTextExample { - @State data: string = "
p常规
字体大小35px,行高45px
" + - "" + - "
这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字
" + @State data: string = 'p常规
字体大小35px,行高45px
' + + '' + + '
这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字
'; build() { - Flex({direction: FlexDirection.Column,alignItems: ItemAlign.Center, - justifyContent: FlexAlign.Center }){ + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, + justifyContent: FlexAlign.Center }) { RichText(this.data) - .onStart(()=>{ - console.info("RichText onStart") - }) - .onComplete(()=>{ - console.info("RichText onComplete") - }) + .onStart(() => { + console.info('RichText onStart'); + }) + .onComplete(() => { + console.info('RichText onComplete'); + }) } } } diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md index 4dadcc663fc36e9375eec8e830cade16ceb5cc57..89bcf8f669386876ca0da1923e56007fcd27e1b3 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md @@ -93,6 +93,8 @@ scrollEdge(value: Edge): void | value | [Edge](ts-appendix-enums.md#edge) | 是 | 滚动到的边缘位置。 | + + ### scrollPage scrollPage(value: { next: boolean, direction?: Axis }): void diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md index d79f6d23c1f18890c2461a771a52e0d3f5369aa1..64ac91f433b78971fbc01d627dd4f174f7893dc6 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md @@ -5,11 +5,6 @@ > **说明:** > 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 - -## 权限列表 - -无 - ## TimePickerDialog.show show(options?: TimePickerDialogOptions) @@ -33,7 +28,7 @@ show(options?: TimePickerDialogOptions) @Entry @Component struct TimePickerDialogExample01 { - @State isUseMilitaryTime: boolean = true + @State isUseMilitaryTime: boolean = true; build() { Flex({direction: FlexDirection.Column, alignItems: ItemAlign.Center, @@ -42,13 +37,13 @@ struct TimePickerDialogExample01 { TimePickerDialog.show({ useMilitaryTime: this.isUseMilitaryTime, onAccept: (value: TimePickerResult) => { - console.info("TimePickerDialog:onAccept()" + JSON.stringify(value)) + console.info("TimePickerDialog:onAccept()" + JSON.stringify(value)); }, onCancel: () => { - console.info("TimePickerDialog:onCancel()") + console.info("TimePickerDialog:onCancel()"); }, onChange: (value: TimePickerResult) => { - console.info("TimePickerDialog:onChange()" + JSON.stringify(value)) + console.info("TimePickerDialog:onChange()" + JSON.stringify(value)); } }) }) @@ -56,13 +51,16 @@ struct TimePickerDialogExample01 { } } ``` +  + ### 时间滑动选择器(12小时制)示例 + ```ts // xxx.ets @Entry @Component struct TimePickerDialogExample02 { - @State isUseMilitaryTime: boolean = false + @State isUseMilitaryTime: boolean = false; build() { Flex({direction: FlexDirection.Column, alignItems: ItemAlign.Center, @@ -71,13 +69,13 @@ struct TimePickerDialogExample02 { TimePickerDialog.show({ useMilitaryTime: this.isUseMilitaryTime, onAccept: (value: TimePickerResult) => { - console.info("TimePickerDialog:onAccept()" + JSON.stringify(value)) + console.info("TimePickerDialog:onAccept()" + JSON.stringify(value)); }, onCancel: () => { - console.info("TimePickerDialog:onCancel()") + console.info("TimePickerDialog:onCancel()"); }, onChange: (value: TimePickerResult) => { - console.info("TimePickerDialog:onChange()" + JSON.stringify(value)) + console.info("TimePickerDialog:onChange()" + JSON.stringify(value)); } }) }) @@ -85,3 +83,5 @@ struct TimePickerDialogExample02 { } } ``` + +  \ No newline at end of file diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-flex-layout.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-flex-layout.md index 6e1de9e4bc97caefa5cb8c6a14f4573e8694e722..e4414bb93c2b9b19354b873f1e342ad90635d7bf 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-flex-layout.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-flex-layout.md @@ -23,7 +23,6 @@ @Entry @Component struct FlexExample { - build() { Column({ space: 5 }) { Text('flexBasis').fontSize(9).fontColor(0xCCCCCC).width('90%') @@ -31,11 +30,18 @@ struct FlexExample { // flexBasis()值可以是'auto',表示基准尺寸是元素本来的大小 ,也可以是长度设置,相当于.width()/.height() Flex() { Text('flexBasis(100)') - .flexBasis('100').height(100).lineHeight(70) - .backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .flexBasis('100') + .height(100) + .lineHeight(70) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) Text('flexBasis("auto")') - .flexBasis('auto').width('60%').height(100).lineHeight(70) - .backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + .flexBasis('auto') + .width('60%') + .height(100) + .lineHeight(70) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) }.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE) Text('flexGrow').fontSize(9).fontColor(0xCCCCCC).width('90%') @@ -43,11 +49,17 @@ struct FlexExample { // flexGrow()剩余空间分配给该元素的比例 Flex() { Text('flexGrow(2)') - .flexGrow(2).height(100).lineHeight(70) - .backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .flexGrow(2) + .height(100) + .lineHeight(70) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) Text('flexGrow(1)') - .flexGrow(1).height(100).lineHeight(70) - .backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + .flexGrow(1) + .height(100) + .lineHeight(70) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) }.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE) Text('flexShrink').fontSize(9).fontColor(0xCCCCCC).width('90%') @@ -55,13 +67,25 @@ struct FlexExample { // text1比例是0,其他都是默认值1,放不下时直接等比例缩放后两个,第一个不缩放 Flex({ direction: FlexDirection.Row }) { Text('flexShrink(0)') - .flexShrink(0).width('50%').height(100).lineHeight(70) - .backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .flexShrink(0) + .width('50%') + .height(100) + .lineHeight(70) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) Text('no flexShrink') - .width('40%').height(100).lineHeight(70).backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + .width('40%') + .height(100) + .lineHeight(70) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) Text('flexShrink(2)') - .flexShrink(2).width('40%').height(100) .lineHeight(70) - .backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) + .flexShrink(2) + .width('40%') + .height(100) + .lineHeight(70) + .backgroundColor(0xF5DEB3) + .textAlign(TextAlign.Center) }.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE) Text('alignSelf').fontSize(9).fontColor(0xCCCCCC).width('90%') @@ -70,8 +94,12 @@ struct FlexExample { Text('no alignSelf,height:80').width('33%').height(80) .backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) Text('alignSelf stretch') - .alignSelf(ItemAlign.Stretch).width('33%').height(80).lineHeight(70) - .backgroundColor(0xD2B48C).textAlign(TextAlign.Center) + .alignSelf(ItemAlign.Stretch) + .width('33%') + .height(80) + .lineHeight(70) + .backgroundColor(0xD2B48C) + .textAlign(TextAlign.Center) Text('no alignSelf,height:100').width('34%').height(100) .backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) }.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md index 592d818752f86f81e501fc475c0af0f04e29f70b..baf8eb30f1f7b9208f6b31b090f9bfe4646bca68 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-opacity.md @@ -10,9 +10,9 @@ ## 属性 -| 名称 | 参数类型 | 描述 | -| ------- | ---------------------------------------- | ---------------------------------------- | -| opacity | number \| [Resource](ts-types.md#resource) | 元素的不透明度,取值范围为0到1,1表示为不透明,0表示为完全透明。