Skip to content

初始化loadmore出现错误,哪里出现错误了 #29

Description

<template>
	<div>
		<loadmore :top-method="loadTop" :bottom-method="loadBottom" :bottom-all-loaded="allLoaded" ref="loadmore">
		  <ul>
		    	<li v-for="item in list">{{ item }}</li>
		  </ul>
		</loadmore>
	</div>
</template>
<script type="text/javascript-6">
	import loadmore from 'vue-loadmore';
	export default {
		data(){
			return {
				list: [],
				allLoaded: false
			}
		},
		components:{
			loadmore
		},
		methods:{
			loadTop(id){
				console.log(1);
				this.$refs.loadmore.onTopLoaded();
			},
			loadBottom(id) {
				this.allLoaded = true;// 若数据已全部获取完毕
    			this.$refs.loadmore.onBottomLoaded();
			}
		}
	}
</script>
<style scoped>
	
</style>

image
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions