请教外层的wrap必须要设置高度吗
alasai opened this issue · 0 comments
alasai commented
<script>
import is from 'is'
import util from 'util'
import MugenScroll from 'vue-mugen-scroll'
export default {
name: 'app',
data() {
return {
recentitems: [], count: 1, loading: false
}
},
methods: {
getHumanDate : function (date) {
return moment(date).format("YYYY-MM-DD")
},
async fetchUsers() {
this.loading = true
util.get(`News/recentimgnews?page=`+this.count+`&time=`, {}, ({data}) => {
if(data.length>0)
{
data.forEach((item) => this.recentitems.push(item))
}
})
this.count++
this.loading = false
}
},
components: {
MugenScroll
}
}
</script>
这里有两个问题:
1)外层的wrap必须要设置高度吗
2)数据加载完成之后,下拉然后在上拉,又会触发事件,请问怎样才可以停止