未验证 提交 3d2ba77b 编写于 作者: O openharmony_ci 提交者: Gitee

!8606 update docs

Merge pull request !8606 from 关明月/OpenHarmony-3.1-Release
...@@ -47,4 +47,4 @@ struct LoadingProgressExample { ...@@ -47,4 +47,4 @@ struct LoadingProgressExample {
} }
``` ```
![zh-cn_image_0000001198839004](figures/loadingProgress.png) ![zh-cn_image_000000111864201](figures/zh-cn_image_000000111864201.gif)
...@@ -32,6 +32,12 @@ Marquee(value: { start: boolean, step?: number, loop?: number, fromStart?: boole ...@@ -32,6 +32,12 @@ Marquee(value: { start: boolean, step?: number, loop?: number, fromStart?: boole
| fromStart | boolean | 否 | true | 设置文本从头开始滚动或反向滚动。 | | fromStart | boolean | 否 | true | 设置文本从头开始滚动或反向滚动。 |
| src | string | 是 | - | 需要滚动的文本。 | | src | string | 是 | - | 需要滚动的文本。 |
## 属性
| 名称 | 参数类型 | 默认值 | 描述 |
| ---------- | -------- | ------ | ------------------ |
| allowScale | boolean | false | 是否允许文本缩放。 |
## 事件 ## 事件
| 名称 | 功能描述 | | 名称 | 功能描述 |
......
...@@ -32,7 +32,7 @@ Navigation() ...@@ -32,7 +32,7 @@ Navigation()
| subtitle | string | - | 页面副标题。 | | subtitle | string | - | 页面副标题。 |
| menus | Array<NavigationMenuItem&gt;&nbsp;\|&nbsp;[CustomBuilder](ts-types.md#custombuilder8)<sup>8+</sup> | - | 页面右上角菜单。 | | menus | Array<NavigationMenuItem&gt;&nbsp;\|&nbsp;[CustomBuilder](ts-types.md#custombuilder8)<sup>8+</sup> | - | 页面右上角菜单。 |
| titleMode | NavigationTitleMode | NavigationTitleMode.Free | 页面标题栏显示模式。 | | titleMode | NavigationTitleMode | NavigationTitleMode.Free | 页面标题栏显示模式。 |
| toolBar | object\|&nbsp;[CustomBuilder](ts-types.md#custombuilder8)<sup>8+</sup> | - | 设置工具栏内容。<br/>items:&nbsp;工具栏所有项。 | | toolBar | object&nbsp;\|&nbsp;[CustomBuilder](ts-types.md#custombuilder8)<sup>8+</sup> | - | 设置工具栏内容。<br/>items:&nbsp;工具栏所有项。 |
| hideToolBar | boolean | false | 设置隐藏/显示工具栏:<br/>true:&nbsp;隐藏工具栏。<br/>false:&nbsp;显示工具栏。 | | hideToolBar | boolean | false | 设置隐藏/显示工具栏:<br/>true:&nbsp;隐藏工具栏。<br/>false:&nbsp;显示工具栏。 |
| hideTitleBar | boolean | false | 隐藏标题栏。 | | hideTitleBar | boolean | false | 隐藏标题栏。 |
| hideBackButton | boolean | false | 隐藏返回键。 | | hideBackButton | boolean | false | 隐藏返回键。 |
......
...@@ -26,11 +26,11 @@ Progress(options: {value: number, total?: number, style?: ProgressStyle, type?: ...@@ -26,11 +26,11 @@ Progress(options: {value: number, total?: number, style?: ProgressStyle, type?:
**参数:** **参数:**
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------ | ------------- | ---- | -------------------- | ---------------- | | -------------------------- | ------------- | ---- | -------------------- | --------------------------------------------------- |
| value | number | 是 | - | 指定当前进度值。 | | value | number | 是 | - | 指定当前进度值。 |
| total | number | 否 | 100 | 指定进度总长。 | | total | number | 否 | 100 | 指定进度总长。 |
| type | ProgressType | 否 | ProgressType.Linear | 指定进度条样式。 | | type<sup>8+</sup> | ProgressType | 否 | ProgressType.Linear | 指定进度条类型。 |
| style | ProgressStyle | 否 | ProgressStyle.Linear | 指定进度条样式。 | | style<sup>deprecated</sup> | ProgressStyle | 否 | ProgressStyle.Linear | 指定进度条样式。<br/>该参数从API Version8开始废弃。 |
## ProgressType枚举说明 ## ProgressType枚举说明
......
...@@ -30,8 +30,9 @@ QRCode(value: string) ...@@ -30,8 +30,9 @@ QRCode(value: string)
## 属性 ## 属性
| 名称 | 参数类型 | 默认值 | 描述 | | 名称 | 参数类型 | 默认值 | 描述 |
| ----- | ----- | ----- | -------- | | --------------- | ------------------------------------------- | ------ | ---------------------- |
| color | [ResourceColor](ts-types.md#resourcecolor8) | Black | 设置二维码颜色。 | | color | [ResourceColor](ts-types.md#resourcecolor8) | Black | 设置二维码颜色。 |
| backgroundColor | [ResourceColor](ts-types.md#resourcecolor8) | White | 设置二维码的背景颜色。 |
## 事件 ## 事件
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## 接口 ## 接口
Slider(options?: {value?: number, min?: number, max?: number, step?: number, style?: SliderStyle, direction?: Axis, reverse?: boolean}) Slider(options?:{value?: number, min?: number, max?: number, step?: number, style?: SliderStyle, direction?: Axis, reverse?: boolean})
**参数:** **参数:**
...@@ -52,6 +52,8 @@ Slider(options?: {value?: number, min?: number, max?: number, step?: number, st ...@@ -52,6 +52,8 @@ Slider(options?: {value?: number, min?: number, max?: number, step?: number, st
| showSteps | boolean | false | 设置当前是否显示步长刻度值。 | | showSteps | boolean | false | 设置当前是否显示步长刻度值。 |
| showTips | boolean | false | 设置滑动时是否显示气泡提示百分比。 | | showTips | boolean | false | 设置滑动时是否显示气泡提示百分比。 |
| trackThickness | [Length](ts-types.md#length) | - | 设置滑轨的粗细。 | | trackThickness | [Length](ts-types.md#length) | - | 设置滑轨的粗细。 |
| maxLabel | string | - | 设置最大标号时使用。 |
| minLabel | string | - | 设置最小标号时使用。 |
## 事件 ## 事件
......
...@@ -34,7 +34,7 @@ Span(content: string | Resource) ...@@ -34,7 +34,7 @@ Span(content: string | Resource)
| 名称 | 参数类型 | 默认值 | 描述 | | 名称 | 参数类型 | 默认值 | 描述 |
| ---------- | ---------------------------------------- | ---------------------------------------- | -------------- | | ---------- | ---------------------------------------- | ---------------------------------------- | -------------- |
| decoration | {<br/>type:&nbsp;[TextDecorationType](ts-appendix-enums.md#textdecorationtype枚举说明),<br/>color?:&nbsp;[ResourceColor](ts-types.md#resourcecolor8)<br/>} | {<br/>type:&nbsp;TextDecorationType.None<br/>color:Color.Black<br/>} | 设置文本装饰线样式及其颜色。 | | decoration | {<br/>type:&nbsp;[TextDecorationType](ts-appendix-enums.md#textdecorationtype枚举说明),<br/>color?:&nbsp;[ResourceColor](ts-types.md#resourcecolor8)<br/>} | {<br/>type:&nbsp;TextDecorationType.None<br/>color:Color.Black<br/>} | 设置文本装饰线样式及其颜色。 |
| letterSpacing | number\|string | - | 设置文本字符间距。 | | letterSpacing | number \| string | - | 设置文本字符间距。 |
| textCase | [TextCase](ts-appendix-enums.md#textcase枚举说明) | Normal | 设置文本大小写。 | | textCase | [TextCase](ts-appendix-enums.md#textcase枚举说明) | Normal | 设置文本大小写。 |
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## 接口 ## 接口
TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: TextInputController}) TextInput(value?:{placeholder?: [ResourceStr](ts-types.md#resourcestr8), text?: [ResourceStr](ts-types.md#resourcestr8), controller?: TextInputController})
**参数:** **参数:**
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## 接口 ## 接口
TextPicker(options?: {range: string[]|Resource, selected?: number, value?: string}) TextPicker(options?: {range: string[] | [Resource](ts-types.md#resource), selected?: number, value?: string})
根据range指定的选择范围创建文本选择器。 根据range指定的选择范围创建文本选择器。
...@@ -27,21 +27,21 @@ TextPicker(options?: {range: string[]|Resource, selected?: number, value?: strin ...@@ -27,21 +27,21 @@ TextPicker(options?: {range: string[]|Resource, selected?: number, value?: strin
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | ---- | ----- | --------------- | | -------- | -------- | ---- | ----- | --------------- |
| range | string[]&nbsp;\|&nbsp;Resource | 是 | - | 选择器的数据选择范围。 | | range | string[]&nbsp;\|&nbsp;[Resource](ts-types.md#resource) | 是 | - | 选择器的数据选择范围。 |
| selected | number | 否 | 0 | 选中项在数组中的index值。 | | selected | number | 否 | 0 | 选中项在数组中的index值。 |
| value | string | 否 | 第一个元素值 | 选中项的值,优先级低于selected。 | | value | string | 否 | 第一个元素值 | 选中项的值,优先级低于selected。 |
## 属性 ## 属性
| 名称 | 参数类型 | 默认值 | 描述 | | 名称 | 参数类型 | 默认值 | 描述 |
| ----------------------- | -------------- | ------ | -------------------------- | | ----------------------- | ---------------- | ------ | -------------------------- |
| defaultPickerItemHeight | number\|string | - | 默认Picker内容项元素高度。 | | defaultPickerItemHeight | number \| string | - | 默认Picker内容项元素高度。 |
## 事件 ## 事件
| 名称 | 描述 | | 名称 | 描述 |
| ---------------------------------------- | ---------------------------------------- | | ------------------------------------------------------------ | ------------------------------------------------------------ |
| onChange(callback:&nbsp;(value:&nbsp;string,&nbsp;index:&nbsp;number)&nbsp;=&gt;&nbsp;void) | 滑动选中TextPicker文本内容后,触发该回调。<br/>-&nbsp;value:&nbsp;当前选中项的文本。<br/>-&nbsp;index:&nbsp;当前选中项的下标。 | | onChange(callback:&nbsp;(value:&nbsp;string,&nbsp;index:&nbsp;number)&nbsp;=&gt;&nbsp;void) | 滑动选中TextPicker文本内容后,触发该回调。<br/>-&nbsp;value:&nbsp;当前选中项的文本。<br/>-&nbsp;index:&nbsp;当前选中项的下标。 |
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## 接口 ## 接口
TimePicker( options?: { selected?: Data }) TimePicker(options?: {selected?: Date})
默认以00:00至23:59的时间区间创建滑动选择器。 默认以00:00至23:59的时间区间创建滑动选择器。
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## 接口 ## 接口
Row(value?:{space?: string&nbsp;|&nbsp;number }) Row(value?:{space?: string&nbsp;|&nbsp;number})
**参数:** **参数:**
......
...@@ -36,10 +36,11 @@ Scroll(scroller?: Scroller) ...@@ -36,10 +36,11 @@ Scroll(scroller?: Scroller)
## ScrollDirection枚举说明 ## ScrollDirection枚举说明
| 名称 | 描述 | | 名称 | 描述 |
| ---------- | ---------- | | ---------- | ------------------------ |
| Horizontal | 仅支持水平方向滚动。 | | Horizontal | 仅支持水平方向滚动。 |
| Vertical | 仅支持竖直方向滚动。 | | Vertical | 仅支持竖直方向滚动。 |
| None | 不可滚动。 | | None | 不可滚动。 |
| Free | 支持竖直或水平方向滚动。 |
## 事件 ## 事件
......
...@@ -42,7 +42,7 @@ Swiper(value?:{controller?: SwiperController}) ...@@ -42,7 +42,7 @@ Swiper(value?:{controller?: SwiperController})
| loop | boolean | true | 是否开启循环。<br> 设置为true时表示开启循环,在LazyForEach懒循环加载模式下,加载的组件数量建议大于5个。 | | loop | boolean | true | 是否开启循环。<br> 设置为true时表示开启循环,在LazyForEach懒循环加载模式下,加载的组件数量建议大于5个。 |
| duration | number | 400 | 子组件切换的动画时长,单位为毫秒。 | | duration | number | 400 | 子组件切换的动画时长,单位为毫秒。 |
| vertical | boolean | false | 是否为纵向滑动。 | | vertical | boolean | false | 是否为纵向滑动。 |
| itemSpace | number&nbsp;\|&nbsp;string | 0 | 设置子组件与子组件之间间隙。 | | itemSpace | number \| string | 0 | 设置子组件与子组件之间间隙。 |
| displayMode | SwiperDisplayMode | SwiperDisplayMode.Stretch | 设置子组件显示模式。 | | displayMode | SwiperDisplayMode | SwiperDisplayMode.Stretch | 设置子组件显示模式。 |
| cachedCount<sup>8+</sup> | number | 1 | 设置预加载子组件个数。 | | cachedCount<sup>8+</sup> | number | 1 | 设置预加载子组件个数。 |
| disableSwipe<sup>8+</sup> | boolean | false | 禁用组件滑动切换功能。 | | disableSwipe<sup>8+</sup> | boolean | false | 禁用组件滑动切换功能。 |
......
...@@ -59,8 +59,8 @@ Tabs(value: {barPosition?: BarPosition, index?: number, controller?: [TabsContro ...@@ -59,8 +59,8 @@ Tabs(value: {barPosition?: BarPosition, index?: number, controller?: [TabsContro
## 事件 ## 事件
| 名称 | 功能描述 | | 名称 | 功能描述 |
| ------------------------------------------------------------ | ------------------------- | | ------------------------------------------------------------ | -------------------------------------------------------- |
| onChange(event:&nbsp;(index:&nbsp;number)&nbsp;=&gt;&nbsp;void) | Tab页签切换后触发的事件。 | | onChange(event:&nbsp;(index:&nbsp;number)&nbsp;=&gt;&nbsp;void) | Tab页签切换后触发的事件。<br/>- index: tab标签的索引值。 |
## TabsController ## TabsController
...@@ -70,7 +70,6 @@ Tabs组件的控制器,用于控制Tabs组件进行页签切换。 ...@@ -70,7 +70,6 @@ Tabs组件的控制器,用于控制Tabs组件进行页签切换。
``` ```
controller: TabsController = new TabsController() controller: TabsController = new TabsController()
``` ```
### changeIndex ### changeIndex
...@@ -82,7 +81,7 @@ changeIndex(value: number): void ...@@ -82,7 +81,7 @@ changeIndex(value: number): void
**参数:** **参数:**
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ----- | ------ | ---- | ---- | --------------------- | | ------ | -------- | ---- | ------ | ------------------------------------- |
| value | number | 是 | - | 页签在Tabs里的索引值,索引值从0开始。 | | value | number | 是 | - | 页签在Tabs里的索引值,索引值从0开始。 |
## 示例 ## 示例
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## 接口 ## 接口
Polygon(value?:{width: string&nbsp;|&nbsp;number, height: string&nbsp;|&nbsp;number}) Polygon(value?:{width?: string&nbsp;|&nbsp;number, height?: string&nbsp;|&nbsp;number})
**参数:** **参数:**
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
## 接口 ## 接口
Polyline(value?: {width: string&nbsp;|&nbsp;number, height: string&nbsp;|&nbsp;number}) Polyline(value?: {width?: string&nbsp;|&nbsp;number, height?: string&nbsp;|&nbsp;number})
**参数:** **参数:**
......
...@@ -20,17 +20,17 @@ ...@@ -20,17 +20,17 @@
## 接口 ## 接口
Rect(value:{width: string&nbsp;|&nbsp;number,height: string&nbsp;|&nbsp;number,radius?: string&nbsp;|&nbsp;number | Array&lt;any&gt;} | {width: string&nbsp;|&nbsp;number,height: string&nbsp;|&nbsp;number,radiusWidth?: string&nbsp;|&nbsp;number,radiusHeight?: string&nbsp;|&nbsp;number}) Rect(value:{value?: {width?: number&nbsp;|&nbsp;string&nbsp;,height?: number&nbsp;|&nbsp;string&nbsp;,radius?: number&nbsp;|&nbsp;string&nbsp;| Array&lt;Length&gt;} | {width?: number&nbsp;|&nbsp;string&nbsp;,height?: number&nbsp;|&nbsp;string&nbsp;,radiusWidth?: number&nbsp;|&nbsp;string&nbsp;,radiusHeight?: number&nbsp;|&nbsp;string&nbsp;}})
**options参数说明:** **options参数说明:**
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------------ | ------------------------------------ | ---- | ------ | ---------------------------------------- | | ------------ | ----------------------------------------------------------- | ---- | ------ | ---------------------------------------- |
| width | string&nbsp;\|&nbsp;number | 是 | - | 宽度。 | | width | number&nbsp;\|&nbsp;string | 是 | - | 宽度。 |
| height | string&nbsp;\|&nbsp;number | 是 | - | 高度。 | | height | number&nbsp;\|&nbsp;string | 是 | - | 高度。 |
| radius | Length&nbsp;\|&nbsp;Array&lt;any&gt; | 否 | 0 | 圆角半径,支持分别设置四个角的圆角度数。 | | radius | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;Array&lt;any&gt; | 否 | 0 | 圆角半径,支持分别设置四个角的圆角度数。 |
| radiusWidth | string&nbsp;\|&nbsp;number | 否 | 0 | 圆角宽度。 | | radiusWidth | number&nbsp;\|&nbsp;string | 否 | 0 | 圆角宽度。 |
| radiusHeight | string&nbsp;\|&nbsp;number | 否 | 0 | 圆角高度。 | | radiusHeight | number&nbsp;\|&nbsp;string | 否 | 0 | 圆角高度。 |
## 属性 ## 属性
......
...@@ -28,24 +28,26 @@ Shape(value?: {target?: PixelMap}) ...@@ -28,24 +28,26 @@ Shape(value?: {target?: PixelMap})
**参数:** **参数:**
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------ | -------- | ---- | ---- | ---------------------------------------- | | ------ | -------- | ---- | ------ | ------------------------------------------------------------ |
| target | PixelMap | 否 | null | 绘制目标,可将图形绘制在指定的PixelMap对象中,若未设置,则在当前绘制目标中进行绘制。 | | target | PixelMap | 否 | null | 绘制目标,可将图形绘制在指定的PixelMap对象中,若未设置,则在当前绘制目标中进行绘制。 |
## 属性 ## 属性
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | | 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| ---------------- | ------------------------------------------------------------ | ------------------- | ---- | ------------------------ | | ---------------- | ------------------------------------------------------------ | ------------------- | ---- | -------------------------- |
| viewPort | {<br/>x:&nbsp;string&nbsp;\|&nbsp;number,<br/>y:&nbsp;string&nbsp;\|&nbsp;number,<br/>width:&nbsp;string&nbsp;\|&nbsp;number,<br/>height:&nbsp;string&nbsp;\|&nbsp;number<br/>} | - | 是 | 形状的视口。 | | viewPort | {<br/>x?:&nbsp;[Length](ts-types.md#length),<br/>y?:&nbsp;&nbsp;[Length](ts-types.md#length),<br/>width?:&nbsp;&nbsp;[Length](ts-types.md#length),<br/>height?:&nbsp;&nbsp;[Length](ts-types.md#length)<br/>} | - | 是 | 形状的视口。 |
| fill | [ResourceColor](ts-types.md#resourcecolor8) | Black | 否 | 填充颜色。 | | fill | [ResourceColor](ts-types.md#resourcecolor8) | Black | 否 | 填充颜色。 |
| stroke | [ResourceColor](ts-types.md#resourcecolor8) | - | 否 | 边框颜色。 | | stroke | [ResourceColor](ts-types.md#resourcecolor8) | - | 否 | 边框颜色。 |
| strokeDashArray | Array&lt;any&gt; | [] | 否 | 设置边框的间隙。 | | strokeDashArray | Array&lt;any&gt; | [] | 否 | 设置边框的间隙。 |
| strokeDashOffset | string&nbsp;\|&nbsp;number | 0 | 否 | 边框绘制起点的偏移量。 | | strokeDashOffset | number \| string | 0 | 否 | 边框绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 路径端点绘制样式。 | | strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 路径端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 边框拐角绘制样式。 | | strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 边框拐角绘制样式。 |
| strokeMiterLimit | number | 4 | 否 | 锐角绘制成斜角的极限值。 | | strokeMiterLimit | number&nbsp;\|&nbsp;string | 4 | 否 | 锐角绘制成斜角的极限值。 |
| strokeOpacity | number&nbsp;\|&nbsp;string&nbsp;\|[Resource](ts-types.md#resource) | 1 | 否 | 设置边框的不透明度。 | | strokeOpacity | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;[Resource](ts-types.md#resource) | 1 | 否 | 设置边框的不透明度。 |
| strokeWidth | string&nbsp;\|&nbsp;number | 1 | 否 | 设置边框的宽度。 | | strokeWidth | number&nbsp;\|&nbsp;string | 1 | 否 | 设置边框的宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿。 | | antiAlias | boolean | true | 否 | 是否开启抗锯齿。 |
| mesh | Array&lt;any&gt;,<br/>column:number,<br/>row:number | - | 否 | 绘制网格时调用。 |
| fillOpacity | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;&nbsp;[Resource](ts-types.md#resource) | 1 | 否 | 设置形状填充部分的透明度。 |
## 示例 ## 示例
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册