<template>
  <div>
    <bxs-pull-refresh
      v-model="isLoading"
      @refresh="onRefresh"
      >
      <div class="demo-pull-refresh">
        当前刷新次数：{{ refreshTimes }}次
      </div>
    </bxs-pull-refresh>
  </div>
</template>
<script>
export default {
  data() {
    return {
      isLoading: false,
      refreshTimes: 0,
    }
  },
  created() {},
  methods: {
    onRefresh() {
      setTimeout(() => {
        this.refreshTimes = this.refreshTimes + 1
        this.isLoading = false
      }, 500)
    },
  },
}
</script>
<style>
.demo-pull-refresh {
  height: 100vh;
  font-size: 15px;
  line-height: 80px;
  text-align: center;
}
</style>
