Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_16800119
unidocs-zh
提交
9bc3f37a
unidocs-zh
项目概览
qq_16800119
/
unidocs-zh
与 Fork 源项目一致
Fork自
DCloud / unidocs-zh
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
unidocs-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9bc3f37a
编写于
11月 21, 2023
作者:
D
DCloud_LXH
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 新增相关 Bug 链接至 issues 系统
上级
82376ebf
变更
26
展开全部
隐藏空白更改
内联
并排
Showing
26 changed file
with
1983 addition
and
46 deletion
+1983
-46
docs/.vuepress/utils/cssJson.json
docs/.vuepress/utils/cssJson.json
+912
-1
docs/.vuepress/utils/maniFestJson.json
docs/.vuepress/utils/maniFestJson.json
+1
-1
docs/.vuepress/utils/pagesJson.json
docs/.vuepress/utils/pagesJson.json
+1
-1
docs/.vuepress/utils/utsApiJson.json
docs/.vuepress/utils/utsApiJson.json
+855
-1
docs/.vuepress/utils/utsComJson.json
docs/.vuepress/utils/utsComJson.json
+1
-1
docs/.vuepress/utils/utsJson.json
docs/.vuepress/utils/utsJson.json
+1
-1
docs/.vuepress/utils/utsUnicloudApiJson.json
docs/.vuepress/utils/utsUnicloudApiJson.json
+110
-1
docs/uni-app-x/manifest.md
docs/uni-app-x/manifest.md
+23
-21
docs/uni-app-x/pagesjson.md
docs/uni-app-x/pagesjson.md
+2
-0
docs/uts/buildin-object-api/array.md
docs/uts/buildin-object-api/array.md
+14
-0
docs/uts/buildin-object-api/console.md
docs/uts/buildin-object-api/console.md
+2
-0
docs/uts/buildin-object-api/date.md
docs/uts/buildin-object-api/date.md
+1
-0
docs/uts/buildin-object-api/global.md
docs/uts/buildin-object-api/global.md
+17
-1
docs/uts/buildin-object-api/json.md
docs/uts/buildin-object-api/json.md
+3
-1
docs/uts/buildin-object-api/map.md
docs/uts/buildin-object-api/map.md
+4
-2
docs/uts/buildin-object-api/math.md
docs/uts/buildin-object-api/math.md
+2
-0
docs/uts/buildin-object-api/number.md
docs/uts/buildin-object-api/number.md
+4
-2
docs/uts/buildin-object-api/promise.md
docs/uts/buildin-object-api/promise.md
+2
-0
docs/uts/buildin-object-api/regexp.md
docs/uts/buildin-object-api/regexp.md
+2
-0
docs/uts/buildin-object-api/set.md
docs/uts/buildin-object-api/set.md
+4
-2
docs/uts/buildin-object-api/string.md
docs/uts/buildin-object-api/string.md
+2
-0
docs/uts/buildin-object-api/utsjsonobject.md
docs/uts/buildin-object-api/utsjsonobject.md
+11
-8
docs/uts/utsandroid.md
docs/uts/utsandroid.md
+1
-0
docs/uts/utsandroidhookproxy.md
docs/uts/utsandroidhookproxy.md
+3
-1
docs/uts/utsios.md
docs/uts/utsios.md
+2
-0
docs/uts/utsioshookproxy.md
docs/uts/utsioshookproxy.md
+3
-1
未找到文件。
docs/.vuepress/utils/cssJson.json
浏览文件 @
9bc3f37a
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
docs/.vuepress/utils/maniFestJson.json
浏览文件 @
9bc3f37a
{
"manifest"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| appid | string | - | [DCloud AppID 使用说明](https://ask.dcloud.net.cn/article/35907) |
\n
| name | string | - | 应用名称 |
\n
| description | string | - | 应用描述 |
\n
| versionName | string | - | 应用版本名称 |
\n
| versionCode | integer | - | 应用版本号,必须是整数,取值范围1~2147483647;升级时必须高于上一次设置的值。 |
\n
| locale | '' | - | 默认语言 |
\n
| fallbackLocale | '' | - | 默认回退语言 |
\n
| uni-app-x | [uni-app-x 配置项列表](#manifest-uni-app-x) | - | 存在uni-app-x节点则表示为uni-app x项目 |
\n
| app | [app 配置项列表](#manifest-app) | - | App端(原生App)配置 |"
,
"description"
:
"[配置指南](http://uniapp.dcloud.io/manifest)"
},
"manifest_uni-app-x"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| flex-direction | 'row'
\\
| 'row-reverse'
\\
| 'column'
\\
| 'column-reverse' | column | uvue页面默认flex排列方向 |"
,
"description"
:
"存在uni-app-x节点则表示为uni-app x项目"
},
"manifest_app"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| distribute | [distribute 配置项列表](#app-distribute) | - | App端发布配置 |"
,
"description"
:
"App端(原生App)配置"
},
"app_distribute"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| syncDebug | boolean | - | 是否为自定义调试基座 |
\n
| icons | [icons 配置项列表](#distribute-icons) | - | iOS、Android应用图标配置。云打包后生效,建议在HBuilderX中 manifest.json 的可视化界面操作,不推荐手动在源码视图中修改。 |
\n
| android | [android 配置项列表](#distribute-android) | - | App-Android端发布配置 |
\n
| ios | [ios 配置项列表](#distribute-ios) | - | IOS配置 |"
,
"description"
:
"App端发布配置"
},
"distribute_icons"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| android | [android 配置项列表](#icons-android) | - | Android图标配置 |
\n
| ios | [ios 配置项列表](#icons-ios) | - | iOS图标配置 |"
,
"description"
:
"iOS、Android应用图标配置。云打包后生效,建议在HBuilderX中 manifest.json 的可视化界面操作,不推荐手动在源码视图中修改。"
},
"icons_android"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| hdpi | string | - | 高分屏设备程序图标,分辨率要求72x72 |
\n
| xhdpi | string | - | 720P高分屏设备程序图标,分辨率要求96x96 |
\n
| xxhdpi | string | - | 1080P高分屏设备程序图标,分辨率要求144x144 |
\n
| xxxhdpi | string | - | 2K屏设备程序图标,分辨率要求192x192 |"
},
"icons_ios"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| appstore | string | - | 提交app store使用的图标 1024x1024 |
\n
| iphone | [iphone 配置项列表](#ios-iphone) | - | iPhone图标配置 |
\n
| ipad | [ipad 配置项列表](#ios-ipad) | - | iPad图标配置 |"
},
"ios_iphone"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| app@2x | string | - | iOS9.0+ 程序图标(2x) |
\n
| app@3x | string | - | iOS9.0+ 程序图标(3x) |
\n
| spotlight@2x | string | - | iOS9.0+ Spotlight图标(2x) |
\n
| spotlight@3x | string | - | iOS9.0+ Spotlight图标(3x) |
\n
| settings@2x | string | - | iOS9.0+ Settings设置图标(2x) |
\n
| settings@3x | string | - | iOS9.0+ Settings设置图标(3x) |
\n
| notification@2x | string | - | iOS9.0+ 通知栏图标(2x) |
\n
| notification@3x | string | - | iOS9.0+ 通知栏图标(3x) |"
},
"ios_ipad"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| app | string | - | iOS9.0+ 程序图标 |
\n
| app@2x | string | - | iOS9.0+ 程序图标(2x) |
\n
| proapp@2x | string | - | iOS9.0+ 程序图标(3x) |
\n
| spotlight | string | - | iOS9.0+ Spotlight图标 |
\n
| spotlight@2x | string | - | iOS9.0+ Spotlight图标(2x) |
\n
| settings | string | - | iOS9.0+ Settings设置图标 |
\n
| settings@2x | string | - | iOS9.0+ Settings设置图标(2x) |
\n
| notification | string | - | iOS9.0+ 通知栏图标 |
\n
| notification@2x | string | - | iOS9.0+ 通知栏图标(2x) |"
},
"distribute_android"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| minSdkVersion | integer | 21 | 应用兼容的最低Android版本(API等级);[参考文档](https://uniapp.dcloud.io/tutorial/app-android-minsdkversion) |
\n
| targetSdkVersion | integer | 30 | 应用适配的目标Android版本(API等级),部分应用市场要求设置较高的targetSdkVersion才能提交审核;[参考文档](https://uniapp.dcloud.io/tutorial/app-android-targetsdkversion) |
\n
| abiFilters | Array
\\
<'armeabi-v7a'
\\
| 'arm64-v8a'
\\
| 'x86'
\\
| 'x86_64'> | [
\"
arm64-v8a
\"\\
] | [参考文档](https://uniapp.dcloud.io/tutorial/app-android-abifilters) |"
,
"description"
:
"App-Android端发布配置"
},
"distribute_ios"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| appid | string | - | iOS Bundle ID |"
}}
\ No newline at end of file
{
"manifest"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| appid | string | - | [DCloud AppID 使用说明](https://ask.dcloud.net.cn/article/35907) |
\n
| name | string | - | 应用名称 |
\n
| description | string | - | 应用描述 |
\n
| versionName | string | - | 应用版本名称 |
\n
| versionCode | integer | - | 应用版本号,必须是整数,取值范围1~2147483647;升级时必须高于上一次设置的值。 |
\n
| locale | '' | - | 默认语言 |
\n
| fallbackLocale | '' | - | 默认回退语言 |
\n
| uni-app-x | [uni-app-x 配置项列表](#manifest-uni-app-x) | - | 存在uni-app-x节点则表示为uni-app x项目 |
\n
| app | [app 配置项列表](#manifest-app) | - | App端(原生App)配置 |"
,
"description"
:
"[配置指南](http://uniapp.dcloud.io/manifest)"
},
"manifest_uni-app-x"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| flex-direction | 'row'
\\
| 'row-reverse'
\\
| 'column'
\\
| 'column-reverse' | column | uvue页面默认flex排列方向 |"
,
"description"
:
"存在uni-app-x节点则表示为uni-app x项目"
},
"manifest_app"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| distribute | [distribute 配置项列表](#app-distribute) | - | App端发布配置 |"
,
"description"
:
"App端(原生App)配置"
},
"app_distribute"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| syncDebug | boolean | - | 是否为自定义调试基座 |
\n
| icons | [icons 配置项列表](#distribute-icons) | - | iOS、Android应用图标配置。云打包后生效,建议在HBuilderX中 manifest.json 的可视化界面操作,不推荐手动在源码视图中修改。 |
\n
| android | [android 配置项列表](#distribute-android) | - | App-Android端发布配置 |
\n
| ios | [ios 配置项列表](#distribute-ios) | - | IOS配置 |"
,
"description"
:
"App端发布配置"
},
"distribute_icons"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| android | [android 配置项列表](#icons-android) | - | Android图标配置 |
\n
| ios | [ios 配置项列表](#icons-ios) | - | iOS图标配置 |"
,
"description"
:
"iOS、Android应用图标配置。云打包后生效,建议在HBuilderX中 manifest.json 的可视化界面操作,不推荐手动在源码视图中修改。"
},
"icons_android"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| hdpi | string | - | 高分屏设备程序图标,分辨率要求72x72 |
\n
| xhdpi | string | - | 720P高分屏设备程序图标,分辨率要求96x96 |
\n
| xxhdpi | string | - | 1080P高分屏设备程序图标,分辨率要求144x144 |
\n
| xxxhdpi | string | - | 2K屏设备程序图标,分辨率要求192x192 |"
},
"icons_ios"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| appstore | string | - | 提交app store使用的图标 1024x1024 |
\n
| iphone | [iphone 配置项列表](#ios-iphone) | - | iPhone图标配置 |
\n
| ipad | [ipad 配置项列表](#ios-ipad) | - | iPad图标配置 |"
},
"ios_iphone"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| app@2x | string | - | iOS9.0+ 程序图标(2x) |
\n
| app@3x | string | - | iOS9.0+ 程序图标(3x) |
\n
| spotlight@2x | string | - | iOS9.0+ Spotlight图标(2x) |
\n
| spotlight@3x | string | - | iOS9.0+ Spotlight图标(3x) |
\n
| settings@2x | string | - | iOS9.0+ Settings设置图标(2x) |
\n
| settings@3x | string | - | iOS9.0+ Settings设置图标(3x) |
\n
| notification@2x | string | - | iOS9.0+ 通知栏图标(2x) |
\n
| notification@3x | string | - | iOS9.0+ 通知栏图标(3x) |"
},
"ios_ipad"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| app | string | - | iOS9.0+ 程序图标 |
\n
| app@2x | string | - | iOS9.0+ 程序图标(2x) |
\n
| proapp@2x | string | - | iOS9.0+ 程序图标(3x) |
\n
| spotlight | string | - | iOS9.0+ Spotlight图标 |
\n
| spotlight@2x | string | - | iOS9.0+ Spotlight图标(2x) |
\n
| settings | string | - | iOS9.0+ Settings设置图标 |
\n
| settings@2x | string | - | iOS9.0+ Settings设置图标(2x) |
\n
| notification | string | - | iOS9.0+ 通知栏图标 |
\n
| notification@2x | string | - | iOS9.0+ 通知栏图标(2x) |"
},
"distribute_android"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| minSdkVersion | integer | 21 | 应用兼容的最低Android版本(API等级);[参考文档](https://uniapp.dcloud.io/tutorial/app-android-minsdkversion) |
\n
| targetSdkVersion | integer | 30 | 应用适配的目标Android版本(API等级),部分应用市场要求设置较高的targetSdkVersion才能提交审核;[参考文档](https://uniapp.dcloud.io/tutorial/app-android-targetsdkversion) |
\n
| abiFilters | Array
\\
<'armeabi-v7a'
\\
| 'arm64-v8a'
\\
| 'x86'
\\
| 'x86_64'> | [
\"
arm64-v8a
\"\\
] | [参考文档](https://uniapp.dcloud.io/tutorial/app-android-abifilters) |"
,
"description"
:
"App-Android端发布配置"
},
"distribute_ios"
:{
"table"
:
"| 属性 | 类型 | 默认值 | 描述 |
\n
| :- | :- | :- | :- |
\n
| appid | string | - | iOS Bundle ID |"
},
"tutorial"
:
"## 参见
\n
[相关 Bug](https://issues.dcloud.net.cn/?mid=collocation.manifest_json)"
}
\ No newline at end of file
docs/.vuepress/utils/pagesJson.json
浏览文件 @
9bc3f37a
此差异已折叠。
点击以展开。
docs/.vuepress/utils/utsApiJson.json
浏览文件 @
9bc3f37a
此差异已折叠。
点击以展开。
docs/.vuepress/utils/utsComJson.json
浏览文件 @
9bc3f37a
此差异已折叠。
点击以展开。
docs/.vuepress/utils/utsJson.json
浏览文件 @
9bc3f37a
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
docs/.vuepress/utils/utsUnicloudApiJson.json
浏览文件 @
9bc3f37a
此差异已折叠。
点击以展开。
docs/uni-app-x/manifest.md
浏览文件 @
9bc3f37a
...
...
@@ -146,7 +146,7 @@ HBuilderX3.93版本起,编译器支持扫描代码,摇树treeShaking,自
如应用中没有使用video组件相关功能,将不再包含video内置模块,减少安装包体积。
**摇树注意事项:**
**摇树注意事项:**
当你打包自定义基座时,如果你的工程代码没有使用video、定位、相册、摄像头等涉及三方sdk或敏感权限的api,打出的自定义基座包就不会包含这些组件和api的功能,那么在这些自定义基座上运行时,调用相关的组件和api就会报错。
\
此时您需要在工程中写相关的代码,如引用video组件或调用定位api,保存代码后重新打包自定义基座,才会包含相关模块。
...
...
@@ -154,31 +154,33 @@ HBuilderX3.93版本起,编译器支持扫描代码,摇树treeShaking,自
### App端支持摇树的内置模块列表@utsmodules
-
uni-network
网络请求(文件上传/下载)模块,包括API:
[
uni.downloadFile
](
./api/download-file.md
)
、
[
uni.request
](
./api/request.md
)
、
[
uni.uploadFile
](
./api/upload-file.md
)
依赖的模块:无
-
uni-network
网络请求(文件上传/下载)模块,包括API:
[
uni.downloadFile
](
./api/download-file.md
)
、
[
uni.request
](
./api/request.md
)
、
[
uni.uploadFile
](
./api/upload-file.md
)
依赖的模块:无
-
uni-getLocation-system
系统定位模块,包括API:
[
uni.getLocation
](
./api/get-location.md
)
依赖的模块:无
-
uni-getLocation-system
系统定位模块,包括API:
[
uni.getLocation
](
./api/get-location.md
)
依赖的模块:无
-
uni-video
[
video视频组件
](
./component/video.md
)
模块,包括内置组件:
[
video
](
./component/video.md
)
;包括API:
[
uni.createVideoContext
](
./api/create-video-context.md
)
-
uni-video
[
video视频组件
](
./component/video.md
)
模块,包括内置组件:
[
video
](
./component/video.md
)
;包括API:
[
uni.createVideoContext
](
./api/create-video-context.md
)
-
uni-media
多媒体相关API模块,包括API:
[
uni.chooseImage
](
./api/choose-image.md
)
、
[
uni.previewImage
](
./api/preview-image.md
)
、
[
uni.saveImageToPhotosAlbum
](
./api/save-image-to-photos-album.md
)
依赖的模块:无
-
uni-media
多媒体相关API模块,包括API:
[
uni.chooseImage
](
./api/choose-image.md
)
、
[
uni.previewImage
](
./api/preview-image.md
)
、
[
uni.saveImageToPhotosAlbum
](
./api/save-image-to-photos-album.md
)
依赖的模块:无
-
uni-cloud-client
调用uniCloud
[
云函数/云对象
](
../uniCloud/cf-functions.md
)
模块,包括API:
[
uniCloud.importObject
](
../uniCloud/cloud-obj.md#%E5%AE%A2%E6%88%B7%E7%AB%AF%E8%B0%83%E7%94%A8
)
、
[
uniCloud.callFunction
](
../uniCloud/cf-callfunction.md#callfunction%E6%96%B9%E6%B3%95
)
依赖的模块:uni-media、uni-network
-
uni-cloud-client
调用uniCloud
[
云函数/云对象
](
../uniCloud/cf-functions.md
)
模块,包括API:
[
uniCloud.importObject
](
../uniCloud/cloud-obj.md#%E5%AE%A2%E6%88%B7%E7%AB%AF%E8%B0%83%E7%94%A8
)
、
[
uniCloud.callFunction
](
../uniCloud/cf-callfunction.md#callfunction%E6%96%B9%E6%B3%95
)
依赖的模块:uni-media、uni-network
-
uni-push
[
uni-push统一推送
](
../unipush-v2.md
)
模块(
`HBuilderX3.97+`
),包括API:
[
uni.createPushMessage
](
../api/plugins/push.md#createpushmessage
)
、
[
uni.getPushClientId
](
../api/plugins/push.md#getpushclientid
)
、
[
uni.offPushMessage
](
../api/plugins/push.md#offpushmessage
)
、
[
uni.onPushMessage
](
../api/plugins/push.md#onpushmessage
)
依赖的模块:无
-
uni-push
[
uni-push统一推送
](
../unipush-v2.md
)
模块(
`HBuilderX3.97+`
),包括API:
[
uni.createPushMessage
](
../api/plugins/push.md#createpushmessage
)
、
[
uni.getPushClientId
](
../api/plugins/push.md#getpushclientid
)
、
[
uni.offPushMessage
](
../api/plugins/push.md#offpushmessage
)
、
[
uni.onPushMessage
](
../api/plugins/push.md#onpushmessage
)
依赖的模块:无
-
uni-facialRecognitionVerify
[
uni实人认证
](
../uniCloud/frv/intro.md
)
模块,包括API:
[
uni.getFacialRecognitionMetaInfo
](
../api/plugins/facialRecognitionVerify.md#getfacialrecognitionmetainfo
)
、
[
uni.startFacialRecognitionVerify
](
../api/plugins/facialRecognitionVerify.md#startfacialrecognitionverify
)
-
uni-facialRecognitionVerify
[
uni实人认证
](
../uniCloud/frv/intro.md
)
模块,包括API:
[
uni.getFacialRecognitionMetaInfo
](
../api/plugins/facialRecognitionVerify.md#getfacialrecognitionmetainfo
)
、
[
uni.startFacialRecognitionVerify
](
../api/plugins/facialRecognitionVerify.md#startfacialrecognitionverify
)
依赖的模块:无
再次强调,以上模块不属于ext组件或api,是内置模块。但如果你的代码中没有使用这些组件和api,打正式包或自定义基座时会被摇掉。
\ No newline at end of file
再次强调,以上模块不属于ext组件或api,是内置模块。但如果你的代码中没有使用这些组件和api,打正式包或自定义基座时会被摇掉。
<!-- MANIFESTJSON.tutorial -->
\ No newline at end of file
docs/uni-app-x/pagesjson.md
浏览文件 @
9bc3f37a
...
...
@@ -200,3 +200,5 @@ easycom是uni-app提供的一种简化组件使用的方式。一般情况下组
<!-- PAGESJSON.pages_easycom.table -->
<!-- PAGESJSON.pages_easycom.compatibility -->
<!-- PAGESJSON.tutorial -->
\ No newline at end of file
docs/uts/buildin-object-api/array.md
浏览文件 @
9bc3f37a
...
...
@@ -579,6 +579,20 @@ console.log(Array.isArray(new Int16Array([15, 33])));
<!-- UTSJSON.Array.includes.compatibility -->
### toKotlinList()
<!-- UTSJSON.Array.toKotlinList.description -->
<!-- UTSJSON.Array.toKotlinList.param -->
<!-- UTSJSON.Array.toKotlinList.returnValue -->
<!-- UTSJSON.Array.toKotlinList.compatibility -->
<!-- UTSJSON.Array.toKotlinList.tutorial -->
<!-- UTSJSON.Array.tutorial -->
## 常见操作
-
创建数组
...
...
docs/uts/buildin-object-api/console.md
浏览文件 @
9bc3f37a
...
...
@@ -53,3 +53,5 @@
<!-- UTSJSON.Console.warn.returnValue -->
<!-- UTSJSON.Console.warn.compatibility -->
<!-- UTSJSON.Console.tutorial -->
docs/uts/buildin-object-api/date.md
浏览文件 @
9bc3f37a
...
...
@@ -222,3 +222,4 @@ setTimeout(() => {
<!-- UTSJSON.Date.setFullYear.compatibility -->
<!-- UTSJSON.Date.tutorial -->
docs/uts/buildin-object-api/global.md
浏览文件 @
9bc3f37a
...
...
@@ -14,6 +14,8 @@
<!-- UTSJSON.Global.parseInt.compatibility -->
<!-- UTSJSON.Global.parseInt.tutorial -->
**注意**
-
该方法仅支持对 string 类型的解析,传入其他类型会编译报错。字符串开头的空白符将会被忽略。
...
...
@@ -47,6 +49,8 @@ const c = parseInt("546", 2) // 结果为 NAN (原因:除了“0、1”外,
<!-- UTSJSON.Global.parseFloat.compatibility -->
<!-- UTSJSON.Global.parseFloat.tutorial -->
-
注意: 该方法仅支持对 string 类型的解析,传入其他类型会编译报错。
### isNaN(number)
...
...
@@ -59,6 +63,8 @@ const c = parseInt("546", 2) // 结果为 NAN (原因:除了“0、1”外,
<!-- UTSJSON.Global.isNaN.compatibility -->
<!-- UTSJSON.Global.isNaN.tutorial -->
### isFinite(number)
<!-- UTSJSON.Global.isFinite.description -->
...
...
@@ -69,6 +75,8 @@ const c = parseInt("546", 2) // 结果为 NAN (原因:除了“0、1”外,
<!-- UTSJSON.Global.isFinite.compatibility -->
<!-- UTSJSON.Global.isFinite.tutorial -->
### decodeURI(encodedURI)
<!-- UTSJSON.Global.decodeURI.description -->
...
...
@@ -79,6 +87,8 @@ const c = parseInt("546", 2) // 结果为 NAN (原因:除了“0、1”外,
<!-- UTSJSON.Global.decodeURI.compatibility -->
<!-- UTSJSON.Global.decodeURI.tutorial -->
### decodeURIComponent(encodedURIComponent)
<!-- UTSJSON.Global.decodeURIComponent.description -->
...
...
@@ -89,6 +99,8 @@ const c = parseInt("546", 2) // 结果为 NAN (原因:除了“0、1”外,
<!-- UTSJSON.Global.decodeURIComponent.compatibility -->
<!-- UTSJSON.Global.decodeURIComponent.tutorial -->
### encodeURI(uri)
<!-- UTSJSON.Global.encodeURI.description -->
...
...
@@ -99,6 +111,8 @@ const c = parseInt("546", 2) // 结果为 NAN (原因:除了“0、1”外,
<!-- UTSJSON.Global.encodeURI.compatibility -->
<!-- UTSJSON.Global.encodeURI.tutorial -->
### encodeURIComponent(uriComponent)
<!-- UTSJSON.Global.encodeURIComponent.description -->
...
...
@@ -107,4 +121,6 @@ const c = parseInt("546", 2) // 结果为 NAN (原因:除了“0、1”外,
<!-- UTSJSON.Global.encodeURIComponent.returnValue -->
<!-- UTSJSON.Global.encodeURIComponent.compatibility -->
\ No newline at end of file
<!-- UTSJSON.Global.encodeURIComponent.compatibility -->
<!-- UTSJSON.Global.encodeURIComponent.tutorial -->
\ No newline at end of file
docs/uts/buildin-object-api/json.md
浏览文件 @
9bc3f37a
...
...
@@ -7,7 +7,7 @@
JSON.parse() 方法用来解析 JSON 字符串,构造由字符串描述的对象。可能返回值是: UTSJSONObject/Array/number/boolean/string 等基本数据类型
> 特别说明:
> 特别说明:
> HBuilderX3.9.0统一为以上规范,在HBuilderX3.9.0之前版本 返回值只可能是 UTSJSONObject, 基本数据类型会转换失败
> JSON.parse 目前仅支持第一个参数
...
...
@@ -146,3 +146,5 @@ console.log(JSON.stringify(new Date(2006, 0, 2, 15, 4, 5)));
<!-- UTSJSON.JSON.parseArray_1.returnValue -->
<!-- UTSJSON.JSON.parseArray_1.compatibility -->
<!-- UTSJSON.JSON.tutorial -->
docs/uts/buildin-object-api/map.md
浏览文件 @
9bc3f37a
...
...
@@ -155,7 +155,7 @@ console.log(map1.get('key1')) //返回 def
let
map
=
new
Map
<
string
,
any
>
()
map
.
set
(
"
name
"
,
"
zhangsan
"
)
map
.
set
(
"
age
"
,
12
)
//Map(2) {"name":"zhangsan","age":12}
//Map(2) {"name":"zhangsan","age":12}
console
.
log
(
map
)
```
-
通过key访问map元素
...
...
@@ -189,5 +189,7 @@ map.forEach(function(value:any | null,key:string,map: Map<string,any | null>){
console
.
log
(
key
)
console
.
log
(
map
)
})
```
<!-- UTSJSON.Map.tutorial -->
docs/uts/buildin-object-api/math.md
浏览文件 @
9bc3f37a
...
...
@@ -775,3 +775,5 @@ console.log(Math.tan(1));
// expected output: 1.5574077246549023
```
<!-- UTSJSON.Math.tan.compatibility -->
<!-- UTSJSON.Math.tutorial -->
docs/uts/buildin-object-api/number.md
浏览文件 @
9bc3f37a
...
...
@@ -42,7 +42,7 @@ console.log(a.toInt());
// Int最大值2147483647,溢出了
let
b
=
2147483648
// expected output: -2147483648
// expected output: -2147483648
```
<!-- UTSJSON.Number.toInt.compatibility -->
...
...
@@ -238,4 +238,6 @@ let b = Number.from(a)
console
.
log
(
b
);
// expected output: 12
```
\ No newline at end of file
```
<!-- UTSJSON.Number.tutorial -->
\ No newline at end of file
docs/uts/buildin-object-api/promise.md
浏览文件 @
9bc3f37a
...
...
@@ -215,6 +215,8 @@ Promise 对象表示异步操作最终的完成(或失败)以及其结果值
<!-- UTSJSON.Promise.allSettled.compatibility -->
<!-- UTSJSON.Promise.tutorial -->
## Bug & Tips@tips
*
目前 Promise 类型编译到 kotlin 为 io.dcloud.uts.UTSPromise
docs/uts/buildin-object-api/regexp.md
浏览文件 @
9bc3f37a
...
...
@@ -157,6 +157,8 @@ console.log(globalRegex.test(str));
```
<!-- UTSJSON.RegExp.test.compatibility -->
<!-- UTSJSON.RegExp.tutorial -->
## Bug & Tips@tips
*
目前 RegExp 类型编译到 kotlin 为 io.dcloud.uts.UTSRegExp
\ No newline at end of file
docs/uts/buildin-object-api/set.md
浏览文件 @
9bc3f37a
...
...
@@ -44,7 +44,7 @@ set1.add(13);
set1
.
forEach
((
item
)
=>
{
console
.
log
(
item
);
// expected output: 42
// expected output: 13
// expected output: 13
})
```
<!-- UTSJSON.Set.add.compatibility -->
...
...
@@ -123,7 +123,9 @@ console.log(set1.has(5));
console
.
log
(
set1
.
has
(
6
));
// expected output: false
```
<!-- UTSJSON.Set.has.compatibility -->
<!-- UTSJSON.Set.has.compatibility -->
.
<!-- UTSJSON.Set.tutorial -->
## Bug & Tips@tips
...
...
docs/uts/buildin-object-api/string.md
浏览文件 @
9bc3f37a
...
...
@@ -490,3 +490,5 @@ console.log(sentence.toUpperCase());
<!-- UTSJSON.String.at.returnValue -->
<!-- UTSJSON.String.at.compatibility -->
<!-- UTSJSON.String.tutorial -->
docs/uts/buildin-object-api/utsjsonobject.md
浏览文件 @
9bc3f37a
...
...
@@ -25,10 +25,10 @@ const person: UTSJSONObject = {
// 写法1 推荐
const
person
:
UTSJSONObject
=
JSON
.
parseObject
(
'
{"name":"Tom"}
'
)
!
// 写法2 推荐
const
person
:
UTSJSONObject
=
JSON
.
parse
<
UTSJSONObject
>
(
'
{"name":"Tom"}
'
)
!
// 写法3 如果 as 转换的实际类型不匹配 会导致 crash,建议先通过 `instanceof` 判断类型再进行as转换。
const
parseRet
=
JSON
.
parse
(
'
{"name":"Tom"}
'
)
...
...
@@ -107,7 +107,7 @@ person['name'] = 'Tom'
<!-- UTSJSON.UTSJSONObject.getString.compatibility -->
### getJSON(key): UTSJSONObject | null
### getJSON(key): UTSJSONObject | null
<!-- UTSJSON.UTSJSONObject.getJSON.description -->
...
...
@@ -117,7 +117,7 @@ person['name'] = 'Tom'
<!-- UTSJSON.UTSJSONObject.getJSON.compatibility -->
### getArray(key): Array<any> | null
### getArray(key): Array<any> | null
<!-- UTSJSON.UTSJSONObject.getArray.description -->
...
...
@@ -127,7 +127,7 @@ person['name'] = 'Tom'
<!-- UTSJSON.UTSJSONObject.getArray.compatibility -->
### getArray(key): Array<T> | null
### getArray(key): Array<T> | null
<!-- UTSJSON.UTSJSONObject.getArray_1.description -->
...
...
@@ -143,17 +143,17 @@ person['name'] = 'Tom'
let obj = JSON.parseObject('{"name":"tom","tag":["student","user"]}')
// 这里得到是 Array<*>
// 这里得到是 Array<*>
let noGenericArray = obj!.getArray("tag")
console.log(noGenericArray)
// 这里得到是 Array<string>
// 这里得到是 Array<string>
let genericArray = obj!.getArray<string>("tag")
console.log(genericArray)
```
### toMap(): Map<string, any>
### toMap(): Map<string, any>
<!-- UTSJSON.UTSJSONObject.toMap.description -->
...
...
@@ -169,3 +169,6 @@ person.toMap().forEach((value, key) => {
```
<!-- UTSJSON.UTSJSONObject.toMap.compatibility -->
<!-- UTSJSON.UTSJSONObject.tutorial -->
docs/uts/utsandroid.md
浏览文件 @
9bc3f37a
...
...
@@ -382,4 +382,5 @@
<!-- UTSJSON.UTSAndroid.convert2AbsFullPath.compatibility -->
<!-- UTSJSON.UTSAndroid.tutorial -->
docs/uts/utsandroidhookproxy.md
浏览文件 @
9bc3f37a
...
...
@@ -12,4 +12,6 @@
<!-- UTSJSON.UTSAndroidHookProxy.onCreate.returnValue -->
<!-- UTSJSON.UTSAndroidHookProxy.onCreate.compatibility -->
\ No newline at end of file
<!-- UTSJSON.UTSAndroidHookProxy.onCreate.compatibility -->
<!-- UTSJSON.UTSAndroidHookProxy.tutorial -->
docs/uts/utsios.md
浏览文件 @
9bc3f37a
...
...
@@ -243,3 +243,5 @@
<!-- UTSJSON.UTSiOS.isBaseIpa.returnValue -->
<!-- UTSJSON.UTSiOS.isBaseIpa.compatibility -->
<!-- UTSJSON.UTSiOS.tutorial -->
docs/uts/utsioshookproxy.md
浏览文件 @
9bc3f37a
...
...
@@ -143,4 +143,6 @@
<!-- UTSJSON.UTSiOSHookProxy.applicationContinueUserActivityRestorationHandler.returnValue -->
<!-- UTSJSON.UTSiOSHookProxy.applicationContinueUserActivityRestorationHandler.compatibility -->
\ No newline at end of file
<!-- UTSJSON.UTSiOSHookProxy.applicationContinueUserActivityRestorationHandler.compatibility -->
<!-- UTSJSON.UTSiOSHookProxy.tutorial -->
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录