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

!8606 update docs

Merge pull request !8606 from 关明月/OpenHarmony-3.1-Release
......@@ -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
| fromStart | boolean | 否 | true | 设置文本从头开始滚动或反向滚动。 |
| src | string | 是 | - | 需要滚动的文本。 |
## 属性
| 名称 | 参数类型 | 默认值 | 描述 |
| ---------- | -------- | ------ | ------------------ |
| allowScale | boolean | false | 是否允许文本缩放。 |
## 事件
| 名称 | 功能描述 |
......
......@@ -32,7 +32,7 @@ Navigation()
| subtitle | string | - | 页面副标题。 |
| menus | Array<NavigationMenuItem&gt;&nbsp;\|&nbsp;[CustomBuilder](ts-types.md#custombuilder8)<sup>8+</sup> | - | 页面右上角菜单。 |
| 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;显示工具栏。 |
| hideTitleBar | boolean | false | 隐藏标题栏。 |
| hideBackButton | boolean | false | 隐藏返回键。 |
......
......@@ -19,18 +19,18 @@
## 接口
Progress(options: {value: number, total?: number, style?: ProgressStyle, type?: ProgressType})
Progress(options: {value: number, total?: number, style?: ProgressStyle, type?: ProgressType})
创建进度组件,用于显示内容加载或操作处理进度。
**参数:**
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------ | ------------- | ---- | -------------------- | ---------------- |
| value | number | 是 | - | 指定当前进度值。 |
| total | number | 否 | 100 | 指定进度总长。 |
| type | ProgressType | 否 | ProgressType.Linear | 指定进度条样式。 |
| style | ProgressStyle | 否 | ProgressStyle.Linear | 指定进度条样式。 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------------------------- | ------------- | ---- | -------------------- | --------------------------------------------------- |
| value | number | 是 | - | 指定当前进度值。 |
| total | number | 否 | 100 | 指定进度总长。 |
| type<sup>8+</sup> | ProgressType | 否 | ProgressType.Linear | 指定进度条类型。 |
| style<sup>deprecated</sup> | ProgressStyle | 否 | ProgressStyle.Linear | 指定进度条样式。<br/>该参数从API Version8开始废弃。 |
## ProgressType枚举说明
......
......@@ -29,9 +29,10 @@ 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 @@
## 接口
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
| showSteps | boolean | false | 设置当前是否显示步长刻度值。 |
| showTips | boolean | false | 设置滑动时是否显示气泡提示百分比。 |
| trackThickness | [Length](ts-types.md#length) | - | 设置滑轨的粗细。 |
| maxLabel | string | - | 设置最大标号时使用。 |
| minLabel | string | - | 设置最小标号时使用。 |
## 事件
......
......@@ -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/>} | 设置文本装饰线样式及其颜色。 |
| letterSpacing | number\|string | - | 设置文本字符间距。 |
| letterSpacing | number \| string | - | 设置文本字符间距。 |
| textCase | [TextCase](ts-appendix-enums.md#textcase枚举说明) | Normal | 设置文本大小写。 |
......
......@@ -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})
**参数:**
......@@ -37,7 +37,7 @@ TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Te
| ----------------------------- | ------------------------------------------------------------ | ----------------- | ------------------------------------------------------------ |
| type | InputType | InputType.Normal | 设置输入框类型。 |
| placeholderColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置placeholder颜色。 |
| placeholderFont | [Font](ts-types.md#font) | - | 设置placeholder文本样式:<br/>-&nbsp;size:&nbsp;设置文本尺寸,Length为number类型时,使用fp单位。<br/>-&nbsp;weight:&nbsp;设置文本的字体粗细,number类型取值[100,&nbsp;900],取值间隔为100,默认为400,取值越大,字体越粗。<br/>-&nbsp;family:&nbsp;设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial,&nbsp;sans-serif'。<br/>-&nbsp;style:&nbsp;设置文本的字体样式。 |
| placeholderFont | [Font](ts-types.md#font) | - | 设置placeholder文本样式:<br/>-&nbsp;size:&nbsp;设置文本尺寸,Length为number类型时,使用fp单位。<br/>-&nbsp;weight:&nbsp;设置文本的字体粗细,number类型取值[100,&nbsp;900],取值间隔为100,默认为400,取值越大,字体越粗。<br/>-&nbsp;family:&nbsp;设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial,&nbsp;sans-serif'。<br/>-&nbsp;style:&nbsp;设置文本的字体样式。 |
| enterKeyType | EnterKeyType | EnterKeyType.Done | 设置输入法回车键类型。 |
| caretColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置输入框光标颜色。 |
| maxLength | number | - | 设置文本的最大输入字符数。 |
......
......@@ -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指定的选择范围创建文本选择器。
......@@ -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值。 |
| 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;当前选中项的下标。 |
......
......@@ -19,7 +19,7 @@
## 接口
TimePicker( options?: { selected?: Data })
TimePicker(options?: {selected?: Date})
默认以00:00至23:59的时间区间创建滑动选择器。
......
......@@ -19,7 +19,7 @@
## 接口
Row(value?:{space?: string&nbsp;|&nbsp;number })
Row(value?:{space?: string&nbsp;|&nbsp;number})
**参数:**
......
......@@ -35,11 +35,12 @@ Scroll(scroller?: Scroller)
## ScrollDirection枚举说明
| 名称 | 描述 |
| ---------- | ---------- |
| Horizontal | 仅支持水平方向滚动。 |
| Vertical | 仅支持竖直方向滚动。 |
| None | 不可滚动。 |
| 名称 | 描述 |
| ---------- | ------------------------ |
| Horizontal | 仅支持水平方向滚动。 |
| Vertical | 仅支持竖直方向滚动。 |
| None | 不可滚动。 |
| Free | 支持竖直或水平方向滚动。 |
## 事件
......
......@@ -42,7 +42,7 @@ Swiper(value?:{controller?: SwiperController})
| loop | boolean | true | 是否开启循环。<br> 设置为true时表示开启循环,在LazyForEach懒循环加载模式下,加载的组件数量建议大于5个。 |
| duration | number | 400 | 子组件切换的动画时长,单位为毫秒。 |
| vertical | boolean | false | 是否为纵向滑动。 |
| itemSpace | number&nbsp;\|&nbsp;string | 0 | 设置子组件与子组件之间间隙。 |
| itemSpace | number \| string | 0 | 设置子组件与子组件之间间隙。 |
| displayMode | SwiperDisplayMode | SwiperDisplayMode.Stretch | 设置子组件显示模式。 |
| cachedCount<sup>8+</sup> | number | 1 | 设置预加载子组件个数。 |
| disableSwipe<sup>8+</sup> | boolean | false | 禁用组件滑动切换功能。 |
......
......@@ -46,7 +46,7 @@ Tabs(value: {barPosition?: BarPosition, index?: number, controller?: [TabsContro
| scrollable | boolean | true | 设置为true时可以通过滑动页面进行页面切换,为false时不可滑动切换页面。 |
| barMode | BarMode | BarMode.Fixed | TabBar布局模式,具体描述见BarMode枚举说明。 |
| barWidth | [Length](ts-types.md#length) | - | TabBar的宽度值。 |
| barHeight | [Length](ts-types.md#length) | - | TabBar的高度值。 |
| barHeight | [Length](ts-types.md#length) | - | TabBar的高度值。 |
| animationDuration | number | 200 | TabContent滑动动画时长。 |
## BarMode枚举说明
......@@ -58,9 +58,9 @@ 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
......@@ -70,7 +70,6 @@ Tabs组件的控制器,用于控制Tabs组件进行页签切换。
```
controller: TabsController = new TabsController()
```
### changeIndex
......@@ -81,9 +80,9 @@ changeIndex(value: number): void
**参数:**
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ----- | ------ | ---- | ---- | --------------------- |
| value | number | 是 | - | 页签在Tabs里的索引值,索引值从0开始。 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------ | -------- | ---- | ------ | ------------------------------------- |
| value | number | 是 | - | 页签在Tabs里的索引值,索引值从0开始。 |
## 示例
......
......@@ -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 @@
## 接口
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 @@
## 接口
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参数说明:**
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------------ | ------------------------------------ | ---- | ------ | ---------------------------------------- |
| width | string&nbsp;\|&nbsp;number | 是 | - | 宽度。 |
| height | string&nbsp;\|&nbsp;number | 是 | - | 高度。 |
| radius | Length&nbsp;\|&nbsp;Array&lt;any&gt; | 否 | 0 | 圆角半径,支持分别设置四个角的圆角度数。 |
| radiusWidth | string&nbsp;\|&nbsp;number | 否 | 0 | 圆角宽度。 |
| radiusHeight | string&nbsp;\|&nbsp;number | 否 | 0 | 圆角高度。 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------------ | ----------------------------------------------------------- | ---- | ------ | ---------------------------------------- |
| width | number&nbsp;\|&nbsp;string | 是 | - | 宽度。 |
| height | number&nbsp;\|&nbsp;string | 是 | - | 高度。 |
| radius | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;Array&lt;any&gt; | 否 | 0 | 圆角半径,支持分别设置四个角的圆角度数。 |
| radiusWidth | number&nbsp;\|&nbsp;string | 否 | 0 | 圆角宽度。 |
| radiusHeight | number&nbsp;\|&nbsp;string | 否 | 0 | 圆角高度。 |
## 属性
......
......@@ -27,25 +27,27 @@ 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/>} | - | 是 | 形状的视口。 |
| fill | [ResourceColor](ts-types.md#resourcecolor8) | Black | 否 | 填充颜色。 |
| stroke | [ResourceColor](ts-types.md#resourcecolor8) | - | 否 | 边框颜色。 |
| strokeDashArray | Array&lt;any&gt; | [] | 否 | 设置边框的间隙。 |
| strokeDashOffset | string&nbsp;\|&nbsp;number | 0 | 否 | 边框绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 路径端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 边框拐角绘制样式。 |
| strokeMiterLimit | number | 4 | 否 | 锐角绘制成斜角的极限值。 |
| strokeOpacity | number&nbsp;\|&nbsp;string&nbsp;\|[Resource](ts-types.md#resource) | 1 | 否 | 设置边框的不透明度。 |
| strokeWidth | string&nbsp;\|&nbsp;number | 1 | 否 | 设置边框的宽度。 |
| antiAlias | boolean | true | 否 | 是否开启抗锯齿。 |
| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 |
| ---------------- | ------------------------------------------------------------ | ------------------- | ---- | -------------------------- |
| 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 | 否 | 填充颜色。 |
| stroke | [ResourceColor](ts-types.md#resourcecolor8) | - | 否 | 边框颜色。 |
| strokeDashArray | Array&lt;any&gt; | [] | 否 | 设置边框的间隙。 |
| strokeDashOffset | number \| string | 0 | 否 | 边框绘制起点的偏移量。 |
| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 路径端点绘制样式。 |
| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 边框拐角绘制样式。 |
| strokeMiterLimit | number&nbsp;\|&nbsp;string | 4 | 否 | 锐角绘制成斜角的极限值。 |
| strokeOpacity | number&nbsp;\|&nbsp;string&nbsp;\|&nbsp;[Resource](ts-types.md#resource) | 1 | 否 | 设置边框的不透明度。 |
| strokeWidth | number&nbsp;\|&nbsp;string | 1 | 否 | 设置边框的宽度。 |
| 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.
先完成此消息的编辑!
想要评论请 注册