From 758227faa318a7c7c9a8a8561a590512a9c84988 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Fri, 22 Sep 2023 16:01:48 +0800 Subject: [PATCH] chore: utsApiJson --- docs/.vuepress/utils/utsApiJson.json | 66 ++++++++++++++-------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/docs/.vuepress/utils/utsApiJson.json b/docs/.vuepress/utils/utsApiJson.json index 7aebac63f..061d253b2 100644 --- a/docs/.vuepress/utils/utsApiJson.json +++ b/docs/.vuepress/utils/utsApiJson.json @@ -42,7 +42,7 @@ "$emit": { "name": "## uni.$emit(eventName, args?) @$emit", "description": "\r\n触发自定义事件,附加的参数会传递给事件监听器。\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| eventName | string | 是 | - | - |\n| args | any | 否 | - | 页面间通信接口,用于监听被打开页面发送到当前页面的数据 |\n#### 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| args | 5.0 | √ | x | 10.0 | √ | x |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| eventName | string | 是 | - | - |\n| args | any | 否 | - | - |", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[$emit](http://uniapp.dcloud.io/api/window/communication?id=emit)\n" @@ -98,7 +98,7 @@ "navigateBack": { "name": "## uni.navigateBack(options?) @navigateback", "description": "\r\n关闭当前页面,返回上一页面或多级页面\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [NavigateBackOptions](#navigatebackoptions) | 否 | - | - |\n#### NavigateBackOptions 属性值 @navigatebackoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### NavigateBackOptions 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| success | 5.0 | √ | √ | 10.0 | √ | x |\n| fail | 5.0 | √ | √ | 10.0 | √ | x |\n| complete | 5.0 | √ | √ | 10.0 | √ | x |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [NavigateBackOptions](#navigatebackoptions) | 否 | - | - |\n#### NavigateBackOptions 属性值 @navigatebackoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| delta | number | 否 | - | 返回的页面数,如果 delta 大于现有页面数,则返回到首页 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### NavigateBackOptions 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| delta | 5.0 | √ | √ | 10.0 | √ | x |\n| success | 5.0 | √ | √ | 10.0 | √ | x |\n| fail | 5.0 | √ | √ | 10.0 | √ | x |\n| complete | 5.0 | √ | √ | 10.0 | √ | x |\n", "returnValue": "", "compatibility": "### navigateBack 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 5.0 | √ | √ | 10.0 | √ | x |\n", "tutorial": "\n### 参见\n[navigateBack](http://uniapp.dcloud.io/api/router?id=navigateback)\n" @@ -114,7 +114,7 @@ "setTabBarBadge": { "name": "## uni.setTabBarBadge(options) @settabbarbadge", "description": "\r\n为 tabBar 某一项的右上角添加文本\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [SetTabBarBadgeOptions](#settabbarbadgeoptions) | 是 | - | - |\n#### SetTabBarBadgeOptions 属性值 @settabbarbadgeoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar的哪一项,从左边算起,索引从0开始 |\n| text | string | 是 | - | 显示的文本,不超过 3 个半角字符 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [SetTabBarBadgeOptions](#settabbarbadgeoptions) | 是 | - | - |\n#### SetTabBarBadgeOptions 属性值 @settabbarbadgeoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar的哪一项,从左边算起,索引从0开始 |\n| text | string | 是 | - | 显示的文本,不超过 3 个半角字符 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[setTabBarBadge](http://uniapp.dcloud.io/api/ui/tabbar?id=settabbarbadge)\n" @@ -122,7 +122,7 @@ "removeTabBarBadge": { "name": "## uni.removeTabBarBadge(options) @removetabbarbadge", "description": "\r\n移除 tabBar 某一项右上角的文本\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [RemoveTabBarBadgeOptions](#removetabbarbadgeoptions) | 是 | - | - |\n#### RemoveTabBarBadgeOptions 属性值 @removetabbarbadgeoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar的哪一项,从左边算起,索引从0开始 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [RemoveTabBarBadgeOptions](#removetabbarbadgeoptions) | 是 | - | - |\n#### RemoveTabBarBadgeOptions 属性值 @removetabbarbadgeoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar的哪一项,从左边算起,索引从0开始 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[removeTabBarBadge](http://uniapp.dcloud.io/api/ui/tabbar?id=removetabbarbadge)\n" @@ -130,7 +130,7 @@ "setTabBarItem": { "name": "## uni.setTabBarItem(options) @settabbaritem", "description": "\r\n动态设置 tabBar 某一项的内容\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [SetTabBarItemOptions](#settabbaritemoptions) | 是 | - | - |\n#### SetTabBarItemOptions 属性值 @settabbaritemoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar 的哪一项,从左边算起,索引从0开始 |\n| text | string | 否 | - | tab 上按钮文字 |\n| iconPath | string | 否 | - | 图片路径 |\n| selectedIconPath | string | 否 | - | 选中时的图片路径 |\n| pagePath | string | 否 | - | 页面绝对路径 |\n| iconfont | [SetTabBarItemIconFontOptions](#settabbaritemiconfontoptions) | 否 | - | 字体图标,优先级高于 iconPath |\n| visible | boolean | 否 | - | tab 是否显示 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### SetTabBarItemIconFontOptions 属性值 @settabbaritemiconfontoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| text | string | 是 | - | 字库 Unicode 码 |\n| selectedText | string | 是 | - | 选中后字库 Unicode 码 |\n| fontSize | string | 否 | - | 字体图标字号(px) |\n| color | string | 否 | - | 字体图标颜色 |\n| selectedColor | string | 否 | - | 字体图标选中颜色 |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [SetTabBarItemOptions](#settabbaritemoptions) | 是 | - | - |\n#### SetTabBarItemOptions 属性值 @settabbaritemoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar 的哪一项,从左边算起,索引从0开始 |\n| text | string | 否 | - | tab 上按钮文字 |\n| iconPath | string | 否 | - | 图片路径 |\n| selectedIconPath | string | 否 | - | 选中时的图片路径 |\n| pagePath | string | 否 | - | 页面绝对路径 |\n| iconfont | [SetTabBarItemIconFontOptions](#settabbaritemiconfontoptions) | 否 | - | 字体图标,优先级高于 iconPath |\n| visible | boolean | 否 | - | tab 是否显示 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### SetTabBarItemIconFontOptions 属性值 @settabbaritemiconfontoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| text | string | 是 | - | 字库 Unicode 码 |\n| selectedText | string | 是 | - | 选中后字库 Unicode 码 |\n| fontSize | string | 否 | - | 字体图标字号(px) |\n| color | string | 否 | - | 字体图标颜色 |\n| selectedColor | string | 否 | - | 字体图标选中颜色 |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[setTabBarItem](http://uniapp.dcloud.io/api/ui/tabbar?id=settabbaritem)\n" @@ -138,7 +138,7 @@ "setTabBarStyle": { "name": "## uni.setTabBarStyle(options) @settabbarstyle", "description": "\r\n动态设置 tabBar 的整体样式\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [SetTabBarStyleOptions](#settabbarstyleoptions) | 是 | - | - |\n#### SetTabBarStyleOptions 属性值 @settabbarstyleoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| color | string | 否 | - | tab 上的文字默认颜色 |\n| selectedColor | string | 否 | - | tab 上的文字选中时的颜色 {HBuilderX.ColorString} |\n| backgroundColor | string | 否 | - | tab 的背景色 |\n| backgroundImage | string | 否 | - | 图片背景 |\n| backgroundRepeat | string | 否 | - | 背景图平铺方式 |\n| borderStyle | string | 否 | - | tabbar上边框的颜色 |\n| midButton | [MidButtonOptions](#midbuttonoptions) | 否 | - | tabbar 中间按钮 仅在 list 项为偶数时有效 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### MidButtonOptions 属性值 @midbuttonoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| width | string | 否 | - | 中间按钮的宽度,tabBar 其它项为减去此宽度后平分,默认值为与其它项平分宽度。默认 80px |\n| height | string | 否 | - | 中间按钮的高度,可以大于 tabBar 高度,达到中间凸起的效果。默认 50px |\n| text | string | 否 | - | 中间按钮的文字 |\n| iconPath | string | 否 | - | 中间按钮的图片路径 |\n| iconWidth | string | 否 | - | 图片宽度(高度等比例缩放)。默认 24px |\n| backgroundImage | string | 否 | - | 中间按钮的背景图片路径 |\n| iconfont | [MidButtonIconFont](#midbuttoniconfont) | 否 | - | 字体图标,优先级高于 iconPath |\n\n###### MidButtonIconFont 属性值 @midbuttoniconfont \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| text | string | 否 | - | 字库 Unicode 码 |\n| selectedText | string | 否 | - | 选中后字库 Unicode 码 |\n| fontSize | string | 否 | - | 字体图标字号(px) |\n| color | string | 否 | - | 字体图标颜色 |\n| selectedColor | string | 否 | - | 字体图标选中颜色 |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [SetTabBarStyleOptions](#settabbarstyleoptions) | 是 | - | - |\n#### SetTabBarStyleOptions 属性值 @settabbarstyleoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| color | string | 否 | - | tab 上的文字默认颜色 |\n| selectedColor | string | 否 | - | tab 上的文字选中时的颜色 {HBuilderX.ColorString} |\n| backgroundColor | string | 否 | - | tab 的背景色 |\n| backgroundImage | string | 否 | - | 图片背景 |\n| backgroundRepeat | string | 否 | - | 背景图平铺方式 |\n| borderStyle | string | 否 | - | tabbar上边框的颜色 |\n| midButton | [MidButtonOptions](#midbuttonoptions) | 否 | - | tabbar 中间按钮 仅在 list 项为偶数时有效 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### MidButtonOptions 属性值 @midbuttonoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| width | string | 否 | - | 中间按钮的宽度,tabBar 其它项为减去此宽度后平分,默认值为与其它项平分宽度。默认 80px |\n| height | string | 否 | - | 中间按钮的高度,可以大于 tabBar 高度,达到中间凸起的效果。默认 50px |\n| text | string | 否 | - | 中间按钮的文字 |\n| iconPath | string | 否 | - | 中间按钮的图片路径 |\n| iconWidth | string | 否 | - | 图片宽度(高度等比例缩放)。默认 24px |\n| backgroundImage | string | 否 | - | 中间按钮的背景图片路径 |\n| iconfont | [MidButtonIconFont](#midbuttoniconfont) | 否 | - | 字体图标,优先级高于 iconPath |\n\n###### MidButtonIconFont 属性值 @midbuttoniconfont \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| text | string | 否 | - | 字库 Unicode 码 |\n| selectedText | string | 否 | - | 选中后字库 Unicode 码 |\n| fontSize | string | 否 | - | 字体图标字号(px) |\n| color | string | 否 | - | 字体图标颜色 |\n| selectedColor | string | 否 | - | 字体图标选中颜色 |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[setTabBarStyle](http://uniapp.dcloud.io/api/ui/tabbar?id=settabbarstyle)\n" @@ -146,7 +146,7 @@ "hideTabBar": { "name": "## uni.hideTabBar(options?) @hidetabbar", "description": "\r\n隐藏 tabBar\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [HideTabBarOptions](#hidetabbaroptions) | 否 | - | - |\n#### HideTabBarOptions 属性值 @hidetabbaroptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| animation | boolean | 否 | - | 是否需要动画效果 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [HideTabBarOptions](#hidetabbaroptions) | 否 | - | - |\n#### HideTabBarOptions 属性值 @hidetabbaroptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| animation | boolean | 否 | - | 是否需要动画效果 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[hideTabBar](http://uniapp.dcloud.io/api/ui/tabbar?id=hidetabbar)\n" @@ -154,7 +154,7 @@ "showTabBar": { "name": "## uni.showTabBar(options?) @showtabbar", "description": "\r\n显示 tabBar\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowTabBarOptions](#showtabbaroptions) | 否 | - | - |\n#### ShowTabBarOptions 属性值 @showtabbaroptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| animation | boolean | 否 | - | 是否需要动画效果 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowTabBarOptions](#showtabbaroptions) | 否 | - | - |\n#### ShowTabBarOptions 属性值 @showtabbaroptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| animation | boolean | 否 | - | 是否需要动画效果 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[showTabBar](http://uniapp.dcloud.io/api/ui/tabbar?id=showtabbar)\n" @@ -162,7 +162,7 @@ "showTabBarRedDot": { "name": "## uni.showTabBarRedDot(options) @showtabbarreddot", "description": "\r\n显示 tabBar 某一项的右上角的红点\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowTabBarRedDotOptions](#showtabbarreddotoptions) | 是 | - | - |\n#### ShowTabBarRedDotOptions 属性值 @showtabbarreddotoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar的哪一项,从左边算起,索引从0开始 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowTabBarRedDotOptions](#showtabbarreddotoptions) | 是 | - | - |\n#### ShowTabBarRedDotOptions 属性值 @showtabbarreddotoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar的哪一项,从左边算起,索引从0开始 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[showTabBarRedDot](http://uniapp.dcloud.io/api/ui/tabbar?id=showtabbarreddot)\n" @@ -170,7 +170,7 @@ "hideTabBarRedDot": { "name": "## uni.hideTabBarRedDot(options) @hidetabbarreddot", "description": "\r\n隐藏 tabBar 某一项的右上角的红点\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [HideTabBarRedDotOptions](#hidetabbarreddotoptions) | 是 | - | - |\n#### HideTabBarRedDotOptions 属性值 @hidetabbarreddotoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar的哪一项,从左边算起,索引从0开始 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [HideTabBarRedDotOptions](#hidetabbarreddotoptions) | 是 | - | - |\n#### HideTabBarRedDotOptions 属性值 @hidetabbarreddotoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| index | number | 是 | - | tabBar的哪一项,从左边算起,索引从0开始 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [SetTabBarError](#settabbarerror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### SetTabBarError 属性值 @settabbarerror \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | SetTabBarErrCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| errMsg | string | 是 | - | 统一错误描述信息 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| name | string | 是 | - | - |\n| message | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[hideTabBarRedDot](http://uniapp.dcloud.io/api/ui/tabbar?id=hidetabbarreddot)\n" @@ -186,7 +186,7 @@ "pageScrollTo": { "name": "## uni.pageScrollTo(options) @pagescrollto", "description": "\r\n将页面滚动到目标位置\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [PageScrollToOptions](#pagescrolltooptions) | 是 | - | - |\n#### PageScrollToOptions 属性值 @pagescrolltooptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [PageScrollToOptions](#pagescrolltooptions) | 是 | - | - |\n#### PageScrollToOptions 属性值 @pagescrolltooptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| scrollTop | number | 否 | - | 滚动到页面的目标位置 |\n| selector | string | 否 | - | 选择器 |\n| offsetTop | number | 否 | - | 偏移距离,可以滚动到 selector 加偏移距离的位置 |\n| duration | number | 否 | - | 滚动动画的时长 |\n| success | (result: [AsyncApiSuccessResult](#asyncapisuccessresult)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: [AsyncApiResult](#asyncapiresult)) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### AsyncApiSuccessResult 属性值 @asyncapisuccessresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### AsyncApiResult 属性值 @asyncapiresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "", "tutorial": "\n### 参见\n[pageScrollTo](http://uniapp.dcloud.io/api/ui/scroll?id=pagescrollto)\n" @@ -194,7 +194,7 @@ "request": { "name": "## uni.request(param) @request", "description": "发起网络请求。", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| param | [RequestOptions\\](#requestoptions) | 是 | - | 网络请求参数 |\n#### RequestOptions\\ 属性值 @requestoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| url | string | 是 | - | 开发者服务器接口地址 |\n| header | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | HTTP 请求 Header,header 中不能设置 Referer |\n| method | string | 否 | \"GET\" | 请求类型 默认值GET\t GET\\|POST\\|PUT\\|DELETE\\|HEAD\\|OPTIONS |\n| sslVerify | boolean | 否 | - | 是否返回节点 id |\n| withCredentials | boolean | 否 | - | 是否返回节点 id |\n| firstIpv4 | boolean | 否 | - | 是否返回节点 id |\n| success | (option: [RequestSuccess\\](#requestsuccess)) => void | 否 | null | 网络请求成功回调。 |\n| fail | (option: [RequestFail](#requestfail)) => void | 否 | null | 网络请求失败回调。 |\n| complete | (option: any) => void | 否 | null | 网络请求完成回调,成功或者失败都会调用。 |\n\n##### RequestSuccess\\ 属性值 @requestsuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| data | any | 否 | - | 开发者服务器返回的数据 |\n| statusCode | number | 是 | - | 开发者服务器返回的 HTTP 状态码 |\n| header | any | 是 | - | 开发者服务器返回的 HTTP Response Header |\n| cookies | Array\\ | 是 | - | - |\n\n##### RequestFail 属性值 @requestfail \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | RequestErrorCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| param | [RequestOptions\\](#requestoptions) | 是 | - | 网络请求参数 |\n#### RequestOptions\\ 属性值 @requestoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| url | string | 是 | - | 开发者服务器接口地址 |\n| data | any | 否 | null | 请求的参数 Object\\|String类型 |\n| header | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | 设置请求的 header,header 中不能设置 Referer |\n| method | string | 否 | \"GET\" | 请求类型 默认值GET\t GET\\|POST\\|PUT\\|DELETE\\|HEAD\\|OPTIONS |\n| timeout | number | 否 | 60000 | 超时时间,单位 ms |\n| dataType | string | 否 | \"json\" | 如果设为 json,会对返回的数据进行一次 JSON.parse,非 json 不会进行 JSON.parse |\n| responseType | string | 否 | - | 设置响应的数据类型。 |\n| sslVerify | boolean | 否 | - | 验证 ssl 证书 |\n| firstIpv4 | boolean | 否 | false | DNS解析时优先使用ipv4 |\n| success | (option: [RequestSuccess\\](#requestsuccess)) => void | 否 | null | 网络请求成功回调。 |\n| fail | (option: [RequestFail](#requestfail)) => void | 否 | null | 网络请求失败回调。 |\n| complete | (option: any) => void | 否 | null | 网络请求完成回调,成功或者失败都会调用。 |\n\n##### RequestSuccess\\ 属性值 @requestsuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| data | any | 否 | - | 开发者服务器返回的数据 |\n| statusCode | number | 是 | - | 开发者服务器返回的 HTTP 状态码 |\n| header | any | 是 | - | 开发者服务器返回的 HTTP Response Header |\n| cookies | Array\\ | 是 | - | 开发者服务器返回的 cookies,格式为字符串数组 |\n\n##### RequestFail 属性值 @requestfail \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | RequestErrorCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | - | - |\n", "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [RequestTask](#requesttask) | \n\n#### RequestTask 属性值 @requesttask \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| abort | () => void | 是 | - | 中断网络请求。 |\n\n##### RequestTask 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| abort | 4.4 | √ | 3.9.0 | 9.0 | √ | 3.9.0 |\n", "compatibility": "### request 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | 9.0 | √ | 3.9.0 |\n", "tutorial": "\n### 参见\n[request](https://uniapp.dcloud.net.cn/api/request/request.html)\n" @@ -202,7 +202,7 @@ "uploadFile": { "name": "## uni.uploadFile(options) @uploadfile", "description": "将本地资源上传到开发者服务器。", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [UploadFileOptions](#uploadfileoptions) | 是 | - | - |\n#### UploadFileOptions 属性值 @uploadfileoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| url | string | 是 | - | 开发者服务器 url |\n| files | Array\\<[UploadFileOptionFiles](#uploadfileoptionfiles)\\> | 否 | null | 需要上传的文件列表。 |\n| header | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | HTTP 请求 Header,header 中不能设置 Referer |\n| formData | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | HTTP 请求 Header,header 中不能设置 Referer |\n| success | (result: [UploadFileSuccess](#uploadfilesuccess)) => void | 否 | null | 成功返回的回调函数 |\n| fail | (result: [UploadFileFail](#uploadfilefail)) => void | 否 | null | 失败的回调函数 |\n| complete | (result: any) => void | 否 | null | 结束的回调函数(调用成功、失败都会执行) |\n\n##### UploadFileOptionFiles 属性值 @uploadfileoptionfiles \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| uri | string | 是 | - | 要上传文件资源的路径 |\n\n##### UploadFileSuccess 属性值 @uploadfilesuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| data | string | 是 | - | 开发者服务器返回的数据 |\n| statusCode | number | 是 | - | 开发者服务器返回的 HTTP 状态码 |\n\n##### UploadFileFail 属性值 @uploadfilefail \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | RequestErrorCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [UploadFileOptions](#uploadfileoptions) | 是 | - | - |\n#### UploadFileOptions 属性值 @uploadfileoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| url | string | 是 | - | 开发者服务器 url |\n| filePath | string | 否 | null | 要上传文件资源的路径 |\n| name | string | 否 | null | 文件对应的 key , 开发者在服务器端通过这个 key 可以获取到文件二进制内容 |\n| files | Array\\<[UploadFileOptionFiles](#uploadfileoptionfiles)\\> | 否 | null | 需要上传的文件列表。 |\n| header | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | HTTP 请求 Header, header 中不能设置 Referer |\n| formData | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | HTTP 请求中其他额外的 form data |\n| timeout | number | 否 | 120000 | 超时时间,单位 ms |\n| success | (result: [UploadFileSuccess](#uploadfilesuccess)) => void | 否 | null | 成功返回的回调函数 |\n| fail | (result: [UploadFileFail](#uploadfilefail)) => void | 否 | null | 失败的回调函数 |\n| complete | (result: any) => void | 否 | null | 结束的回调函数(调用成功、失败都会执行) |\n\n##### UploadFileOptionFiles 属性值 @uploadfileoptionfiles \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| name | string | 否 | \"file\" | multipart 提交时,表单的项目名,默认为 file,如果 name 不填或填的值相同,可能导致服务端读取文件时只能读取到一个文件。 |\n| uri | string | 是 | - | 要上传文件资源的路径 |\n\n##### UploadFileSuccess 属性值 @uploadfilesuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| data | string | 是 | - | 开发者服务器返回的数据 |\n| statusCode | number | 是 | - | 开发者服务器返回的 HTTP 状态码 |\n\n##### UploadFileFail 属性值 @uploadfilefail \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | RequestErrorCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | - | - |\n", "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [UploadTask](#uploadtask) | \n\n#### UploadTask 属性值 @uploadtask \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| abort | () => void | 是 | - | 中断上传任务。 |\n| onProgressUpdate | (callback: (result: [OnProgressUpdateResult](#onprogressupdateresult)) => void) => void | 是 | - | 监听上传进度变化。 |\n\n##### OnProgressUpdateResult 属性值 @onprogressupdateresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| progress | number | 是 | - | 上传进度百分比 |\n| totalBytesSent | number | 是 | - | 已经上传的数据长度,单位 Bytes |\n| totalBytesExpectedToSend | number | 是 | - | 预期需要上传的数据总长度,单位 Bytes |\n\n##### UploadTask 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| abort | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onProgressUpdate | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "compatibility": "### uploadFile 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "tutorial": "\n### 参见\n[uploadFile](https://uniapp.dcloud.net.cn/api/request/network-file.html#uploadfile)\n" @@ -210,7 +210,7 @@ "downloadFile": { "name": "## uni.downloadFile(options) @downloadfile", "description": "下载文件资源到本地,客户端直接发起一个 HTTP GET 请求,返回文件的本地临时路径。", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [DownloadFileOptions](#downloadfileoptions) | 是 | - | - |\n#### DownloadFileOptions 属性值 @downloadfileoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| url | string | 是 | - | 下载资源的 url |\n| header | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | HTTP 请求 Header,header 中不能设置 Referer |\n| success | (result: [DownloadFileSuccess](#downloadfilesuccess)) => void | 否 | null | 下载成功后以 tempFilePath 的形式传给页面,res = {tempFilePath: '文件的临时路径'} |\n| fail | (result: [DownloadFileFail](#downloadfilefail)) => void | 否 | null | 失败的回调函数 |\n| complete | (result: any) => void | 否 | null | 结束的回调函数(调用成功、失败都会执行) |\n\n##### DownloadFileSuccess 属性值 @downloadfilesuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| tempFilePath | string | 是 | - | 临时文件路径,下载后的文件会存储到一个临时文件 |\n| statusCode | number | 是 | - | 开发者服务器返回的 HTTP 状态码 |\n\n##### DownloadFileFail 属性值 @downloadfilefail \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | RequestErrorCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [DownloadFileOptions](#downloadfileoptions) | 是 | - | - |\n#### DownloadFileOptions 属性值 @downloadfileoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| url | string | 是 | - | 下载资源的 url |\n| header | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | HTTP 请求 Header,header 中不能设置 Referer |\n| timeout | number | 否 | 120000 | 超时时间,单位 ms |\n| success | (result: [DownloadFileSuccess](#downloadfilesuccess)) => void | 否 | null | 下载成功后以 tempFilePath 的形式传给页面,res = {tempFilePath: '文件的临时路径'} |\n| fail | (result: [DownloadFileFail](#downloadfilefail)) => void | 否 | null | 失败的回调函数 |\n| complete | (result: any) => void | 否 | null | 结束的回调函数(调用成功、失败都会执行) |\n\n##### DownloadFileSuccess 属性值 @downloadfilesuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| tempFilePath | string | 是 | - | 临时文件路径,下载后的文件会存储到一个临时文件 |\n| statusCode | number | 是 | - | 开发者服务器返回的 HTTP 状态码 |\n\n##### DownloadFileFail 属性值 @downloadfilefail \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | RequestErrorCode | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | - | - |\n", "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [DownloadTask](#downloadtask) | \n\n#### DownloadTask 属性值 @downloadtask \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| abort | () => void | 是 | - | 中断下载任务。 |\n| onProgressUpdate | (callback: (result: [OnProgressDownloadResult](#onprogressdownloadresult)) => void) => void | 是 | - | 监听下载进度变化。 |\n\n##### OnProgressDownloadResult 属性值 @onprogressdownloadresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| progress | number | 是 | - | 下载进度百分比 |\n| totalBytesWritten | number | 是 | - | 已经下载的数据长度,单位 Bytes |\n| totalBytesExpectedToWrite | number | 是 | - | 预期需要下载的数据总长度,单位 Bytes |\n\n##### DownloadTask 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| abort | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onProgressUpdate | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "compatibility": "### downloadFile 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "tutorial": "\n### 参见\n[downloadFile](https://uniapp.dcloud.net.cn/api/request/network-file.html#downloadfile)\n" @@ -226,8 +226,8 @@ "connectSocket": { "name": "## uni.connectSocket(options) @connectsocket", "description": "创建一个 WebSocket 连接。", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ConnectSocketOptions](#connectsocketoptions) | 是 | - | - |\n#### ConnectSocketOptions 属性值 @connectsocketoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| url | string | 是 | - | 开发者服务器接口地址,必须是 wss 协议,且域名必须是后台配置的合法域名 |\n| header | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | HTTP 请求 Header,header 中不能设置 Referer |\n| protocols | Array\\ | 否 | null | 子协议数组 |\n| success | (result: [ConnectSocketSuccess](#connectsocketsuccess)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [ConnectSocketFail](#connectsocketfail)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### ConnectSocketSuccess 属性值 @connectsocketsuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### ConnectSocketFail 属性值 @connectsocketfail \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | 600009 | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| cause | Error | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | - | - |\n", - "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [SocketTask](#sockettask) | \n\n#### SocketTask 属性值 @sockettask \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| send | (options: [SendSocketMessageOptions](#sendsocketmessageoptions)) => void | 是 | - | 通过 WebSocket 连接发送数据 |\n| close | (options: [CloseSocketOptions](#closesocketoptions)) => void | 是 | - | 关闭 WebSocket 连接 |\n| onOpen | (callback: (result: [OnSocketOpenCallbackResult](#onsocketopencallbackresult)) => void) => void | 是 | - | 监听 WebSocket 连接打开事件 |\n| onClose | (callback: (result: any) => void) => void | 是 | - | 监听 WebSocket 连接关闭事件 |\n| onError | (callback: (result: [GeneralCallbackResult](#generalcallbackresult)) => void) => void | 是 | - | 监听 WebSocket 错误 |\n| onMessage | (callback: (result: [OnSocketMessageCallbackResult](#onsocketmessagecallbackresult)) => void) => void | 是 | - | 监听 WebSocket 接受到服务器的消息事件 |\n\n##### SendSocketMessageOptions 属性值 @sendsocketmessageoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| data | any | 是 | - | 需要发送的内容 |\n| success | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### CloseSocketOptions 属性值 @closesocketoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| success | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### OnSocketOpenCallbackResult 属性值 @onsocketopencallbackresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| header | any | 是 | - | 连接成功的 HTTP 响应 Header |\n\n##### OnSocketMessageCallbackResult 属性值 @onsocketmessagecallbackresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| data | any | 是 | - | 服务器返回的消息 |\n\n##### SocketTask 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| send | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| close | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onOpen | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onClose | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onError | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onMessage | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ConnectSocketOptions](#connectsocketoptions) | 是 | - | - |\n#### ConnectSocketOptions 属性值 @connectsocketoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| url | string | 是 | - | 开发者服务器接口地址,必须是 wss 协议,且域名必须是后台配置的合法域名 |\n| header | [UTSJSONObject](/uts/buildin-object-api/utsjsonobject.md) | 否 | null | HTTP 请求 Header,header 中不能设置 Referer |\n| protocols | Array\\ | 否 | null | 子协议数组 |\n| success | (result: [ConnectSocketSuccess](#connectsocketsuccess)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [ConnectSocketFail](#connectsocketfail)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### ConnectSocketSuccess 属性值 @connectsocketsuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errMsg | string | 是 | - | - |\n\n##### ConnectSocketFail 属性值 @connectsocketfail \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errCode | 600009 | 是 | - | - |\n| errSubject | string | 是 | - | 统一错误主题(模块)名称 |\n| data | any | 否 | - | 错误信息中包含的数据 |\n| cause | [Error](/tutorial/err-spec.html#unierror) | 否 | - | 源错误信息,可以包含多个错误,详见SourceError |\n| errMsg | string | 是 | - | - |\n", + "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [SocketTask](#sockettask) | \n\n#### SocketTask 属性值 @sockettask \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| send | (options: [SendSocketMessageOptions](#sendsocketmessageoptions)) => void | 是 | - | 通过 WebSocket 连接发送数据 |\n| close | (options: [CloseSocketOptions](#closesocketoptions)) => void | 是 | - | 关闭 WebSocket 连接 |\n| onOpen | (callback: (result: [OnSocketOpenCallbackResult](#onsocketopencallbackresult)) => void) => void | 是 | - | 监听 WebSocket 连接打开事件 |\n| onClose | (callback: (result: any) => void) => void | 是 | - | 监听 WebSocket 连接关闭事件 |\n| onError | (callback: (result: [GeneralCallbackResult](#generalcallbackresult)) => void) => void | 是 | - | 监听 WebSocket 错误 |\n| onMessage | (callback: (result: [OnSocketMessageCallbackResult](#onsocketmessagecallbackresult)) => void) => void | 是 | - | 监听 WebSocket 接受到服务器的消息事件 |\n\n##### SendSocketMessageOptions 属性值 @sendsocketmessageoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| data | any | 是 | - | 需要发送的内容 |\n| success | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### CloseSocketOptions 属性值 @closesocketoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| code | number | 否 | 1000 | 一个数字值表示关闭连接的状态号,表示连接被关闭的原因。如果这个参数没有被指定,默认的取值是1000 (表示正常连接关闭) |\n| reason | string | 否 | \"\" | 一个可读的字符串,表示连接被关闭的原因。这个字符串必须是不长于123字节的UTF-8 文本(不是字符) |\n| success | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### OnSocketOpenCallbackResult 属性值 @onsocketopencallbackresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| header | any | 是 | - | 连接成功的 HTTP 响应 Header |\n\n##### OnSocketMessageCallbackResult 属性值 @onsocketmessagecallbackresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| data | any | 是 | - | 服务器返回的消息 |\n\n##### SocketTask 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| send | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| close | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onOpen | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onClose | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onError | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n| onMessage | 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "compatibility": "### connectSocket 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "tutorial": "\n### 参见\n[connectSocket](https://uniapp.dcloud.net.cn/api/request/websocket.html#connectsocket)\n" }, @@ -266,7 +266,7 @@ "closeSocket": { "name": "## uni.closeSocket(options) @closesocket", "description": "关闭 WebSocket 连接。", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [CloseSocketOptions](#closesocketoptions) | 是 | - | - |\n#### CloseSocketOptions 属性值 @closesocketoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| success | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [CloseSocketOptions](#closesocketoptions) | 是 | - | - |\n#### CloseSocketOptions 属性值 @closesocketoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| code | number | 否 | 1000 | 一个数字值表示关闭连接的状态号,表示连接被关闭的原因。如果这个参数没有被指定,默认的取值是1000 (表示正常连接关闭) |\n| reason | string | 否 | \"\" | 一个可读的字符串,表示连接被关闭的原因。这个字符串必须是不长于123字节的UTF-8 文本(不是字符) |\n| success | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: [GeneralCallbackResult](#generalcallbackresult)) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n", "returnValue": "", "compatibility": "### closeSocket 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "tutorial": "\n### 参见\n[closeSocket](https://uniapp.dcloud.net.cn/api/request/websocket.html#closesocket)\n" @@ -283,7 +283,7 @@ "name": "## uni.createSelectorQuery() @createselectorquery", "description": "\r\n返回一个SelectorQuery对象实例\r\n", "param": "", - "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [SelectorQuery](#selectorquery) | \n\n#### SelectorQuery 属性值 @selectorquery \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| in | (component?: any) => [SelectorQuery](#selectorquery) | 是 | - | 将选择器的选取范围更改为自定义组件component内 |\n| select | (selector: string) => [NodesRef](#nodesref) | 是 | - | 在当前页面下选择第一个匹配选择器selector的节点 |\n| selectAll | (selector: string) => [NodesRef](#nodesref) | 是 | - | 在当前页面下选择匹配选择器selector的所有节点 |\n| selectViewport | () => [NodesRef](#nodesref) | 是 | - | 选择显示区域 |\n| exec | (callback: (result: Array\\) => void) => [NodesRef](#nodesref) | 是 | - | 执行所有的请求 |\n", + "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [SelectorQuery](#selectorquery) | \n\n#### SelectorQuery 属性值 @selectorquery \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| in | (component?: any) => [SelectorQuery](#selectorquery) | 是 | - | 将选择器的选取范围更改为自定义组件component内 |\n| select | (selector: string) => [NodesRef](#nodesref) | 是 | - | 在当前页面下选择第一个匹配选择器selector的节点 |\n| selectAll | (selector: string) => [NodesRef](#nodesref) | 是 | - | 在当前页面下选择匹配选择器selector的所有节点 |\n| selectViewport | () => [NodesRef](#nodesref) | 是 | - | 选择显示区域 |\n| exec | (callback: (result: Array\\) => void) => [NodesRef](#nodesref) | 是 | - | 执行所有的请求 |\n\n##### NodesRef 属性值 @nodesref \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| boundingClientRect | (callback?: (result: any) => void) => [SelectorQuery](#selectorquery) | 是 | - | 添加节点的布局位置的查询请求,相对于显示区域,以像素为单位 |\n| scrollOffset | (callback: (result: any) => void) => [SelectorQuery](#selectorquery) | 是 | - | 添加节点的滚动位置查询请求,以像素为单位 |\n| fields | (fields: [NodeField](#nodefield), callback: (result: any) => void) => [SelectorQuery](#selectorquery) | 是 | - | 获取节点的相关信息,需要获取的字段在fields中指定 |\n| context | (callback: (result: any) => void) => [SelectorQuery](#selectorquery) | 是 | - | 添加节点的 Context 对象查询请求 |\n| node | (callback: (result: any) => void) => [SelectorQuery](#selectorquery) | 是 | - | 获取 Node 节点实例。目前支持 Canvas 的获取。 |\n\n###### NodeField 属性值 @nodefield \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| id | boolean | 否 | - | 是否返回节点 id |\n| dataset | boolean | 否 | - | 是否返回节点 dataset |\n| rect | boolean | 否 | - | 是否返回节点布局位置(left right top bottom) |\n| size | boolean | 否 | - | 是否返回节点尺寸(width height) |\n| scrollOffset | boolean | 否 | - | 是否返回节点的 scrollLeft scrollTop,节点必须是 scroll-view 或者 viewport |\n| properties | Array\\ | 否 | - | 指定属性名列表,返回节点对应属性名的当前属性值(只能获得组件文档中标注的常规属性值,id class style 和事件绑定的属性值不可获取) |\n| computedStyle | Array\\ | 否 | - | 指定样式名列表,返回节点对应样式名的当前值 |\n| context | boolean | 否 | - | 是否返回节点对应的 Context 对象 |\n", "compatibility": "", "tutorial": "\n### 参见\n[createSelectorQuery](http://uniapp.dcloud.io/api/ui/nodes-info?id=createselectorquery)\n" }, @@ -291,14 +291,14 @@ "name": "## uni.getElementById(id) @getelementbyid", "description": "\r\n返回一个匹配特定 ID 的元素, 如果不存在,返回 null。\\\r\n如果需要获取指定的节点类型,需要使用 as 进行类型转换。\\\r\nID 区分大小写,且应该是唯一的。如果存在多个匹配的元素,则返回第一个匹配的元素。\r\n", "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| id | string | 是 | - | - |", - "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| Element | \n", + "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [Element](/uni-app-x/dom/element.md) | \n", "compatibility": "### getElementById 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 5.0 | x | 3.91 | 10.0 | x | x |\n", "tutorial": "\n### 参见\n[getElementById](https://uniapp.dcloud.net.cn/uni-app-x/api/get-element-by-id.html)\n" }, "showActionSheet": { "name": "## uni.showActionSheet(options) @showactionsheet", "description": "\r\nuni.showActionSheet函数定义\r\n\r\n弹出actionSheet\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowActionSheetOptions](#showactionsheetoptions) | 是 | - | uni.showActionSheet函数参数定义 |\n#### ShowActionSheetOptions 属性值 @showactionsheetoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| itemList | Array\\ | 是 | - | - |\n| popover | [Popover](#popover) | 否 | - | 大屏设备弹出原生选择按钮框的指示区域,默认居中显示 |\n| success | (res: [ShowActionSheetSuccess](#showactionsheetsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### Popover 属性值 @popover \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| top | number | 是 | - | 指示区域坐标,使用原生 navigationBar 时一般需要加上 navigationBar 的高度 |\n| left | number | 是 | - | 指示区域坐标 |\n| width | number | 是 | - | 指示区域宽度 |\n| height | number | 是 | - | 指示区域高度 |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowActionSheetOptions](#showactionsheetoptions) | 是 | - | uni.showActionSheet函数参数定义 |\n#### ShowActionSheetOptions 属性值 @showactionsheetoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| title | string | 否 | - | 菜单标题 |\n| alertText | string | 否 | - | 警示文案(同菜单标题, app无效) |\n| itemList | Array\\ | 是 | - | 按钮的文字数组 |\n| itemColor | string | 否 | - | 按钮的文字颜色,字符串格式(iOS默认为系统控件颜色) |\n| popover | [Popover](#popover) | 否 | - | 大屏设备弹出原生选择按钮框的指示区域,默认居中显示 |\n| success | (res: [ShowActionSheetSuccess](#showactionsheetsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### Popover 属性值 @popover \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| top | number | 是 | - | 指示区域坐标,使用原生 navigationBar 时一般需要加上 navigationBar 的高度 |\n| left | number | 是 | - | 指示区域坐标 |\n| width | number | 是 | - | 指示区域宽度 |\n| height | number | 是 | - | 指示区域高度 |\n\n##### ShowActionSheetSuccess 属性值 @showactionsheetsuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| tapIndex | number | 否 | - | 用户点击的按钮,从上到下的顺序,从0开始 |\n", "returnValue": "", "compatibility": "### showActionSheet 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4.4 | √ | 3.9.0 | 9.0 | √ | 3.9.0 |\n", "tutorial": "\n### 参见\n[showActionSheet](https://uniapp.dcloud.net.cn/api/ui/prompt.html#showactionsheet)\n" @@ -306,7 +306,7 @@ "showModal": { "name": "## uni.showModal(options) @showmodal", "description": "\r\nuni.showModal 函数定义\r\n\r\n弹出modal\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowModalOptions](#showmodaloptions) | 是 | - | uni.showModal 参数定义 |\n#### ShowModalOptions 属性值 @showmodaloptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| showCancel | boolean | 否 | - | 是否返回节点 id |\n| editable | boolean | 否 | - | 是否返回节点 id |\n| success | (res: [ShowModalSuccess](#showmodalsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### ShowModalSuccess 属性值 @showmodalsuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| confirm | boolean | 是 | - | 为 true 时,表示用户点击了确定按钮 |\n| cancel | boolean | 是 | - | 为 true 时,表示用户点击了取消(用于 Android 系统区分点击蒙层关闭还是点击取消按钮关闭) |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowModalOptions](#showmodaloptions) | 是 | - | uni.showModal 参数定义 |\n#### ShowModalOptions 属性值 @showmodaloptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| title | string | 否 | - | 提示的标题 |\n| content | string | 否 | - | 提示的内容 |\n| showCancel | boolean | 否 | true\r\n是否显示取消按钮,默认为 true | |\n| cancelText | string | 否 | - | 取消按钮的文字,默认为\"取消\" |\n| cancelColor | string | 否 | - | 取消按钮的文字颜色,默认为\"#000000\" |\n| confirmText | string | 否 | - | 确定按钮的文字,默认为\"确定\" |\n| confirmColor | string | 否 | - | 确定按钮的文字颜色 |\n| editable | boolean | 否 | false\r\n是否显示输入框 | |\n| placeholderText | string | 否 | - | 显示输入框时的提示文本 |\n| success | (res: [ShowModalSuccess](#showmodalsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### ShowModalSuccess 属性值 @showmodalsuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| confirm | boolean | 是 | - | 为 true 时,表示用户点击了确定按钮 |\n| cancel | boolean | 是 | - | 为 true 时,表示用户点击了取消(用于 Android 系统区分点击蒙层关闭还是点击取消按钮关闭) |\n| content | string | 否 | - | editable 为 true 时,用户输入的文本 |\n", "returnValue": "", "compatibility": "### showModal 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4.4 | √ | 3.9.0 | 9.0 | √ | 3.9.0 |\n", "tutorial": "\n### 参见\n[showModal](https://uniapp.dcloud.net.cn/api/ui/prompt.html#showmodal)\n" @@ -314,7 +314,7 @@ "showLoading": { "name": "## uni.showLoading(options) @showloading", "description": "\r\nuni.showLoading函数定义\r\n弹出loading\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowLoadingOptions](#showloadingoptions) | 是 | - | uni.showLoading参数定义 |\n#### ShowLoadingOptions 属性值 @showloadingoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| title | string | 是 | - | 提示的内容,长度与 icon 取值有关。 |\n| mask | boolean | 否 | - | 是否返回节点 id |\n| success | (res: [ShowLoadingSuccess](#showloadingsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowLoadingOptions](#showloadingoptions) | 是 | - | uni.showLoading参数定义 |\n#### ShowLoadingOptions 属性值 @showloadingoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| title | string | 是 | - | 提示的内容,长度与 icon 取值有关。 |\n| mask | boolean | 否 | - | 是否显示透明蒙层,防止触摸穿透,默认:false |\n| success | (res: [ShowLoadingSuccess](#showloadingsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n", "returnValue": "", "compatibility": "### showLoading 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4.4 | √ | 3.9.0 | 9.0 | √ | 3.9.0 |\n", "tutorial": "\n### 参见\n[showLoading](https://uniapp.dcloud.net.cn/api/ui/prompt.html#showloading)\n" @@ -322,7 +322,7 @@ "showToast": { "name": "## uni.showToast(options) @showtoast", "description": "\r\nuni.showToast函数定义\r\n弹出toast \r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowToastOptions](#showtoastoptions) | 是 | - | uni.showToast参数定义 |\n#### ShowToastOptions 属性值 @showtoastoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| title | string | 是 | - | 提示的内容,长度与 icon 取值有关。 |\n| mask | boolean | 否 | - | 是否返回节点 id |\n| success | (res: [ShowToastSuccess](#showtoastsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ShowToastOptions](#showtoastoptions) | 是 | - | uni.showToast参数定义 |\n#### ShowToastOptions 属性值 @showtoastoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| title | string | 是 | - | 提示的内容,长度与 icon 取值有关。 |\n| icon | string | 否 | - | icon值说明 success: 显示成功图标,error: 显示错误图标; fail: 显示错误图标,此时title文本无长度显示; exception: 显示异常图标,此时title文本无长度显示; loading: 显示加载图标;none: 不显示图标。 |\n| image | string | 否 | - | 自定义图标的本地路径(app端暂不支持gif) |\n| mask | boolean | 否 | - | 是否显示透明蒙层,防止触摸穿透,默认:false |\n| duration | number | 否 | - | 提示的延迟时间,单位毫秒,默认:1500 |\n| position | string | 否 | - | position值说明(仅App生效) top: 居上显示; center: 居中显示;bottom: 居底显示 |\n| success | (res: [ShowToastSuccess](#showtoastsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n", "returnValue": "", "compatibility": "### showToast 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4.4 | √ | 3.9.0 | 9.0 | √ | 3.9.0 |\n", "tutorial": "\n### 参见\n[showToast](https://uniapp.dcloud.net.cn/api/ui/prompt.html#showtoast)\n" @@ -338,7 +338,7 @@ "getSystemInfo": { "name": "## uni.getSystemInfo(options) @getsysteminfo", "description": "异步获取系统信息", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [GetSystemInfoOptions](#getsysteminfooptions) | 是 | - | - |\n#### GetSystemInfoOptions 属性值 @getsysteminfooptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| success | (result: [GetSystemInfoResult](#getsysteminforesult)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### GetSystemInfoResult 属性值 @getsysteminforesult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| SDKVersion | string | 是 | - | 客户端基础库版本 |\n| appId | string | 是 | - | `manifest.json` 中应用appid。 |\n| appLanguage | string | 是 | - | 应用设置的语言。 |\n| appName | string | 是 | - | `manifest.json` 中应用名称。 |\n| appVersion | string | 是 | - | `manifest.json` 中应用版本名称(真机运行时,为基座的版本名称)。 |\n| appVersionCode | number | 是 | - | `manifest.json` 中应用版本名号(真机运行时,为基座的版本号)。 |\n| brand | string | 是 | - | 手机品牌。 |\n| browserName | string | 是 | - | 浏览器名称。`App` 端是系统 webview 的名字,比如 wkwebview、chrome。小程序端为空 |\n| browserVersion | string | 是 | - | 浏览器版本、webview 版本。 |\n| deviceId | string | 是 | - | 设备 ID |\n| deviceBrand | string | 是 | - | 设备品牌。如:`apple`、`huawei`。 |\n| deviceModel | string | 是 | - | 设备型号 |\n| deviceType | string | 是 | - | 设备类型。`phone`、`pad`、`pc` |\n| devicePixelRatio | number | 是 | - | 设备像素比 |\n| deviceOrientation | string | 是 | - | 设备方向。如:`竖屏 portrait`、`横屏 landscape` - portrait: 竖屏 - landscape: 横屏 |\n| language | string | 是 | - | 程序设置的语言 |\n| model | string | 是 | - | 手机型号 |\n| osName | string | 是 | - | ios、android、windows、mac、linux |\n| osVersion | string | 是 | - | 操作系统版本。如 ios 版本,andriod 版本 |\n| osLanguage | string | 是 | - | 操作系统语言 |\n| pixelRatio | number | 是 | - | 设备像素比 |\n| platform | string | 是 | - | 客户端平台 |\n| screenWidth | number | 是 | - | 屏幕宽度 |\n| screenHeight | number | 是 | - | 屏幕高度 |\n| statusBarHeight | number | 是 | - | 状态栏的高度 |\n| system | string | 是 | - | 操作系统版本 |\n| safeArea | [SafeArea](#safearea) | 是 | - | 在竖屏正方向下的安全区域 |\n| safeAreaInsets | [SafeAreaInsets](#safeareainsets) | 是 | - | 在竖屏正方向下的安全区域插入位置 |\n| ua | string | 是 | - | 用户标识。小程序端为空 |\n| uniCompileVersion | string | 是 | - | uni 编译器版本 |\n| uniPlatform | string | 是 | - | uni-app 运行平台。如:`app`、`mp-weixin`、`web` |\n| uniRuntimeVersion | string | 是 | - | uni 运行时版本 |\n| uniCompileVersionCode | number | 是 | - | uni 编译器版本号 |\n| uniRuntimeVersionCode | number | 是 | - | uni 运行时版本号 |\n| version | string | 是 | - | 引擎版本号 |\n| romName | string | 是 | - | rom 名称。Android 部分机型获取不到值。iOS 恒为 `ios` |\n| romVersion | string | 是 | - | rom 版本号。Android 部分机型获取不到值。iOS 恒为 `ios 版本号` |\n| windowWidth | number | 是 | - | 可使用窗口宽度 |\n| windowHeight | number | 是 | - | 可使用窗口高度 |\n| windowTop | number | 是 | - | 可使用窗口的顶部位置 |\n| windowBottom | number | 是 | - | 可使用窗口的底部位置 |\n\n###### SafeArea 属性值 @safearea \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| left | number | 是 | - | 安全区域左上角横坐标 |\n| right | number | 是 | - | 安全区域右下角横坐标 |\n| top | number | 是 | - | 安全区域左上角纵坐标 |\n| bottom | number | 是 | - | 安全区域右下角纵坐标 |\n| width | number | 是 | - | 安全区域的宽度,单位逻辑像素 |\n| height | number | 是 | - | 安全区域的高度,单位逻辑像素 |\n\n###### SafeAreaInsets 属性值 @safeareainsets \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| left | number | 是 | - | 安全区域左侧插入位置 |\n| right | number | 是 | - | 安全区域右侧插入位置 |\n| top | number | 是 | - | 安全区顶部插入位置 |\n| bottom | number | 是 | - | 安全区域底部插入位置 |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [GetSystemInfoOptions](#getsysteminfooptions) | 是 | - | - |\n#### GetSystemInfoOptions 属性值 @getsysteminfooptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| success | (result: [GetSystemInfoResult](#getsysteminforesult)) => void | 否 | null | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | null | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | null | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### GetSystemInfoResult 属性值 @getsysteminforesult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| SDKVersion | string | 是 | - | 客户端基础库版本 |\n| appId | string | 是 | - | `manifest.json` 中应用appid。 |\n| appLanguage | string | 是 | - | 应用设置的语言。 |\n| appName | string | 是 | - | `manifest.json` 中应用名称。 |\n| appVersion | string | 是 | - | `manifest.json` 中应用版本名称(真机运行时,为基座的版本名称)。 |\n| appVersionCode | number | 是 | - | `manifest.json` 中应用版本名号(真机运行时,为基座的版本号)。 |\n| brand | string | 是 | - | 手机品牌。 |\n| browserName | string | 是 | - | 浏览器名称。`App` 端是系统 webview 的名字,比如 wkwebview、chrome。小程序端为空 |\n| browserVersion | string | 是 | - | 浏览器版本、webview 版本。 |\n| deviceId | string | 是 | - | 设备 ID |\n| deviceBrand | string | 是 | - | 设备品牌。如:`apple`、`huawei`。 |\n| deviceModel | string | 是 | - | 设备型号 |\n| deviceType | string | 是 | - | 设备类型。`phone`、`pad`、`pc` |\n| devicePixelRatio | number | 是 | - | 设备像素比 |\n| deviceOrientation | string | 是 | - | 设备方向。如:`竖屏 portrait`、`横屏 landscape` - portrait: 竖屏 - landscape: 横屏 |\n| language | string | 是 | - | 程序设置的语言 |\n| model | string | 是 | - | 手机型号 |\n| osName | string | 是 | - | ios、android、windows、mac、linux |\n| osVersion | string | 是 | - | 操作系统版本。如 ios 版本,andriod 版本 |\n| osLanguage | string | 是 | - | 操作系统语言 |\n| pixelRatio | number | 是 | - | 设备像素比 |\n| platform | string | 是 | - | 客户端平台 |\n| screenWidth | number | 是 | - | 屏幕宽度 |\n| screenHeight | number | 是 | - | 屏幕高度 |\n| statusBarHeight | number | 是 | - | 状态栏的高度 |\n| system | string | 是 | - | 操作系统版本 |\n| safeArea | [SafeArea](#safearea) | 是 | - | 在竖屏正方向下的安全区域 |\n| safeAreaInsets | [SafeAreaInsets](#safeareainsets) | 是 | - | 在竖屏正方向下的安全区域插入位置 |\n| ua | string | 是 | - | 用户标识。小程序端为空 |\n| uniCompileVersion | string | 是 | - | uni 编译器版本 |\n| uniPlatform | string | 是 | - | uni-app 运行平台。如:`app`、`mp-weixin`、`web` |\n| uniRuntimeVersion | string | 是 | - | uni 运行时版本 |\n| uniCompileVersionCode | number | 是 | - | uni 编译器版本号 |\n| uniRuntimeVersionCode | number | 是 | - | uni 运行时版本号 |\n| version | string | 是 | - | 引擎版本号 |\n| romName | string | 是 | - | rom 名称。Android 部分机型获取不到值。iOS 恒为 `ios` |\n| romVersion | string | 是 | - | rom 版本号。Android 部分机型获取不到值。iOS 恒为 `ios 版本号` |\n| windowWidth | number | 是 | - | 可使用窗口宽度 |\n| windowHeight | number | 是 | - | 可使用窗口高度 |\n| windowTop | number | 是 | - | 可使用窗口的顶部位置 |\n| windowBottom | number | 是 | - | 可使用窗口的底部位置 |\n| oaid | string | 否 | - | oaid |\n| osAndroidAPILevel | number | 否 | - | Android 系统API库的版本。 |\n\n###### SafeArea 属性值 @safearea \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| left | number | 是 | - | 安全区域左上角横坐标 |\n| right | number | 是 | - | 安全区域右下角横坐标 |\n| top | number | 是 | - | 安全区域左上角纵坐标 |\n| bottom | number | 是 | - | 安全区域右下角纵坐标 |\n| width | number | 是 | - | 安全区域的宽度,单位逻辑像素 |\n| height | number | 是 | - | 安全区域的高度,单位逻辑像素 |\n\n###### SafeAreaInsets 属性值 @safeareainsets \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| left | number | 是 | - | 安全区域左侧插入位置 |\n| right | number | 是 | - | 安全区域右侧插入位置 |\n| top | number | 是 | - | 安全区顶部插入位置 |\n| bottom | number | 是 | - | 安全区域底部插入位置 |\n\n###### GetSystemInfoResult 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| oaid | 4.4 | √ | √ | x | x | x |\n| osAndroidAPILevel | 4.4 | √ | √ | x | x | x |\n", "returnValue": "", "compatibility": "### getSystemInfo 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "tutorial": "\n### 参见\n[getSystemInfo](http://uniapp.dcloud.io/api/system/info?id=getsysteminfo)\n" @@ -347,7 +347,7 @@ "name": "## uni.getSystemInfoSync() @getsysteminfosync", "description": "同步获取系统信息", "param": "", - "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [GetSystemInfoResult](#getsysteminforesult) | \n\n#### GetSystemInfoResult 属性值 @getsysteminforesult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| SDKVersion | string | 是 | - | 客户端基础库版本 |\n| appId | string | 是 | - | `manifest.json` 中应用appid。 |\n| appLanguage | string | 是 | - | 应用设置的语言。 |\n| appName | string | 是 | - | `manifest.json` 中应用名称。 |\n| appVersion | string | 是 | - | `manifest.json` 中应用版本名称(真机运行时,为基座的版本名称)。 |\n| appVersionCode | number | 是 | - | `manifest.json` 中应用版本名号(真机运行时,为基座的版本号)。 |\n| brand | string | 是 | - | 手机品牌。 |\n| browserName | string | 是 | - | 浏览器名称。`App` 端是系统 webview 的名字,比如 wkwebview、chrome。小程序端为空 |\n| browserVersion | string | 是 | - | 浏览器版本、webview 版本。 |\n| deviceId | string | 是 | - | 设备 ID |\n| deviceBrand | string | 是 | - | 设备品牌。如:`apple`、`huawei`。 |\n| deviceModel | string | 是 | - | 设备型号 |\n| deviceType | string | 是 | - | 设备类型。`phone`、`pad`、`pc` |\n| devicePixelRatio | number | 是 | - | 设备像素比 |\n| deviceOrientation | string | 是 | - | 设备方向。如:`竖屏 portrait`、`横屏 landscape` - portrait: 竖屏 - landscape: 横屏 |\n| language | string | 是 | - | 程序设置的语言 |\n| model | string | 是 | - | 手机型号 |\n| osName | string | 是 | - | ios、android、windows、mac、linux |\n| osVersion | string | 是 | - | 操作系统版本。如 ios 版本,andriod 版本 |\n| osLanguage | string | 是 | - | 操作系统语言 |\n| pixelRatio | number | 是 | - | 设备像素比 |\n| platform | string | 是 | - | 客户端平台 |\n| screenWidth | number | 是 | - | 屏幕宽度 |\n| screenHeight | number | 是 | - | 屏幕高度 |\n| statusBarHeight | number | 是 | - | 状态栏的高度 |\n| system | string | 是 | - | 操作系统版本 |\n| safeArea | [SafeArea](#safearea) | 是 | - | 在竖屏正方向下的安全区域 |\n| safeAreaInsets | [SafeAreaInsets](#safeareainsets) | 是 | - | 在竖屏正方向下的安全区域插入位置 |\n| ua | string | 是 | - | 用户标识。小程序端为空 |\n| uniCompileVersion | string | 是 | - | uni 编译器版本 |\n| uniPlatform | string | 是 | - | uni-app 运行平台。如:`app`、`mp-weixin`、`web` |\n| uniRuntimeVersion | string | 是 | - | uni 运行时版本 |\n| uniCompileVersionCode | number | 是 | - | uni 编译器版本号 |\n| uniRuntimeVersionCode | number | 是 | - | uni 运行时版本号 |\n| version | string | 是 | - | 引擎版本号 |\n| romName | string | 是 | - | rom 名称。Android 部分机型获取不到值。iOS 恒为 `ios` |\n| romVersion | string | 是 | - | rom 版本号。Android 部分机型获取不到值。iOS 恒为 `ios 版本号` |\n| windowWidth | number | 是 | - | 可使用窗口宽度 |\n| windowHeight | number | 是 | - | 可使用窗口高度 |\n| windowTop | number | 是 | - | 可使用窗口的顶部位置 |\n| windowBottom | number | 是 | - | 可使用窗口的底部位置 |\n\n##### SafeArea 属性值 @safearea \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| left | number | 是 | - | 安全区域左上角横坐标 |\n| right | number | 是 | - | 安全区域右下角横坐标 |\n| top | number | 是 | - | 安全区域左上角纵坐标 |\n| bottom | number | 是 | - | 安全区域右下角纵坐标 |\n| width | number | 是 | - | 安全区域的宽度,单位逻辑像素 |\n| height | number | 是 | - | 安全区域的高度,单位逻辑像素 |\n\n##### SafeAreaInsets 属性值 @safeareainsets \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| left | number | 是 | - | 安全区域左侧插入位置 |\n| right | number | 是 | - | 安全区域右侧插入位置 |\n| top | number | 是 | - | 安全区顶部插入位置 |\n| bottom | number | 是 | - | 安全区域底部插入位置 |\n", + "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [GetSystemInfoResult](#getsysteminforesult) | \n\n#### GetSystemInfoResult 属性值 @getsysteminforesult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| SDKVersion | string | 是 | - | 客户端基础库版本 |\n| appId | string | 是 | - | `manifest.json` 中应用appid。 |\n| appLanguage | string | 是 | - | 应用设置的语言。 |\n| appName | string | 是 | - | `manifest.json` 中应用名称。 |\n| appVersion | string | 是 | - | `manifest.json` 中应用版本名称(真机运行时,为基座的版本名称)。 |\n| appVersionCode | number | 是 | - | `manifest.json` 中应用版本名号(真机运行时,为基座的版本号)。 |\n| brand | string | 是 | - | 手机品牌。 |\n| browserName | string | 是 | - | 浏览器名称。`App` 端是系统 webview 的名字,比如 wkwebview、chrome。小程序端为空 |\n| browserVersion | string | 是 | - | 浏览器版本、webview 版本。 |\n| deviceId | string | 是 | - | 设备 ID |\n| deviceBrand | string | 是 | - | 设备品牌。如:`apple`、`huawei`。 |\n| deviceModel | string | 是 | - | 设备型号 |\n| deviceType | string | 是 | - | 设备类型。`phone`、`pad`、`pc` |\n| devicePixelRatio | number | 是 | - | 设备像素比 |\n| deviceOrientation | string | 是 | - | 设备方向。如:`竖屏 portrait`、`横屏 landscape` - portrait: 竖屏 - landscape: 横屏 |\n| language | string | 是 | - | 程序设置的语言 |\n| model | string | 是 | - | 手机型号 |\n| osName | string | 是 | - | ios、android、windows、mac、linux |\n| osVersion | string | 是 | - | 操作系统版本。如 ios 版本,andriod 版本 |\n| osLanguage | string | 是 | - | 操作系统语言 |\n| pixelRatio | number | 是 | - | 设备像素比 |\n| platform | string | 是 | - | 客户端平台 |\n| screenWidth | number | 是 | - | 屏幕宽度 |\n| screenHeight | number | 是 | - | 屏幕高度 |\n| statusBarHeight | number | 是 | - | 状态栏的高度 |\n| system | string | 是 | - | 操作系统版本 |\n| safeArea | [SafeArea](#safearea) | 是 | - | 在竖屏正方向下的安全区域 |\n| safeAreaInsets | [SafeAreaInsets](#safeareainsets) | 是 | - | 在竖屏正方向下的安全区域插入位置 |\n| ua | string | 是 | - | 用户标识。小程序端为空 |\n| uniCompileVersion | string | 是 | - | uni 编译器版本 |\n| uniPlatform | string | 是 | - | uni-app 运行平台。如:`app`、`mp-weixin`、`web` |\n| uniRuntimeVersion | string | 是 | - | uni 运行时版本 |\n| uniCompileVersionCode | number | 是 | - | uni 编译器版本号 |\n| uniRuntimeVersionCode | number | 是 | - | uni 运行时版本号 |\n| version | string | 是 | - | 引擎版本号 |\n| romName | string | 是 | - | rom 名称。Android 部分机型获取不到值。iOS 恒为 `ios` |\n| romVersion | string | 是 | - | rom 版本号。Android 部分机型获取不到值。iOS 恒为 `ios 版本号` |\n| windowWidth | number | 是 | - | 可使用窗口宽度 |\n| windowHeight | number | 是 | - | 可使用窗口高度 |\n| windowTop | number | 是 | - | 可使用窗口的顶部位置 |\n| windowBottom | number | 是 | - | 可使用窗口的底部位置 |\n| oaid | string | 否 | - | oaid |\n| osAndroidAPILevel | number | 否 | - | Android 系统API库的版本。 |\n\n##### SafeArea 属性值 @safearea \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| left | number | 是 | - | 安全区域左上角横坐标 |\n| right | number | 是 | - | 安全区域右下角横坐标 |\n| top | number | 是 | - | 安全区域左上角纵坐标 |\n| bottom | number | 是 | - | 安全区域右下角纵坐标 |\n| width | number | 是 | - | 安全区域的宽度,单位逻辑像素 |\n| height | number | 是 | - | 安全区域的高度,单位逻辑像素 |\n\n##### SafeAreaInsets 属性值 @safeareainsets \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| left | number | 是 | - | 安全区域左侧插入位置 |\n| right | number | 是 | - | 安全区域右侧插入位置 |\n| top | number | 是 | - | 安全区顶部插入位置 |\n| bottom | number | 是 | - | 安全区域底部插入位置 |\n\n##### GetSystemInfoResult 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| oaid | 4.4 | √ | √ | x | x | x |\n| osAndroidAPILevel | 4.4 | √ | √ | x | x | x |\n", "compatibility": "### getSystemInfoSync 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "tutorial": "\n### 参见\n[getSystemInfoSync](http://uniapp.dcloud.io/api/system/info?id=getsysteminfosync)\n" }, @@ -379,7 +379,7 @@ "name": "## uni.getAppAuthorizeSetting() @getappauthorizesetting", "description": "获取 APP 授权设置。", "param": "", - "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [GetAppAuthorizeSettingResult](#getappauthorizesettingresult) | \n\n#### GetAppAuthorizeSettingResult 属性值 @getappauthorizesettingresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| cameraAuthorized | string | 是 | - | 允许 App 使用摄像头的开关 - authorized: 已经获得授权,无需再次请求授权 - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限) - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) - config error: Android平台:表示没有授予 `android.permission.CAMERA` 权限;iOS平台没有该值 |\n| locationAuthorized | string | 是 | - | 允许 App 使用定位的开关 - authorized: 已经获得授权,无需再次请求授权 - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限) - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) - config error: Android平台:表示没有授予 `android.permission.ACCESS_COARSE_LOCATION` 权限;iOS平台:表示没有在 `manifest.json -\\> App模块配置` 中配置 `Geolocation(定位)` 模块 |\n| locationReducedAccuracy | boolean | 否 | - | 是否返回节点 id |\n| microphoneAuthorized | string | 是 | - | 允许 App 使用麦克风的开关 - authorized: 已经获得授权,无需再次请求授权 - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限) - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) - config error: Android平台:表示没有授予 `android.permission.RECORD_AUDIO` 权限;iOS平台没有该值 |\n| notificationAuthorized | string | 是 | - | 允许 App 通知的开关 - authorized: 已经获得授权,无需再次请求授权 - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限) - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) - config error: Android平台没有该值;iOS平台:表示没有在 `manifest.json -\\> App模块配置` 中配置 `Push(推送)` 模块 |\n", + "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [GetAppAuthorizeSettingResult](#getappauthorizesettingresult) | \n\n#### GetAppAuthorizeSettingResult 属性值 @getappauthorizesettingresult \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| cameraAuthorized | string | 是 | - | 允许 App 使用摄像头的开关 - authorized: 已经获得授权,无需再次请求授权 - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限) - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) - config error: Android平台:表示没有授予 `android.permission.CAMERA` 权限;iOS平台没有该值 |\n| locationAuthorized | string | 是 | - | 允许 App 使用定位的开关 - authorized: 已经获得授权,无需再次请求授权 - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限) - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) - config error: Android平台:表示没有授予 `android.permission.ACCESS_COARSE_LOCATION` 权限;iOS平台:表示没有在 `manifest.json -\\> App模块配置` 中配置 `Geolocation(定位)` 模块 |\n| locationAccuracy | string | 否 | - | 定位准确度。true 表示模糊定位,false 表示精确定位 - reduced: 模糊定位 - full: 精准定位 - unsupported: 不支持(包括用户拒绝定位权限和没有在 `manifest.json -\\> App模块配置` 中配置 `Geolocation(定位)` 模块) |\n| microphoneAuthorized | string | 是 | - | 允许 App 使用麦克风的开关 - authorized: 已经获得授权,无需再次请求授权 - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限) - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) - config error: Android平台:表示没有授予 `android.permission.RECORD_AUDIO` 权限;iOS平台没有该值 |\n| notificationAuthorized | string | 是 | - | 允许 App 通知的开关 - authorized: 已经获得授权,无需再次请求授权 - denied: 请求授权被拒绝,无法再次请求授权;(此情况需要引导用户打开系统设置,在设置页中打开权限) - not determined: 尚未请求授权,会在App下一次调用系统相应权限时请求;(仅 iOS 会出现。此种情况下引导用户打开系统设置,不展示开关) - config error: Android平台没有该值;iOS平台:表示没有在 `manifest.json -\\> App模块配置` 中配置 `Push(推送)` 模块 |\n", "compatibility": "### getAppAuthorizeSetting 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | 9.0 | √ | x |\n", "tutorial": "\n### 参见\n[getAppAuthorizeSetting](http://uniapp.dcloud.io/api/system/getappauthorizesetting)\n" }, @@ -394,7 +394,7 @@ "chooseImage": { "name": "## uni.chooseImage(options) @chooseimage", "description": "从本地相册选择图片或使用相机拍照", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ChooseImageOptions](#chooseimageoptions) | 是 | - | - |\n#### ChooseImageOptions 属性值 @chooseimageoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| count | number | 否 | 9 | 最多可以选择的图片张数,app端不限制,微信小程序最多可支持20个。 |\n| sizeType | Array\\ | 否 | null | 子协议数组 |\n| sourceType | Array\\ | 否 | null | 子协议数组 |\n| extension | Array\\ | 否 | null | 子协议数组 |\n| crop | [ChooseImageCropOptions](#chooseimagecropoptions) | 否 | - | 图像裁剪参数,设置后 sizeType 失效。 |\n| success | (callback: [ChooseImageSuccessCallback](#chooseimagesuccesscallback)) => void | 否 | - | 成功则返回图片的本地文件路径列表 tempFilePaths |\n| fail | (callback: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (callback: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### ChooseImageCropOptions 属性值 @chooseimagecropoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| width | number | 是 | - | 裁剪的宽度,单位为px,用于计算裁剪宽高比。 |\n| height | number | 是 | - | 裁剪的高度,单位为px,用于计算裁剪宽高比。 |\n| quality | number | 否 | 9 | 最多可以选择的图片张数,app端不限制,微信小程序最多可支持20个。 |\n| resize | boolean | 否 | - | 是否将width和height作为裁剪保存图片真实的像素值。默认值为true。注:设置为false时在裁剪编辑界面显示图片的像素值,设置为true时不显示。 |\n\n##### ChooseImageSuccessCallback 属性值 @chooseimagesuccesscallback \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errSubject | string | 是 | - | 调用API的名称 |\n| errMsg | string | 是 | - | - |\n| tempFilePaths | Array\\ | 是 | - | - |\n| tempFiles | any | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [ChooseImageOptions](#chooseimageoptions) | 是 | - | - |\n#### ChooseImageOptions 属性值 @chooseimageoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| count | number | 否 | 9 | 最多可以选择的图片张数,app端不限制,微信小程序最多可支持20个。 |\n| sizeType | Array\\ | 否 | ['original','compressed'\\] | original 原图,compressed 压缩图,默认二者都有 |\n| sourceType | Array\\ | 否 | ['album','camera'\\] | album 从相册选图,camera 使用相机,默认二者都有 |\n| extension | Array\\ | 否 | - | 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。仅H5支持 |\n| crop | [ChooseImageCropOptions](#chooseimagecropoptions) | 否 | - | 图像裁剪参数,设置后 sizeType 失效。 |\n| success | (callback: [ChooseImageSuccessCallback](#chooseimagesuccesscallback)) => void | 否 | - | 成功则返回图片的本地文件路径列表 tempFilePaths |\n| fail | (callback: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (callback: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### ChooseImageCropOptions 属性值 @chooseimagecropoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| width | number | 是 | - | 裁剪的宽度,单位为px,用于计算裁剪宽高比。 |\n| height | number | 是 | - | 裁剪的高度,单位为px,用于计算裁剪宽高比。 |\n| quality | number | 否 | 80 | 取值范围为1-100,数值越小,质量越低(仅对jpg格式有效)。默认值为80。 |\n| resize | boolean | 否 | - | 是否将width和height作为裁剪保存图片真实的像素值。默认值为true。注:设置为false时在裁剪编辑界面显示图片的像素值,设置为true时不显示。 |\n\n##### ChooseImageSuccessCallback 属性值 @chooseimagesuccesscallback \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errSubject | string | 是 | - | 调用API的名称 |\n| errMsg | string | 是 | - | - |\n| tempFilePaths | Array\\ | 是 | - | - |\n| tempFiles | any | 是 | - | - |\n", "returnValue": "", "compatibility": "### chooseImage 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | - | - | - |\n", "tutorial": "\n### 参见\n[chooseImage](http://uniapp.dcloud.io/api/media/image?id=chooseimage)\n" @@ -402,7 +402,7 @@ "previewImage": { "name": "## uni.previewImage(options) @previewimage", "description": "预览图片", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [PreviewImageOptions](#previewimageoptions) | 是 | - | - |\n#### PreviewImageOptions 属性值 @previewimageoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| urls | Array\\ | 是 | - | - |\n| loop | boolean | 否 | - | 是否返回节点 id |\n| longPressActions | [LongPressActionsOptions](#longpressactionsoptions) | 否 | - | 长按图片显示操作菜单,如不填默认为保存相册,1.9.5 起支持。 |\n| success | (result: [PreviewImageSuccessCallback](#previewimagesuccesscallback)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### LongPressActionsOptions 属性值 @longpressactionsoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| itemList | Array\\ | 是 | - | - |\n| success | (result: [LongPressActionsSuccessData](#longpressactionssuccessdata)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: any) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n###### LongPressActionsSuccessData 属性值 @longpressactionssuccessdata \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| tapIndex | number | 是 | - | 接口调用失败的回调函数 |\n| index | number | 是 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### PreviewImageSuccessCallback 属性值 @previewimagesuccesscallback \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errSubject | string | 是 | - | - |\n| errMsg | string | 是 | - | - |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [PreviewImageOptions](#previewimageoptions) | 是 | - | - |\n#### PreviewImageOptions 属性值 @previewimageoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| count | string | 否 | - | 当前显示图片的链接,不填则默认为 urls 的第一张 |\n| current | any | 否 | - | current 为当前显示图片的链接/索引值,不填或填写的值无效则为 urls 的第一张。App平台在 1.9.5至1.9.8之间,current为必填。不填会报错 |\n| urls | Array\\ | 是 | - | 需要预览的图片链接列表 |\n| indicator | string | 否 | - | 图片指示器样式 - default: 底部圆点指示器 - number: 顶部数字指示器 - none: 不显示指示器 |\n| loop | boolean | 否 | - | 是否可循环预览 |\n| longPressActions | [LongPressActionsOptions](#longpressactionsoptions) | 否 | - | 长按图片显示操作菜单,如不填默认为保存相册,1.9.5 起支持。 |\n| success | (result: [PreviewImageSuccessCallback](#previewimagesuccesscallback)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### LongPressActionsOptions 属性值 @longpressactionsoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| itemList | Array\\ | 是 | - | 按钮的文字数组 |\n| itemColor | string | 否 | - | 按钮的文字颜色,字符串格式,默认为\"#000000\" |\n| success | (result: [LongPressActionsSuccessData](#longpressactionssuccessdata)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: any) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n###### LongPressActionsSuccessData 属性值 @longpressactionssuccessdata \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| tapIndex | number | 是 | - | 接口调用失败的回调函数 |\n| index | number | 是 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### PreviewImageSuccessCallback 属性值 @previewimagesuccesscallback \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| errSubject | string | 是 | - | - |\n| errMsg | string | 是 | - | - |\n", "returnValue": "", "compatibility": "### previewImage 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | 3.9.0 | - | - | - |\n", "tutorial": "\n### 参见\n[previewImage](http://uniapp.dcloud.io/api/media/image?id=previewimage)\n" @@ -426,7 +426,7 @@ "getLocation": { "name": "## uni.getLocation(options) @getlocation", "description": "获取当前的地理位置、速度", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [GetLocationOptions](#getlocationoptions) | 是 | - | - |\n#### GetLocationOptions 属性值 @getlocationoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| altitude | boolean | 否 | - | 是否返回节点 id |\n| geocode | boolean | 否 | - | 是否返回节点 id |\n| isHighAccuracy | boolean | 否 | - | 是否返回节点 id |\n| success | (result: [GetLocationSuccess](#getlocationsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### GetLocationSuccess 属性值 @getlocationsuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| latitude | number | 是 | 0 | 纬度,浮点数,范围为-90~90,负数表示南纬 |\n| longitude | number | 是 | 0 | 经度,范围为-180~180,负数表示西经 |\n| speed | number | 是 | 0 | 速度,浮点数,单位m/s |\n| accuracy | number | 是 | - | 位置的精确度 |\n| altitude | number | 是 | 0 | 高度,单位 m |\n| verticalAccuracy | number | 是 | 0 | 垂直精度,单位 m(Android 无法获取,返回 0) |\n| horizontalAccuracy | number | 是 | 0 | 水平精度,单位 m |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [GetLocationOptions](#getlocationoptions) | 是 | - | - |\n#### GetLocationOptions 属性值 @getlocationoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| type | string | 否 | wgs84 | 默认为 wgs84 返回 gps 坐标,gcj02 返回可用于uni.openLocation的坐标 |\n| altitude | boolean | 否 | false | 传入 true 会返回高度信息,由于获取高度需要较高精确度,会减慢接口返回速度 |\n| geocode | boolean | 否 | false | 传入 true 会解析地址 |\n| highAccuracyExpireTime | number | 否 | 3000 | 高精度定位超时时间(ms),指定时间内返回最高精度,该值3000ms以上高精度定位才有效果 |\n| isHighAccuracy | boolean | 否 | false | 开启高精度定位 |\n| success | (result: [GetLocationSuccess](#getlocationsuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (result: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (result: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### GetLocationSuccess 属性值 @getlocationsuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| latitude | number | 是 | 0 | 纬度,浮点数,范围为-90~90,负数表示南纬 |\n| longitude | number | 是 | 0 | 经度,范围为-180~180,负数表示西经 |\n| speed | number | 是 | 0 | 速度,浮点数,单位m/s |\n| accuracy | number | 是 | - | 位置的精确度 |\n| altitude | number | 是 | 0 | 高度,单位 m |\n| verticalAccuracy | number | 是 | 0 | 垂直精度,单位 m(Android 无法获取,返回 0) |\n| horizontalAccuracy | number | 是 | 0 | 水平精度,单位 m |\n| address | any | 否 | null | 地址信息 |\n", "returnValue": "", "compatibility": "### getLocation 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4.4 | √ | 3.9.0 | x | x | x |\n", "tutorial": "\n### 参见\n[getLocation]([](http://uniapp.dcloud.io/api/location/location?id=getlocation))\n" @@ -450,7 +450,7 @@ "getStorage": { "name": "## uni.getStorage(options) @getstorage", "description": "\r\nuni.getStorage函数定义\r\n从本地存储中异步获取指定 key 对应的内容。\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [GetStorageOptions](#getstorageoptions) | 是 | - | uni.getStorage参数定义 |\n#### GetStorageOptions 属性值 @getstorageoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| key | string | 是 | - | 本地存储中的指定的 key |\n| success | (res: [GetStorageSuccess](#getstoragesuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [GetStorageOptions](#getstorageoptions) | 是 | - | uni.getStorage参数定义 |\n#### GetStorageOptions 属性值 @getstorageoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| key | string | 是 | - | 本地存储中的指定的 key |\n| success | (res: [GetStorageSuccess](#getstoragesuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### GetStorageSuccess 属性值 @getstoragesuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| data | any | 否 | - | key 对应的内容 |\n", "returnValue": "", "compatibility": "### getStorage 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4.4 | 2.0.3 | 3.9.0 | 9.0 | 2.0.3 | 3.9.0 |\n", "tutorial": "\n### 参见\n[getStorage](https://uniapp.dcloud.net.cn/api/storage/storage.html#getstorage)\n" @@ -466,7 +466,7 @@ "getStorageInfo": { "name": "## uni.getStorageInfo(options) @getstorageinfo", "description": "\r\nuni.getStorageInfo函数定义\r\n异步获取当前 storage 的相关信息。\r\n", - "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [GetStorageInfoOptions](#getstorageinfooptions) | 是 | - | uni.getStorageInfo参数定义 |\n#### GetStorageInfoOptions 属性值 @getstorageinfooptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| success | (res: [GetStorageInfoSuccess](#getstorageinfosuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### GetStorageInfoSuccess 属性值 @getstorageinfosuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| keys | Array\\ | 是 | - | - |\n| currentSize | number | 是 | - | 当前占用的空间大小, 单位:kb |\n| limitSize | number | 是 | - | 限制的空间大小, 单位:kb |\n", + "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| options | [GetStorageInfoOptions](#getstorageinfooptions) | 是 | - | uni.getStorageInfo参数定义 |\n#### GetStorageInfoOptions 属性值 @getstorageinfooptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| success | (res: [GetStorageInfoSuccess](#getstorageinfosuccess)) => void | 否 | - | 接口调用成功的回调函数 |\n| fail | (res: [UniError](/tutorial/err-spec.html#unierror)) => void | 否 | - | 接口调用失败的回调函数 |\n| complete | (res: any) => void | 否 | - | 接口调用结束的回调函数(调用成功、失败都会执行) |\n\n##### GetStorageInfoSuccess 属性值 @getstorageinfosuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| keys | Array\\ | 是 | - | 当前 storage 中所有的 key |\n| currentSize | number | 是 | - | 当前占用的空间大小, 单位:kb |\n| limitSize | number | 是 | - | 限制的空间大小, 单位:kb |\n", "returnValue": "", "compatibility": "### getStorageInfo 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4.4 | 2.0.3 | 3.9.0 | 9.0 | 2.0.3 | 3.9.0 |\n", "tutorial": "\n### 参见\n[getStorageInfo](https://uniapp.dcloud.net.cn/api/storage/storage.html#getstorageinfo)\n" @@ -475,7 +475,7 @@ "name": "## uni.getStorageInfoSync() @getstorageinfosync", "description": "\r\nuni.getStorageInfoSync函数定义\r\n同步获取当前 storage 的相关信息。\r\n\r\n", "param": "", - "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [GetStorageInfoSuccess](#getstorageinfosuccess) | \n\n#### GetStorageInfoSuccess 属性值 @getstorageinfosuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| keys | Array\\ | 是 | - | - |\n| currentSize | number | 是 | - | 当前占用的空间大小, 单位:kb |\n| limitSize | number | 是 | - | 限制的空间大小, 单位:kb |\n", + "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [GetStorageInfoSuccess](#getstorageinfosuccess) | \n\n#### GetStorageInfoSuccess 属性值 @getstorageinfosuccess \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| keys | Array\\ | 是 | - | 当前 storage 中所有的 key |\n| currentSize | number | 是 | - | 当前占用的空间大小, 单位:kb |\n| limitSize | number | 是 | - | 限制的空间大小, 单位:kb |\n", "compatibility": "### getStorageInfoSync 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4.4 | 2.0.3 | 3.9.0 | 9.0 | 2.0.3 | 3.9.0 |\n", "tutorial": "\n### 参见\n[getStorageInfoSync](https://uniapp.dcloud.net.cn/api/storage/storage.html#getstorageinfosync)\n" }, @@ -523,7 +523,7 @@ "name": "## uni.createVideoContext(videoId, component?) @createvideocontext", "description": "创建并返回 video 上下文 videoContext 对象", "param": "### 参数 \n\n| 名称 | 类型 | 必填 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| videoId | VideoIdString | 是 | - | - |\n| component | ComponentPublicInstance | 否 | - | - |", - "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [VideoContext](#videocontext) | \n\n#### VideoContext 属性值 @videocontext \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| play | () => void | 是 | - | 播放 |\n| pause | () => void | 是 | - | 暂停 |\n| seek | (position: number) => void | 是 | - | 跳转到指定位置 |\n| stop | () => void | 是 | - | 停止视频 |\n| sendDanmu | (danmu: [Danmu](#danmu)) => void | 是 | - | 发送弹幕 |\n| playbackRate | (rate: number) => void | 是 | - | 设置倍速播放 |\n| requestFullScreen | (direction?: [RequestFullScreenOptions](#requestfullscreenoptions)) => void | 是 | - | 进入全屏 |\n| exitFullScreen | () => void | 是 | - | 退出全屏 |\n\n##### VideoContext 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| play | 4.4 | √ | 3.9.0 | - | - | - |\n| pause | 4.4 | √ | 3.9.0 | - | - | - |\n| seek | 4.4 | √ | 3.9.0 | - | - | - |\n| stop | 4.4 | √ | 3.9.0 | - | - | - |\n| sendDanmu | 4.4 | √ | 3.9.0 | - | - | - |\n| playbackRate | 4.4 | √ | 3.9.0 | - | - | - |\n| requestFullScreen | 4.4 | √ | 3.9.0 | - | - | - |\n| exitFullScreen | 4.4 | √ | 3.9.0 | - | - | - |\n", + "returnValue": "### 返回值 \n\n| 类型 |\n| :- |\n| [VideoContext](#videocontext) | \n\n#### VideoContext 属性值 @videocontext \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| play | () => void | 是 | - | 播放 |\n| pause | () => void | 是 | - | 暂停 |\n| seek | (position: number) => void | 是 | - | 跳转到指定位置 |\n| stop | () => void | 是 | - | 停止视频 |\n| sendDanmu | (danmu: [Danmu](#danmu)) => void | 是 | - | 发送弹幕 |\n| playbackRate | (rate: number) => void | 是 | - | 设置倍速播放 |\n| requestFullScreen | (direction?: [RequestFullScreenOptions](#requestfullscreenoptions)) => void | 是 | - | 进入全屏 |\n| exitFullScreen | () => void | 是 | - | 退出全屏 |\n\n##### Danmu 属性值 @danmu \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| text | string | 否 | - | 弹幕文字 |\n| color | string | 否 | - | 弹幕颜色 |\n| time | number | 否 | - | 显示时刻 |\n\n##### RequestFullScreenOptions 属性值 @requestfullscreenoptions \n\n| 名称 | 类型 | 必备 | 默认值 | 描述 |\n| :- | :- | :- | :- | :- |\n| direction | number | 否 | - | direction - 0: 正常竖向 - 90: 屏幕逆时针90度 - -90: 屏幕顺时针90度 |\n\n##### VideoContext 兼容性 \n| | 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- | :- |\n| play | 4.4 | √ | 3.9.0 | - | - | - |\n| pause | 4.4 | √ | 3.9.0 | - | - | - |\n| seek | 4.4 | √ | 3.9.0 | - | - | - |\n| stop | 4.4 | √ | 3.9.0 | - | - | - |\n| sendDanmu | 4.4 | √ | 3.9.0 | - | - | - |\n| playbackRate | 4.4 | √ | 3.9.0 | - | - | - |\n| requestFullScreen | 4.4 | √ | 3.9.0 | - | - | - |\n| exitFullScreen | 4.4 | √ | 3.9.0 | - | - | - |\n", "compatibility": "### createVideoContext 兼容性 \n| 安卓系统版本 | 安卓 uni-app | 安卓 uni-app-x | iOS 系统版本 | iOS uni-app | iOS uni-app-x |\n| :- | :- | :- | :- | :- | :- |\n| 4.4 | √ | √ | - | - | - |\n", "tutorial": "\n### 参见\n[createVideoContext](http://uniapp.dcloud.io/api/media/video-context?id=createVideoContext)\n" }, -- GitLab