ant-design-vue/components/vc-pagination/demo/lessPages.vue

32 lines
541 B
Vue
Raw Normal View History

2018-03-05 11:06:44 +00:00
<script>
2019-01-12 03:33:27 +00:00
import VcPagination from '../index';
import '../assets/index.less';
2018-03-05 11:06:44 +00:00
export default {
data () {
return {
current: 3,
2019-01-12 03:33:27 +00:00
};
2018-03-05 11:06:44 +00:00
},
methods: {
onChange (page) {
2019-01-12 03:33:27 +00:00
console.log(page);
this.current = page;
2018-03-05 11:06:44 +00:00
},
},
render () {
return (
<div>
<VcPagination
onChange={this.onChange}
current={this.current}
total={80}
showLessItems
/>
<VcPagination showLessItems defaultCurrent={1} total={60} />
</div>
2019-01-12 03:33:27 +00:00
);
2018-03-05 11:06:44 +00:00
},
2019-01-12 03:33:27 +00:00
};
2018-03-05 11:06:44 +00:00
</script>