export default {
  data () {
    return {
      moreDataObj: {}
    }
  },
  mounted () {},
  methods: {
    pageHandle2(page) {
      this.currentPage = page
      let pagenation = {...this.pagenation}
      pagenation.page = page
      this.fetchData({pagenation: JSON.stringify(pagenation)})
    },
    getMoreData (data) {
      this.moreDataObj = data
      this.pagenation = data.pagenation
      if (this.currentPage === 1) this.pageSize = data.pagenation.page_size ? Number(data.pagenation.page_size) : 0
      this.totalRecords = data.pagenation.total_row ? Number(data.pagenation.total_row) : 0
      const timer = window.setTimeout(() => {
        document.getElementsByClassName('xl-pagination')[0].className += ' xl-page-more'
        clearTimeout(timer)
      }, 30)
    }
  }
}
