You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/pagination/demo/jump.vue

48 lines
822 B

<docs>
---
order: 4
title:
zh-CN: 跳转
en-US: Jumper
---
## zh-CN
快速跳转到某一页
## en-US
Jump to a page directly.
</docs>
<template>
<div>
<a-pagination v-model:current="current1" show-quick-jumper :total="500" @change="onChange" />
<br />
<a-pagination
v-model:current="current2"
show-quick-jumper
:total="500"
disabled
show-less-items
@change="onChange"
/>
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
export default defineComponent({
setup() {
const current1 = ref<number>(1);
const current2 = ref<number>(2);
const onChange = (pageNumber: number) => {
console.log('Page: ', pageNumber);
};
return {
current1,
current2,
onChange,
};
},
});
</script>