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

!22577 接口一致性与示例代码正确性整改

Merge pull request !22577 from 田雨/master
......@@ -214,7 +214,7 @@ struct AnimateToExample {
### showAlertDialog
showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons): void
showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions): void
显示警告弹窗组件,可设置文本内容与响应回调。
......@@ -1201,7 +1201,7 @@ try {
### pushNamedRoute
pushNamedRoute(options: router.NamedRouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void
pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void
跳转到指定的命名路由页面。
......@@ -1361,7 +1361,7 @@ replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode):
| 错误码ID | 错误信息 |
| --------- | ------- |
| 100001 | if UI execution context not found, only throw in standard system. |
| 100001 | if can not get the delegate, only throw in standard system. |
| 100004 | if the named route is not exist. |
**示例:**
......@@ -1425,7 +1425,7 @@ router.replaceNamedRoute({
### back
back(options: router.RouterOptions ): void
back(options?: router.RouterOptions ): void
返回上一页面或指定的页面。
......@@ -1435,7 +1435,7 @@ back(options: router.RouterOptions ): void
| 参数名 | 类型 | 必填 | 说明 |
| ------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ |
| options | [router.RouterOptions](js-apis-router.md#routeroptions) | | 返回页面描述信息,其中参数url指路由跳转时会返回到指定url的界面,如果页面栈上没有url页面,则不响应该情况。如果url未设置,则返回上一页,页面不会重新构建,页面栈里面的page不会回收,出栈后会被回收。 |
| options | [router.RouterOptions](js-apis-router.md#routeroptions) | | 返回页面描述信息,其中参数url指路由跳转时会返回到指定url的界面,如果页面栈上没有url页面,则不响应该情况。如果url未设置,则返回上一页,页面不会重新构建,页面栈里面的page不会回收,出栈后会被回收。 |
**示例:**
......@@ -1618,7 +1618,7 @@ try {
### showDialog
showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback<promptAction.ShowDialogSuccessResponse<): void
showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback<promptAction.ShowDialogSuccessResponse>): void
创建并显示对话框,对话框响应结果异步返回。
......
......@@ -175,7 +175,7 @@ struct DragControllerPage {
发起拖拽所需要的属性和拖拽时携带的信息。
| 名称 | 类型 | 必填 | 描述 |
| 名称 | 类型 | 必填 | 说明 |
| ----------- | ------------------------------------------------------ | ---- | ---------------------------------------- |
| pointerId | number | 是 | 设置启动拖拽时屏幕上触摸点的Id。 |
| data | [UDMF.UnifiedData](./js-apis-data-udmf.md#unifieddata) | 否 | 设置拖拽过程中携带的数据。 |
......
......@@ -141,7 +141,7 @@ getBackground(): DrawableDescriptor;
**示例:**
```ts
let resManager = getContext().resourceManager
drawable: DrawableDescriptor = (<LayeredDrawableDescriptor> (resManager.getDrawableDescriptor($r('app.media.icon')
let drawable: DrawableDescriptor = (<LayeredDrawableDescriptor> (resManager.getDrawableDescriptor($r('app.media.icon')
.id))).getBackground();
```
......
......@@ -316,7 +316,7 @@ interpolate(fraction:&nbsp;number): number
```ts
import Curves from '@ohos.curves'
let curve = Curves.initCurve(Curve.EaseIn) // 创建一个默认先慢后快插值曲线
let curveValue = Curves.initCurve(Curve.EaseIn) // 创建一个默认先慢后快插值曲线
let value: number = curve.interpolate(0.5) // 计算得到时间到一半时的插值
```
......
......@@ -2919,7 +2919,7 @@ export default class EntryAbility extends UIAbility {
localWant.moduleName = 'entry';
localWant.abilityName = 'TestAbility';
let option: StartOptions = {
let option = {
displayId: 0
}
......
......@@ -46,7 +46,7 @@ TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Te
| caretStyle<sup>10+</sup> | {<br/>width:&nbsp;[Length](ts-types.md#length)<br/>} | 设置光标风格。 |
| caretPosition<sup>10+</sup> | number | 设置光标位置。 |
| showUnit<sup>10+</sup> | [CustomBuilder](ts-types.md#CustomBuilder8) | 设置控件作为文本框单位。<br/>默认无单位。 |
| showError<sup>10+</sup> | string&nbsp;\|&nbsp;undefined | 设置错误状态下提示的错误文本或者不显示错误状态。<br/>默认不显示错误状态。 |
| showError<sup>10+</sup> | string&nbsp;\|&nbsp;undefined | 设置错误状态下提示的错误文本或者不显示错误状态。<br/>默认不显示错误状态。<br/>**说明:** <br/>当参数类型为string并且输入内容不符合定义规范时,提示错误文本。当参数类型为undefined时,不显示错误状态。请参考[示例2](#示例2) |
| showUnderline<sup>10+</sup> | boolean | 设置是否开启下划线。<br/>默认值:false |
| passwordIcon<sup>10+</sup> | [PasswordIcon](#passwordicon10对象说明) | 密码输入模式时,设置输入框末尾的图标。<br/>默认为系统提供的密码图标。 |
| enableKeyboardOnFocus<sup>10+</sup> | boolean | TextInput获焦时,是否绑定输入法<br/>默认值:true。从API version 10开始,获焦默认绑定输入法。 |
......
......@@ -45,10 +45,12 @@ TimePicker(options?: {selected?: Date})
## TimePickerResult对象说明
| 名称 | 参数类型 | 描述 |
| ------ | ------ | ------- |
| hour | number | 选中时间的时。 |
| minute | number | 选中时间的分。 |
返回值为24小时制时间。
| 名称 | 参数类型 | 描述 |
| ------ | -------- | ----------------------------------- |
| hour | number | 选中时间的时。<br/>取值范围:[0-23] |
| minute | number | 选中时间的分。<br/>取值范围:[0-59] |
## 示例
......
......@@ -19,9 +19,9 @@
| 名称 | 类型 | 描述 |
| ------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| source | string \| [Resource](ts-types.md#resource) \| [linearGradient](ts-universal-attributes-gradient-color.md) | 边框图源或者渐变色设置。<br/>**说明:**<br>边框图源仅适用于容器组件,如Row、Column、Flex,在非容器组件上使用会失效。 |
| slice | [Length](ts-types.md#length) \| [EdgeWidths](ts-types.md#edgewidths9) | 设置边框图片左上角、右上角、左下角以及右下角的切割宽度。<br/>默认值:0<br/>**说明:**<br/>设置负数时取默认值。<br/>参数类型为[Length](ts-types.md#length)时,统一设置四个角的宽高。<br/>参数为[EdgeWidths](ts-types.md#edgewidths9)时:<br/>-&nbsp;Top:设置图片左上角或者右上角被切割的高。<br/>-&nbsp;Bottom:设置图片左下角或者右下角被切割的高。<br/>-&nbsp;Left:设置图片左上角或者左下角被切割的宽。<br/>-&nbsp;Right:设置图片右上角或者右下角被切割的宽。 |
| width | [Length](ts-types.md#length) \| [EdgeWidths](ts-types.md#edgewidths9) | 设置图片边框宽度。<br/>默认值:0<br/>**说明:**<br/>参数类型为[Length](ts-types.md#length)时,统一设置四个角的宽高,设置负数时取默认值。<br/>参数为[EdgeWidths](ts-types.md#edgewidths9)时:<br/>-&nbsp;Top:设置图片边框上边框的宽。<br/>-&nbsp;Bottom:设置图片边框下边框的宽。<br/>-&nbsp;Left:设置图片边框左边框的宽。<br/>-&nbsp;Right:设置图片边框右边框宽。<br/>设置负数时值取1。 |
| outset | [Length](ts-types.md#length) \| [EdgeWidths](ts-types.md#edgewidths9) | 设置边框图片向外延伸距离。<br/>默认值:0<br/>**说明:**<br/>设置负数时取默认值。<br/>参数类型为[Length](ts-types.md#length)时,统一设置四个角的宽高。<br/>参数为[EdgeWidths](ts-types.md#edgewidths9)时:<br/>-&nbsp;Top:设置边框图片上边框向外延伸的距离。<br/>-&nbsp;Bottom:设置边框图片下边框向外延伸的距离。<br/>-&nbsp;Left:设置边框图片左边框向外延伸的距离。<br/>-&nbsp;Right:设置边框图片右边框向外延伸的距离。 |
| slice | [Length](ts-types.md#length) \| [EdgeWidths](ts-types.md#edgewidths9) | 设置边框图片左上角、右上角、左下角以及右下角的切割宽度。<br/>默认值:0<br/>**说明:**<br/>设置负数时取默认值。<br/>参数类型为[Length](ts-types.md#length)时,统一设置四个角的宽高。<br/>参数类型[EdgeWidths](ts-types.md#edgewidths9)时:<br/>-&nbsp;Top:设置图片左上角或者右上角被切割的高。<br/>-&nbsp;Bottom:设置图片左下角或者右下角被切割的高。<br/>-&nbsp;Left:设置图片左上角或者左下角被切割的宽。<br/>-&nbsp;Right:设置图片右上角或者右下角被切割的宽。 |
| width | [Length](ts-types.md#length) \| [EdgeWidths](ts-types.md#edgewidths9) | 设置图片边框宽度。<br/>默认值:0<br/>**说明:**<br/>参数类型为[Length](ts-types.md#length)时,统一设置四个角的宽高,设置负数时取默认值。<br/>参数类型[EdgeWidths](ts-types.md#edgewidths9)时:<br/>-&nbsp;Top:设置图片边框上边框的宽。<br/>-&nbsp;Bottom:设置图片边框下边框的宽。<br/>-&nbsp;Left:设置图片边框左边框的宽。<br/>-&nbsp;Right:设置图片边框右边框宽。<br/>设置负数时值取1。 |
| outset | [Length](ts-types.md#length) \| [EdgeWidths](ts-types.md#edgewidths9) | 设置边框图片向外延伸距离。<br/>默认值:0<br/>**说明:**<br/>设置负数时取默认值。<br/>参数类型为[Length](ts-types.md#length)时,统一设置四个角的宽高。<br/>参数类型[EdgeWidths](ts-types.md#edgewidths9)时:<br/>-&nbsp;Top:设置边框图片上边框向外延伸的距离。<br/>-&nbsp;Bottom:设置边框图片下边框向外延伸的距离。<br/>-&nbsp;Left:设置边框图片左边框向外延伸的距离。<br/>-&nbsp;Right:设置边框图片右边框向外延伸的距离。 |
| repeat | [RepeatMode](#repeatmode枚举说明) | 设置被切割的图片在边框上的重复方式。<br/>默认值:RepeatMode.Stretch |
| fill | boolean | 设置边框图片中心填充。<br/>默认值:false |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册