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.
|
|
|
|
|
|
|
<cn>
|
|
|
|
#### 改变
|
|
|
|
改变每页显示条目数。
|
|
|
|
</cn>
|
|
|
|
|
|
|
|
<us>
|
|
|
|
#### Changer
|
|
|
|
Change `pageSize`.
|
|
|
|
</us>
|
|
|
|
|
|
|
|
```html
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<a-pagination showSizeChanger @showSizeChange="onShowSizeChange" :defaultCurrent="3" :total="500" />
|
|
|
|
<br/>
|
|
|
|
<a-pagination showSizeChanger :pageSize.sync="pageSize" @showSizeChange="onShowSizeChange" :total="500" v-model="current"/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data(){
|
|
|
|
return {
|
|
|
|
pageSize: 20,
|
|
|
|
current:4,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch:{
|
|
|
|
pageSize(val) {
|
|
|
|
console.log('pageSize',val);
|
|
|
|
},
|
|
|
|
current(val) {
|
|
|
|
console.log('current',val);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
onShowSizeChange(current, pageSize) {
|
|
|
|
console.log(current, pageSize);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
```
|
|
|
|
|