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

43 lines
937 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 VcSelect from '../../vc-select';
import '../assets/index.less';
import '../../vc-select/assets/index.less';
2018-03-05 11:06:44 +00:00
export default {
2019-09-28 12:45:07 +00:00
data() {
2018-03-05 11:06:44 +00:00
return {
pageSize: 20,
2019-01-12 03:33:27 +00:00
};
2018-03-05 11:06:44 +00:00
},
methods: {
2019-09-28 12:45:07 +00:00
onShowSizeChange(current, pageSize) {
2019-01-12 03:33:27 +00:00
console.log(current);
this.pageSize = pageSize;
2018-03-05 11:06:44 +00:00
},
},
2019-09-28 12:45:07 +00:00
render() {
2018-03-05 11:06:44 +00:00
return (
<div style={{ margin: 10 }}>
<VcPagination
selectComponentClass={VcSelect}
showSizeChanger
pageSize={this.pageSize}
onShowSizeChange={this.onShowSizeChange}
defaultCurrent={3}
total={500}
/>
<VcPagination
selectComponentClass={VcSelect}
showSizeChanger
pageSize={this.pageSize}
onShowSizeChange={this.onShowSizeChange}
defaultCurrent={3}
total={500}
/>
</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>