Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
我本凡人 一念云泥
uni-app
提交
62c17acf
uni-app
项目概览
我本凡人 一念云泥
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
62c17acf
编写于
8月 24, 2020
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' into alpha
上级
4d9fe326
a4e1dbb5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
28 deletion
+24
-28
src/core/service/bridge/on.js
src/core/service/bridge/on.js
+3
-0
src/core/view/components/resize-sensor/index.vue
src/core/view/components/resize-sensor/index.vue
+21
-28
未找到文件。
src/core/service/bridge/on.js
浏览文件 @
62c17acf
...
...
@@ -54,6 +54,9 @@ export default function initOn (on, {
function
onAppEnterForeground
()
{
const
pages
=
getCurrentPages
()
if
(
pages
.
length
===
0
)
{
return
}
const
page
=
pages
[
pages
.
length
-
1
]
const
args
=
{
path
:
page
.
route
,
...
...
src/core/view/components/resize-sensor/index.vue
浏览文件 @
62c17acf
<
template
>
<uni-resize-sensor
@
animationstart.once=
"update"
>
<div
@
scroll=
"update"
>
<div
/>
</div>
<div
@
scroll=
"update"
>
<div
/>
</div>
</uni-resize-sensor>
</
template
>
<
script
>
const
MAX
=
100000
export
default
{
name
:
'
ResizeSensor
'
,
props
:
{
...
...
@@ -36,42 +48,23 @@ export default {
this
.
reset
()
}
},
activated
()
{
this
.
reset
()
},
methods
:
{
reset
:
function
()
{
var
expand
=
this
.
$el
.
firstChild
var
shrink
=
this
.
$el
.
lastChild
expand
.
scroll
Left
=
100000
expand
.
scrollTop
=
100000
shrink
.
scrollLeft
=
100000
shrink
.
scrollTop
=
100000
const
expand
=
this
.
$el
.
firstChild
expand
.
scrollLeft
=
MAX
expand
.
scroll
Top
=
MAX
const
shrink
=
this
.
$el
.
lastChild
shrink
.
scrollLeft
=
MAX
shrink
.
scrollTop
=
MAX
},
update
:
function
()
{
this
.
size
.
width
=
this
.
$el
.
offsetWidth
this
.
size
.
height
=
this
.
$el
.
offsetHeight
this
.
reset
()
}
},
render
:
function
(
create
)
{
return
create
(
'
uni-resize-sensor
'
,
{
on
:
{
'
~animationstart
'
:
this
.
update
}
},
[
create
(
'
div
'
,
{
on
:
{
scroll
:
this
.
update
}
},
[
create
(
'
div
'
)
]),
create
(
'
div
'
,
{
on
:
{
scroll
:
this
.
update
}
},
[
create
(
'
div
'
)
])
])
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录