<template>
  <tiny-pager
    @size-change="handleSizeChange"
    :current-page="currentPage"
    @update:current-page="currentPage = $event"
    :page-size="100"
    layout="total, sizes, prev, pager, next"
    :total="1000"
  >
  </tiny-pager>
</template>

<script>
import { TinyPager, Modal } from '@opentiny/vue'

export default {
  components: {
    TinyPager
  },
  data() {
    return {
      currentPage: 5
    }
  },
  methods: {
    handleSizeChange(val) {
      Modal.message({
        message: `size-change 事件，每页 ${val} 条`,
        status: 'info'
      })
    }
  }
}
</script>
