Skip to content

Commit

Permalink
chore(scroll): update scroll example
Browse files Browse the repository at this point in the history
  • Loading branch information
tank0317 committed Sep 23, 2018
1 parent 2ebf28e commit fb82e16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion example/pages/scroll/jd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class="cube-pulldown-wrapper"
:style="pullDownStyle">
<div class="pulldown-content">
<img src="http://om0jxp12h.bkt.clouddn.com/pulldow-img.jpg">
<img src="http://om0jxp12h.bkt.clouddn.com/pulldow-img.jpg" @load="onImgLoad">
<span v-if="props.beforePullDown">{{ pullDownTip }}</span>
<template v-else>
<span v-if="props.isPullingDown">正在更新...</span>
Expand Down Expand Up @@ -102,6 +102,9 @@ export default {
this.triggerSurprise = false
this.$refs.topHeader.style.opacity = 1
// go to other page
},
onImgLoad() {
this.$refs.scroll.refresh()
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion example/pages/scroll/toutiao.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@pulling-up="onPullingUp">
<ul class="imgs-wrapper">
<li v-for="(item, index) in content" :key="index" class="imgs-item">
<img :src="item.url">
<img :src="item.url" @load="onImgLoad">
</li>
</ul>
<template slot="pulldown" slot-scope="props">
Expand Down Expand Up @@ -101,6 +101,9 @@ export default {
setTimeout(() => {
this.content = this.content.concat(imgs)
}, 1000)
},
onImgLoad() {
this.$refs.contentScroll.refresh()
}
},
mounted() {
Expand Down

0 comments on commit fb82e16

Please sign in to comment.