未验证 提交 1ef817f3 编写于 作者: Q QiuShuiBai 提交者: GitHub

fix(scroll): fix a bug about the scroll example (#739)

should call refresh() method after the image has been loaded
上级 09aadc46
......@@ -9,7 +9,8 @@
:options="options"
@scroll="onScrollHandle"
@pulling-down="onPullingDown">
<img src="https://dpubstatic.udache.com/static/dpubimg/RWEjWgWJ4x/jd_content.JPG">
<img src="https://dpubstatic.udache.com/static/dpubimg/RWEjWgWJ4x/jd_content.JPG" @load="onImgLoad">
<img class="ghostly-img" src="https://dpubstatic.udache.com/static/dpubimg/cVujBAH2sp/jd_footer2.png" @load="onImgLoad">
<template slot="pulldown" slot-scope="props">
<div
v-if="props.pullDownRefresh"
......@@ -41,6 +42,8 @@
<script type="text/ecmascript-6">
import CubePage from '../../components/cube-page.vue'
let imagesCount = 3
export default {
data() {
return {
......@@ -104,7 +107,9 @@ export default {
// go to other page
},
onImgLoad() {
this.$refs.scroll.refresh()
if (--imagesCount === 0) {
this.$refs.scroll.refresh()
}
}
}
}
......@@ -136,6 +141,8 @@ export default {
img
width: 100%
// height: 50px
.ghostly-img
opacity 0
.cube-pulldown-wrapper
transform: translateY(-100%)
line-height: 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册