“999d097bbba1fb384deee535ce6ff68761dabb8f”上不存在“...design/git@gitcode.net:s920243400/PaddleDetection.git”
未验证 提交 c6dc60d5 编写于 作者: O openharmony_ci 提交者: Gitee

!10248 挑单--整改文档

Merge pull request !10248 from wangshuainan1/OpenHarmony-3.2-Beta3
...@@ -55,27 +55,27 @@ RichText(content:string) ...@@ -55,27 +55,27 @@ RichText(content:string)
@Entry @Entry
@Component @Component
struct RichTextExample { struct RichTextExample {
@State data: string = "<h1 style='text-align: center;'>h1标题</h1>" + @State data: string = '<h1 style="text-align: center;">h1标题</h1>' +
"<h1 style='text-align: center;'><i>h1斜体</i></h1>" + '<h1 style="text-align: center;"><i>h1斜体</i></h1>' +
"<h1 style='text-align: center;'><u>h1下划线</u></h1>" + '<h1 style="text-align: center;"><u>h1下划线</u></h1>' +
"<h2 style='text-align: center;'>h2标题</h2>" + '<h2 style="text-align: center;">h2标题</h2>' +
"<h3 style='text-align: center;'>h3标题</h3>" + '<h3 style="text-align: center;">h3标题</h3>' +
"<p style='text-align: center;'>p常规</p><hr/>" + '<p style="text-align: center;">p常规</p><hr/>' +
"<div style='width: 500px;height: 500px;border: 1px solid;margin: 0auto;'>" + '<div style="width: 500px;height: 500px;border: 1px solid;margin: 0auto;">' +
"<p style='font-size: 35px;text-align: center;font-weight: bold; color: rgb(24,78,228)'>字体大小35px,行高45px</p>" + '<p style="font-size: 35px;text-align: center;font-weight: bold; color: rgb(24,78,228)">字体大小35px,行高45px</p>' +
"<p style='background-color: #e5e5e5;line-height: 45px;font-size: 35px;text-indent: 2em;'>" + '<p style="background-color: #e5e5e5;line-height: 45px;font-size: 35px;text-indent: 2em;">' +
"<p>这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字</p>" '<p>这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字</p>';
build() { build() {
Flex({direction: FlexDirection.Column,alignItems: ItemAlign.Center, Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center,
justifyContent: FlexAlign.Center }){ justifyContent: FlexAlign.Center }) {
RichText(this.data) RichText(this.data)
.onStart(()=>{ .onStart(() => {
console.info("RichText onStart") console.info('RichText onStart');
}) })
.onComplete(()=>{ .onComplete(() => {
console.info("RichText onComplete") console.info('RichText onComplete');
}) })
} }
} }
} }
......
...@@ -93,6 +93,8 @@ scrollEdge(value: Edge): void ...@@ -93,6 +93,8 @@ scrollEdge(value: Edge): void
| value | [Edge](ts-appendix-enums.md#edge) | 是 | 滚动到的边缘位置。 | | value | [Edge](ts-appendix-enums.md#edge) | 是 | 滚动到的边缘位置。 |
### scrollPage ### scrollPage
scrollPage(value: { next: boolean, direction?: Axis }): void scrollPage(value: { next: boolean, direction?: Axis }): void
......
...@@ -5,11 +5,6 @@ ...@@ -5,11 +5,6 @@
> **说明:** > **说明:**
> 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 > 该组件从API Version 8开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。
## 权限列表
## TimePickerDialog.show ## TimePickerDialog.show
show(options?: TimePickerDialogOptions) show(options?: TimePickerDialogOptions)
...@@ -33,7 +28,7 @@ show(options?: TimePickerDialogOptions) ...@@ -33,7 +28,7 @@ show(options?: TimePickerDialogOptions)
@Entry @Entry
@Component @Component
struct TimePickerDialogExample01 { struct TimePickerDialogExample01 {
@State isUseMilitaryTime: boolean = true @State isUseMilitaryTime: boolean = true;
build() { build() {
Flex({direction: FlexDirection.Column, alignItems: ItemAlign.Center, Flex({direction: FlexDirection.Column, alignItems: ItemAlign.Center,
...@@ -42,13 +37,13 @@ struct TimePickerDialogExample01 { ...@@ -42,13 +37,13 @@ struct TimePickerDialogExample01 {
TimePickerDialog.show({ TimePickerDialog.show({
useMilitaryTime: this.isUseMilitaryTime, useMilitaryTime: this.isUseMilitaryTime,
onAccept: (value: TimePickerResult) => { onAccept: (value: TimePickerResult) => {
console.info("TimePickerDialog:onAccept()" + JSON.stringify(value)) console.info("TimePickerDialog:onAccept()" + JSON.stringify(value));
}, },
onCancel: () => { onCancel: () => {
console.info("TimePickerDialog:onCancel()") console.info("TimePickerDialog:onCancel()");
}, },
onChange: (value: TimePickerResult) => { onChange: (value: TimePickerResult) => {
console.info("TimePickerDialog:onChange()" + JSON.stringify(value)) console.info("TimePickerDialog:onChange()" + JSON.stringify(value));
} }
}) })
}) })
...@@ -56,13 +51,16 @@ struct TimePickerDialogExample01 { ...@@ -56,13 +51,16 @@ struct TimePickerDialogExample01 {
} }
} }
``` ```
![zh-cn_image_0000001118642010](figures/zh-cn_image_0000001118642010.gif)
### 时间滑动选择器(12小时制)示例 ### 时间滑动选择器(12小时制)示例
```ts ```ts
// xxx.ets // xxx.ets
@Entry @Entry
@Component @Component
struct TimePickerDialogExample02 { struct TimePickerDialogExample02 {
@State isUseMilitaryTime: boolean = false @State isUseMilitaryTime: boolean = false;
build() { build() {
Flex({direction: FlexDirection.Column, alignItems: ItemAlign.Center, Flex({direction: FlexDirection.Column, alignItems: ItemAlign.Center,
...@@ -71,13 +69,13 @@ struct TimePickerDialogExample02 { ...@@ -71,13 +69,13 @@ struct TimePickerDialogExample02 {
TimePickerDialog.show({ TimePickerDialog.show({
useMilitaryTime: this.isUseMilitaryTime, useMilitaryTime: this.isUseMilitaryTime,
onAccept: (value: TimePickerResult) => { onAccept: (value: TimePickerResult) => {
console.info("TimePickerDialog:onAccept()" + JSON.stringify(value)) console.info("TimePickerDialog:onAccept()" + JSON.stringify(value));
}, },
onCancel: () => { onCancel: () => {
console.info("TimePickerDialog:onCancel()") console.info("TimePickerDialog:onCancel()");
}, },
onChange: (value: TimePickerResult) => { onChange: (value: TimePickerResult) => {
console.info("TimePickerDialog:onChange()" + JSON.stringify(value)) console.info("TimePickerDialog:onChange()" + JSON.stringify(value));
} }
}) })
}) })
...@@ -85,3 +83,5 @@ struct TimePickerDialogExample02 { ...@@ -85,3 +83,5 @@ struct TimePickerDialogExample02 {
} }
} }
``` ```
![zh-cn_image_0000001118642020](figures/zh-cn_image_0000001118642020.gif)
\ No newline at end of file
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
@Entry @Entry
@Component @Component
struct FlexExample { struct FlexExample {
build() { build() {
Column({ space: 5 }) { Column({ space: 5 }) {
Text('flexBasis').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('flexBasis').fontSize(9).fontColor(0xCCCCCC).width('90%')
...@@ -31,11 +30,18 @@ struct FlexExample { ...@@ -31,11 +30,18 @@ struct FlexExample {
// flexBasis()值可以是'auto',表示基准尺寸是元素本来的大小 ,也可以是长度设置,相当于.width()/.height() // flexBasis()值可以是'auto',表示基准尺寸是元素本来的大小 ,也可以是长度设置,相当于.width()/.height()
Flex() { Flex() {
Text('flexBasis(100)') Text('flexBasis(100)')
.flexBasis('100').height(100).lineHeight(70) .flexBasis('100')
.backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) .height(100)
.lineHeight(70)
.backgroundColor(0xF5DEB3)
.textAlign(TextAlign.Center)
Text('flexBasis("auto")') Text('flexBasis("auto")')
.flexBasis('auto').width('60%').height(100).lineHeight(70) .flexBasis('auto')
.backgroundColor(0xD2B48C).textAlign(TextAlign.Center) .width('60%')
.height(100)
.lineHeight(70)
.backgroundColor(0xD2B48C)
.textAlign(TextAlign.Center)
}.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE) }.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE)
Text('flexGrow').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('flexGrow').fontSize(9).fontColor(0xCCCCCC).width('90%')
...@@ -43,11 +49,17 @@ struct FlexExample { ...@@ -43,11 +49,17 @@ struct FlexExample {
// flexGrow()剩余空间分配给该元素的比例 // flexGrow()剩余空间分配给该元素的比例
Flex() { Flex() {
Text('flexGrow(2)') Text('flexGrow(2)')
.flexGrow(2).height(100).lineHeight(70) .flexGrow(2)
.backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) .height(100)
.lineHeight(70)
.backgroundColor(0xF5DEB3)
.textAlign(TextAlign.Center)
Text('flexGrow(1)') Text('flexGrow(1)')
.flexGrow(1).height(100).lineHeight(70) .flexGrow(1)
.backgroundColor(0xD2B48C).textAlign(TextAlign.Center) .height(100)
.lineHeight(70)
.backgroundColor(0xD2B48C)
.textAlign(TextAlign.Center)
}.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE) }.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE)
Text('flexShrink').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('flexShrink').fontSize(9).fontColor(0xCCCCCC).width('90%')
...@@ -55,13 +67,25 @@ struct FlexExample { ...@@ -55,13 +67,25 @@ struct FlexExample {
// text1比例是0,其他都是默认值1,放不下时直接等比例缩放后两个,第一个不缩放 // text1比例是0,其他都是默认值1,放不下时直接等比例缩放后两个,第一个不缩放
Flex({ direction: FlexDirection.Row }) { Flex({ direction: FlexDirection.Row }) {
Text('flexShrink(0)') Text('flexShrink(0)')
.flexShrink(0).width('50%').height(100).lineHeight(70) .flexShrink(0)
.backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) .width('50%')
.height(100)
.lineHeight(70)
.backgroundColor(0xF5DEB3)
.textAlign(TextAlign.Center)
Text('no flexShrink') 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)') Text('flexShrink(2)')
.flexShrink(2).width('40%').height(100) .lineHeight(70) .flexShrink(2)
.backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) .width('40%')
.height(100)
.lineHeight(70)
.backgroundColor(0xF5DEB3)
.textAlign(TextAlign.Center)
}.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE) }.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE)
Text('alignSelf').fontSize(9).fontColor(0xCCCCCC).width('90%') Text('alignSelf').fontSize(9).fontColor(0xCCCCCC).width('90%')
...@@ -70,8 +94,12 @@ struct FlexExample { ...@@ -70,8 +94,12 @@ struct FlexExample {
Text('no alignSelf,height:80').width('33%').height(80) Text('no alignSelf,height:80').width('33%').height(80)
.backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) .backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
Text('alignSelf stretch') Text('alignSelf stretch')
.alignSelf(ItemAlign.Stretch).width('33%').height(80).lineHeight(70) .alignSelf(ItemAlign.Stretch)
.backgroundColor(0xD2B48C).textAlign(TextAlign.Center) .width('33%')
.height(80)
.lineHeight(70)
.backgroundColor(0xD2B48C)
.textAlign(TextAlign.Center)
Text('no alignSelf,height:100').width('34%').height(100) Text('no alignSelf,height:100').width('34%').height(100)
.backgroundColor(0xF5DEB3).textAlign(TextAlign.Center) .backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
}.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE) }.width('90%').height(120).padding(10).backgroundColor(0xAFEEEE)
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
## 属性 ## 属性
| 名称 | 参数类型 | 描述 | | 名称 | 参数类型 | 默认值 | 描述 |
| ------- | ---------------------------------------- | ---------------------------------------- | | -------- | -------- | -------- | -------- |
| opacity | number&nbsp;\|&nbsp;[Resource](ts-types.md#resource) | 元素的不透明度,取值范围为0到1,1表示为不透明,0表示为完全透明。<br>默认值:1 | | opacity | number&nbsp;\|&nbsp;[Resource](../../ui/ts-types.md#resource类型) | 1 | 元素的不透明度,取值范围为0到1,1表示为不透明,0表示为完全透明。<br/>**说明:**<br/>子组件可以继承父组件的此属性。。 |
## 示例 ## 示例
......
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
flex-direction: column; flex-direction: column;
margin-top: 20px; margin-top: 20px;
margin-left: 30px; margin-left: 30px;
font-weight: 700;
} }
.title-text { .title-text {
width: 95%;
color: #1a1a1a; color: #1a1a1a;
font-size: 50px; font-size: 50px;
margin-top: 40px; margin-top: 40px;
...@@ -38,9 +40,11 @@ ...@@ -38,9 +40,11 @@
// xxx.js // xxx.js
export default { export default {
data: { data: {
headTitle: 'Capture the Beauty in This Moment', headTitle: 'Capture the Beauty in Moment',
paragraphFirst: 'Capture the beauty of light during the transition and fusion of ice and water. At the instant of movement and stillness, softness and rigidity, force and beauty, condensing moving moments.', paragraphFirst: 'Capture the beauty of light during the transition and fusion of ice and water. At the instant of movement and stillness, softness and rigidity, force and beauty, condensing moving moments.',
paragraphSecond: 'Reflecting the purity of nature, the innovative design upgrades your visual entertainment and ergonomic comfort. Effortlessly capture what you see and let it speak for what you feel.', paragraphSecond: 'Reflecting the purity of nature, the innovative design upgrades your visual entertainment and ergonomic comfort. Effortlessly capture what you see and let it speak for what you feel.',
}, },
} }
``` ```
![zh-cn_image_0000001118642600](figures/zh-cn_image_0000001118642600.PNG)
\ No newline at end of file
...@@ -108,9 +108,9 @@ export default { ...@@ -108,9 +108,9 @@ export default {
![zh-cn_image_0000001227135613](figures/zh-cn_image_0000001227135613.gif) ![zh-cn_image_0000001227135613](figures/zh-cn_image_0000001227135613.gif)
## 添加grild-col ## 添加grid-col
创建grid-container组件并添加grid-row,在grid-row组件内添加grild-col组件形成布局。 创建grid-container组件并添加grid-row,在grid-row组件内添加grid-col组件形成布局。
```html ```html
......
# OffscreenCanvasRenderingContext2D对象 # OffscreenCanvasRenderingContext2D对象
使用OffscreenCanvas在离屏Canvas画布组件上进行绘制,绘制对象可以是矩形、文本、图片等。具体请参考[OffscreenCanvasRenderingContext2D对象](../reference/arkui-js/js-offscreencanvasrenderingcontext2d.md) 使用OffscreenCanvas在离屏Canvas画布组件上进行绘制,绘制对象可以是矩形、文本、图片等。 离屏,即GPU在当前缓冲区以外新开辟的一个缓冲区。 具体请参考[OffscreenCanvasRenderingContext2D对象](../reference/arkui-js/js-offscreencanvasrenderingcontext2d.md)
以下示例创建了一个OffscreenCanvas画布,再在画布上创建一个getContext2d对象,并设置filter属性改变图片样式。 以下示例创建了一个OffscreenCanvas画布,再在画布上创建一个getContext2d对象,并设置filter属性改变图片样式。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册