Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
程序yang
unidocs-zh
提交
9dc4c047
U
unidocs-zh
项目概览
程序yang
/
unidocs-zh
与 Fork 源项目一致
Fork自
DCloud / unidocs-zh
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
unidocs-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
9dc4c047
编写于
3月 01, 2022
作者:
D
DCloud_LXH
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: api router
上级
193cb23a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
41 addition
and
16 deletion
+41
-16
docs/.vuepress/theme/enhanceApp.js
docs/.vuepress/theme/enhanceApp.js
+1
-1
docs/.vuepress/theme/util/index.js
docs/.vuepress/theme/util/index.js
+3
-0
docs/api/README.md
docs/api/README.md
+22
-0
docs/api/_sidebar.md
docs/api/_sidebar.md
+7
-7
docs/api/key.md
docs/api/key.md
+2
-2
docs/api/storage/storage.md
docs/api/storage/storage.md
+6
-6
未找到文件。
docs/.vuepress/theme/enhanceApp.js
浏览文件 @
9dc4c047
...
...
@@ -94,7 +94,7 @@ export default ({
if
(
Vue
.
$vuepress
.
$get
(
'
disableScrollBehavior
'
))
{
return
false
;
}
const
selector
=
decodeURIComponent
(
to
.
hash
)
const
selector
=
decodeURIComponent
(
to
.
hash
.
toLowerCase
()
)
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
if
(
!
mounted
)
mounted
=
true
...
...
docs/.vuepress/theme/util/index.js
浏览文件 @
9dc4c047
import
Vue
from
'
vue
'
;
export
const
isServer
=
Vue
.
prototype
.
$isServer
export
const
hashRE
=
/#.*$/
export
const
extRE
=
/
\.(
md|html
)
$/
export
const
endingSlashRE
=
/
\/
$/
...
...
docs/api/README.md
浏览文件 @
9dc4c047
...
...
@@ -197,6 +197,19 @@ uni.addInterceptor({
```
## API 列表
#### 基础
##### 日志打印
|API|说明|
|:-|:-|
|
[
日志打印
](
log
)
|向控制台打印日志信息|
|
[
定时器
](
timer
)
|在定时到期以后执行注册的回调函数|
|
[
uni.base64ToArrayBuffer
](
base64ToArrayBuffer
)
|将 Base64 字符串转成 ArrayBuffer 对象|
|
[
uni.arrayBufferToBase64
](
arrayBufferToBase64
)
|将 ArrayBuffer 对象转成 Base64 字符串|
|
[
应用级事件
](
/api/application
)
|监听应用事件|
|
[
拦截器
](
interceptor
)
|拦截 Api 等调用并执行回调|
|
[
全局API
](
global
)
|可全局调用 Api|
#### 网络
##### 发起请求
...
...
@@ -576,6 +589,15 @@ uni.addInterceptor({
|
[
uni.onPush
](
plugins/push?id=onpush
)
|监听透传数据|
|
[
uni.offPush
](
plugins/push?id=offpush
)
|移除监听透传数据|
#### 广告
|API|说明|
|:-|:-|
|
[
激励视频广告
](
/api/a-d/rewarded-video.html
)
|激励视频广告,是cpm收益最高的广告形式|
|
[
全屏视频广告
](
/api/a-d/full-screen-video.html
)
|全屏视频广告|
|
[
内容联盟广告
](
/api/a-d/content-page.html
)
|内容联盟广告|
|
[
插屏广告
](
/api/a-d/interstitial.html
)
|插屏广告|
|
[
互动游戏
](
/api/a-d/interactive.html
)
|互动游戏是DCloud联合三方服务商为开发者提供新的广告场景增值服务|
#### 平台扩展
|API|说明|
...
...
docs/api/_sidebar.md
浏览文件 @
9dc4c047
...
...
@@ -2,8 +2,8 @@
*
基础
*
[
日志打印
](
api/log.md
)
*
[
定时器
](
api/timer.md
)
*
[
uni.base64ToArrayBuffer
](
api/base64ToArrayBuffer
?id=base64toarraybuffer
)
*
[
uni.arrayBufferToBase64
](
api/arrayBufferToBase64
?id=arraybuffertobase64
)
*
[
uni.base64ToArrayBuffer
](
api/base64ToArrayBuffer
.md
)
*
[
uni.arrayBufferToBase64
](
api/arrayBufferToBase64
.md
)
*
[
生命周期
](
api/lifecycle.md
)
*
[
应用级事件
](
api/application.md
)
*
[
拦截器
](
api/interceptor.md
)
...
...
@@ -15,7 +15,7 @@
*
[
SocketTask
](
api/request/socket-task.md
)
*
[
mDNS
](
api/request/mDNS.md
)
*
[
UDP 通信
](
api/request/UDP.md
)
*
路由与页面跳转
*
[
路由与页面跳转
](
/api/router
)
*
[
uni.navigateTo
](
/api/router?id=navigateto
)
*
[
uni.redirectTo
](
/api/router?id=redirectto
)
*
[
uni.reLaunch
](
/api/router?id=relaunch
)
...
...
@@ -23,7 +23,7 @@
*
[
uni.navigateBack
](
/api/router?id=navigateback
)
*
[
uni.preloadPage
](
/api/preload-page
)
*
[
窗口动画
](
/api/router?id=animation
)
*
数据缓存
*
[
数据缓存
](
/api/storage/storage
)
*
[
uni.setStorage
](
/api/storage/storage?id=setstorage
)
*
[
uni.setStorageSync
](
/api/storage/storage?id=setStorageSync
)
*
[
uni.getStorage
](
/api/storage/storage?id=getStorage
)
...
...
@@ -74,7 +74,7 @@
*
[
设备方向
](
api/system/deviceMotion.md
)
*
[
生物认证
](
api/system/authentication.md
)
*
[
Worker
](
api/worker.md
)
*
键盘
*
[
键盘
](
/api/key
)
*
[
uni.hideKeyboard
](
/api/key?id=hidekeyboard
)
*
[
uni.onKeyboardHeightChange
](
/api/key?id=onkeyboardheightchange
)
*
[
uni.offKeyboardHeightChange
](
/api/key?id=offkeyboardheightchange
)
...
...
@@ -83,7 +83,7 @@
*
[
设置导航条
](
api/ui/navigationbar.md
)
*
[
设置TabBar
](
api/ui/tabbar.md
)
*
[
背景
](
api/ui/bgcolor.md
)
*
[
动画
](
api/ui/animation
?id=unicreateanimationobject
)
*
[
动画
](
api/ui/animation
)
*
[
滚动
](
api/ui/scroll
)
*
[
窗口
](
api/ui/window.md
)
*
[
宽屏适配
](
api/ui/adapt.md
)
...
...
@@ -99,7 +99,7 @@
*
[
页面
](
api/window/window.md
)
*
[
页面通讯
](
api/window/communication.md
)
*
[
subNVue原生子窗体
](
api/window/subNVues.md
)
*
文件
*
[
文件
](
/api/file/file
)
*
[
uni.saveFile
](
/api/file/file?id=savefile
)
*
[
uni.getSavedFileList
](
/api/file/file?id=getSavedFileList
)
*
[
uni.getSavedFileInfo
](
/api/file/file?id=getSavedFileInfo
)
...
...
docs/api/key.md
浏览文件 @
9dc4c047
...
...
@@ -11,7 +11,7 @@
|√|√|√|√|x|√|√|√|√|
#### uni.onKeyboardHeightChange(CALLBACK)
#### uni.onKeyboardHeightChange(CALLBACK)
@onkeyboardheightchange
监听键盘高度变化
...
...
@@ -35,7 +35,7 @@ uni.onKeyboardHeightChange(res => {
})
```
#### uni.offKeyboardHeightChange(CALLBACK)
#### uni.offKeyboardHeightChange(CALLBACK)
@offkeyboardheightchange
取消监听键盘高度变化事件
...
...
docs/api/storage/storage.md
浏览文件 @
9dc4c047
...
...
@@ -23,7 +23,7 @@ uni.setStorage({
});
```
#### uni.setStorageSync(KEY,DATA)
#### uni.setStorageSync(KEY,DATA)
@setStorageSync
将 data 存储在本地缓存中指定的 key 中,会覆盖掉原来该 key 对应的内容,这是一个同步接口。
**参数说明**
...
...
@@ -41,7 +41,7 @@ try {
}
```
#### uni.getStorage(OBJECT)
#### uni.getStorage(OBJECT)
@getStorage
从本地缓存中异步获取指定 key 对应的内容。
**OBJECT 参数说明**
...
...
@@ -70,7 +70,7 @@ uni.getStorage({
});
```
#### uni.getStorageSync(KEY)
#### uni.getStorageSync(KEY)
@getStorageSync
从本地缓存中同步获取指定 key 对应的内容。
**参数说明**
...
...
@@ -92,7 +92,7 @@ try {
}
```
#### uni.getStorageInfo(OBJECT)
#### uni.getStorageInfo(OBJECT)
@getStorageInfo
异步获取当前 storage 的相关信息。
**平台差异说明**
...
...
@@ -129,7 +129,7 @@ uni.getStorageInfo({
});
```
#### uni.getStorageInfoSync()
#### uni.getStorageInfoSync()
@getStorageInfoSync
同步获取当前 storage 的相关信息。
**平台差异说明**
...
...
@@ -174,7 +174,7 @@ uni.removeStorage({
});
```
#### uni.removeStorageSync(KEY)
#### uni.removeStorageSync(KEY)
@removeStorageSync
从本地缓存中同步移除指定 key。
**参数说明**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录