Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
1a9fc7a6
U
uni-app
项目概览
DCloud
/
uni-app
3 个月 前同步成功
通知
725
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1a9fc7a6
编写于
7月 21, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(types): setTimeout
上级
3a67ae3a
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
12 addition
and
11 deletion
+12
-11
packages/uni-app-plus/src/service/api/context/createInnerAudioContext.ts
...p-plus/src/service/api/context/createInnerAudioContext.ts
+3
-3
packages/uni-app-plus/src/service/api/context/getBackgroundAudioManager.ts
...plus/src/service/api/context/getBackgroundAudioManager.ts
+1
-1
packages/uni-app-plus/src/service/api/media/getRecorderManager.ts
.../uni-app-plus/src/service/api/media/getRecorderManager.ts
+1
-1
packages/uni-app-plus/src/service/api/network/request.ts
packages/uni-app-plus/src/service/api/network/request.ts
+1
-1
packages/uni-app-plus/src/service/api/ui/popup/showToast.ts
packages/uni-app-plus/src/service/api/ui/popup/showToast.ts
+1
-1
packages/uni-app-vite/dist/index.js
packages/uni-app-vite/dist/index.js
+1
-0
packages/uni-core/src/helpers/scroll.ts
packages/uni-core/src/helpers/scroll.ts
+2
-2
packages/uni-core/src/view/init/longPress.ts
packages/uni-core/src/view/init/longPress.ts
+2
-2
未找到文件。
packages/uni-app-plus/src/service/api/context/createInnerAudioContext.ts
浏览文件 @
1a9fc7a6
...
...
@@ -198,7 +198,7 @@ const onAudioStateChange = ({
}
},
200
)
}
else
if
(
state
===
'
pause
'
||
state
===
'
stop
'
||
state
===
'
error
'
)
{
clearInterval
(
audio
.
__timing
)
clearInterval
(
audio
.
__timing
!
)
}
}
}
...
...
@@ -306,7 +306,7 @@ class InnerAudioContext implements UniApp.InnerAudioContext {
*
* @param __timing 当前Audio所使用的timer
*/
__timing
?:
number
__timing
?:
ReturnType
<
typeof
setInterval
>
_options
:
Data
constructor
(
id
:
string
)
{
this
.
id
=
id
...
...
@@ -366,7 +366,7 @@ class InnerAudioContext implements UniApp.InnerAudioContext {
}
destroy
()
{
clearInterval
(
this
.
__timing
)
clearInterval
(
this
.
__timing
!
)
if
(
audios
[
this
.
id
])
{
audios
[
this
.
id
].
close
()
delete
audios
[
this
.
id
]
...
...
packages/uni-app-plus/src/service/api/context/getBackgroundAudioManager.ts
浏览文件 @
1a9fc7a6
...
...
@@ -78,7 +78,7 @@ const callbacks: Record<eventNames, Function[]> = {
}
let
audio
:
Audio
let
timeUpdateTimer
:
number
|
null
=
null
let
timeUpdateTimer
:
ReturnType
<
typeof
setInterval
>
|
null
=
null
const
TIME_UPDATE
=
250
const
events
:
Events
[]
=
[
'
play
'
,
'
pause
'
,
'
ended
'
,
'
stop
'
,
'
canplay
'
]
...
...
packages/uni-app-plus/src/service/api/media/getRecorderManager.ts
浏览文件 @
1a9fc7a6
...
...
@@ -15,7 +15,7 @@ interface Recorder {
let
recorder
:
PlusAudioAudioRecorder
let
recording
:
boolean
=
false
let
recordTimeout
:
number
let
recordTimeout
:
ReturnType
<
typeof
setTimeout
>
const
publishRecorderStateChange
=
(
state
:
string
,
res
=
{})
=>
{
onRecorderStateChange
(
...
...
packages/uni-app-plus/src/service/api/network/request.ts
浏览文件 @
1a9fc7a6
...
...
@@ -136,7 +136,7 @@ export const request = defineTaskApi<API_TYPE_REQUEST>(
const
stream
=
requireNativePlugin
(
'
stream
'
)
const
headers
:
Headers
=
{}
let
abortTimeout
:
number
let
abortTimeout
:
ReturnType
<
typeof
setTimeout
>
let
aborted
:
boolean
let
hasContentType
=
false
...
...
packages/uni-app-plus/src/service/api/ui/popup/showToast.ts
浏览文件 @
1a9fc7a6
...
...
@@ -23,7 +23,7 @@ type ToastType = 'loading' | 'toast' | ''
let
toast
:
PlusNativeUIWaitingObj
|
null
let
isShowToast
:
boolean
=
false
let
toastType
:
ToastType
=
''
let
timeout
:
number
|
null
let
timeout
:
ReturnType
<
typeof
setTimeout
>
|
null
export
const
showLoading
=
defineAsyncApi
<
API_TYPE_SHOW_LOADING
>
(
API_SHOW_LOADING
,
...
...
packages/uni-app-vite/dist/index.js
浏览文件 @
1a9fc7a6
...
...
@@ -17,6 +17,7 @@ const plugins = [
mainJs_1
.
uniMainJsPlugin
(),
manifestJson_1
.
uniManifestJsonPlugin
(),
pagesJson_1
.
uniPagesJsonPlugin
(),
uni_cli_shared_1
.
uniViteInjectPlugin
(
uni_cli_shared_1
.
initProvide
()),
plugin_1
.
UniAppPlugin
,
];
if
(
!
process
.
env
.
UNI_APP_CODE_SPLITING
)
{
...
...
packages/uni-core/src/helpers/scroll.ts
浏览文件 @
1a9fc7a6
...
...
@@ -6,8 +6,8 @@ export interface CreateScrollListenerOptions {
export
function
disableScrollListener
(
evt
:
Event
)
{
evt
.
preventDefault
()
}
let
testReachBottomTimer
:
number
// 不直接声明为 number,可能跟 node.setTimeout 有冲突
let
testReachBottomTimer
:
ReturnType
<
typeof
setTimeout
>
let
lastScrollHeight
=
0
export
function
createScrollListener
({
onPageScroll
,
...
...
packages/uni-core/src/view/init/longPress.ts
浏览文件 @
1a9fc7a6
...
...
@@ -5,12 +5,12 @@ const LONGPRESS_THRESHOLD = 10
const
passiveOptions
=
passive
(
true
)
let
longPressTimer
=
0
let
longPressTimer
:
ReturnType
<
typeof
setTimeout
>
|
null
function
clearLongPressTimer
()
{
if
(
longPressTimer
)
{
clearTimeout
(
longPressTimer
)
longPressTimer
=
0
longPressTimer
=
null
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录