Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wychl
uni-app
提交
6c6903d3
U
uni-app
项目概览
wychl
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6c6903d3
编写于
8月 21, 2020
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 解决 iOS13 部分组件触摸交互时UI失去响应的问题 question/98881
上级
54cb9604
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
30 deletion
+28
-30
src/core/view/components/movable-area/index.vue
src/core/view/components/movable-area/index.vue
+2
-0
src/core/view/components/movable-view/index.vue
src/core/view/components/movable-view/index.vue
+2
-0
src/core/view/components/picker-view-column/index.vue
src/core/view/components/picker-view-column/index.vue
+2
-0
src/core/view/components/scroll-view/index.vue
src/core/view/components/scroll-view/index.vue
+2
-0
src/platforms/app-plus/helpers/scroll.js
src/platforms/app-plus/helpers/scroll.js
+16
-30
src/platforms/h5/helpers/scroll.js
src/platforms/h5/helpers/scroll.js
+4
-0
未找到文件。
src/core/view/components/movable-area/index.vue
浏览文件 @
6c6903d3
...
...
@@ -3,6 +3,7 @@ import {
deepClone
}
from
'
uni-shared
'
import
{
initScrollBounce
,
disableScrollBounce
}
from
'
uni-platform/helpers/scroll
'
...
...
@@ -34,6 +35,7 @@ export default {
},
mounted
:
function
()
{
this
.
_resize
()
initScrollBounce
()
},
methods
:
{
_resize
()
{
...
...
src/core/view/components/movable-view/index.vue
浏览文件 @
6c6903d3
...
...
@@ -12,6 +12,7 @@ import {
STD
}
from
'
./utils
'
import
{
initScrollBounce
,
disableScrollBounce
}
from
'
uni-platform/helpers/scroll
'
var
requesting
=
false
...
...
@@ -227,6 +228,7 @@ export default {
this
.
_friction
.
reconfigure
(
1
,
this
.
frictionNumber
)
this
.
_STD
.
reconfigure
(
1
,
9
*
Math
.
pow
(
this
.
dampingNumber
,
2
)
/
40
,
this
.
dampingNumber
)
this
.
$el
.
style
.
transformOrigin
=
'
center
'
initScrollBounce
()
},
methods
:
{
_getPx
(
val
)
{
...
...
src/core/view/components/picker-view-column/index.vue
浏览文件 @
6c6903d3
...
...
@@ -8,6 +8,7 @@ import {
Spring
}
from
'
uni-mixins/scroller/Spring
'
import
{
initScrollBounce
,
disableScrollBounce
}
from
'
uni-platform/helpers/scroll
'
...
...
@@ -93,6 +94,7 @@ export default {
this
.
update
()
})
initClick
(
this
.
$el
)
initScrollBounce
()
},
methods
:
{
_setItemHeight
(
height
)
{
...
...
src/core/view/components/scroll-view/index.vue
浏览文件 @
6c6903d3
...
...
@@ -74,6 +74,7 @@ import {
supportsPassive
}
from
'
uni-shared
'
import
{
initScrollBounce
,
disableScrollBounce
}
from
'
uni-platform/helpers/scroll
'
...
...
@@ -294,6 +295,7 @@ export default {
passive
:
false
}
:
false
)
this
.
$refs
.
main
.
addEventListener
(
'
touchend
'
,
this
.
__handleTouchEnd
,
passiveOptions
)
initScrollBounce
()
},
activated
()
{
// 还原 scroll-view 滚动位置
...
...
src/platforms/app-plus/helpers/scroll.js
浏览文件 @
6c6903d3
...
...
@@ -2,40 +2,26 @@ import {
plusReady
}
from
'
uni-shared
'
let
view
let
web
view
let
pullToRefreshStyle
let
disabled
const
lastAction
=
{}
export
function
initScrollBounce
()
{
plusReady
(()
=>
{
if
(
!
webview
)
{
webview
=
plus
.
webview
.
currentWebview
()
}
if
(
!
pullToRefreshStyle
)
{
pullToRefreshStyle
=
(
webview
.
getStyle
()
||
{}).
pullToRefresh
||
{}
}
})
}
export
function
disableScrollBounce
({
disable
})
{
function
exec
()
{
if
(
!
view
)
{
view
=
plus
.
webview
.
currentWebview
()
}
if
(
!
disabled
)
{
pullToRefreshStyle
=
(
view
.
getStyle
()
||
{}).
pullToRefresh
||
{}
}
disabled
=
disable
if
(
pullToRefreshStyle
.
support
)
{
view
.
setPullToRefresh
(
Object
.
assign
({},
pullToRefreshStyle
,
{
support
:
!
disable
}))
}
}
const
time
=
Date
.
now
()
if
(
disable
===
lastAction
.
disable
&&
time
-
lastAction
.
time
<
20
)
{
return
if
(
pullToRefreshStyle
&&
pullToRefreshStyle
.
support
)
{
webview
.
setPullToRefresh
(
Object
.
assign
({},
pullToRefreshStyle
,
{
support
:
!
disable
}))
}
lastAction
.
disable
=
disable
lastAction
.
time
=
time
plusReady
(()
=>
{
if
(
plus
.
os
.
name
===
'
iOS
'
)
{
// 延迟执行避免iOS13触摸卡死
setTimeout
(
exec
,
20
)
}
else
{
exec
()
}
})
}
src/platforms/h5/helpers/scroll.js
浏览文件 @
6c6903d3
export
function
initScrollBounce
()
{
}
export
function
disableScrollBounce
({
disable
})
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录