iview/examples/routers/page.vue

55 lines
1.8 KiB
Vue
Raw Normal View History

2016-09-09 14:29:19 +08:00
<template>
2017-08-08 11:23:50 -05:00
<div>
2018-06-28 15:09:02 +08:00
<Page prev-text="上一页" next-text="下一页" :total="total" show-sizer show-elevator show-total :current.sync="current"></Page>
2017-08-10 11:28:44 -05:00
{{ current }}
2017-08-08 11:23:50 -05:00
<Button type="primary" @click="subject">- 1</Button>
2017-08-10 11:28:44 -05:00
<Button type="primary" @click="change">Change</Button>
2017-11-07 17:07:03 +08:00
<Page :current="2" :total="50" simple></Page>
2018-03-16 17:22:03 +08:00
<div style="margin:10px 0px">
2018-06-28 15:09:02 +08:00
<Page :total="1000" show-sizer show-elevator show-total :current="12"></Page>
2018-03-16 16:58:20 +08:00
</div>
2018-03-16 17:22:03 +08:00
<div style="margin:10px 0px">
2018-06-28 15:09:02 +08:00
<Page :total="1000" show-sizer show-elevator show-total :current="12"></Page>
2018-03-16 16:58:20 +08:00
</div>
2018-03-16 17:22:03 +08:00
<div style="margin:100px 0px">
2018-06-28 15:09:02 +08:00
<Page :total="500" show-sizer show-elevator show-total ></Page>
2018-03-16 16:58:20 +08:00
</div>
2018-03-16 17:22:03 +08:00
<div style="margin:100px 0px">
2018-06-28 15:09:02 +08:00
<Page :total="500" show-sizer show-elevator ></Page>
2018-03-16 16:58:20 +08:00
</div>
2018-03-16 17:22:03 +08:00
<div style="margin:100px 0px">
2018-06-28 15:09:02 +08:00
<Page :total="500" show-sizer show-elevator ></Page>
2018-03-16 16:58:20 +08:00
</div>
2018-03-16 17:22:03 +08:00
<div style="margin:10px 0px">
2018-06-28 15:09:02 +08:00
<Page :total="500" show-sizer ></Page>
2018-03-16 16:58:20 +08:00
</div>
2018-06-22 10:40:40 +08:00
<div style="margin: 10px 0px">
<Page :total="40" size="small"></Page>
<br><br>
<Page :total="40" size="small" show-elevator show-sizer></Page>
<br><br>
<Page :total="40" size="small" show-total></Page>
<br><br>
</div>
2017-08-08 11:23:50 -05:00
</div>
2016-09-09 14:29:19 +08:00
</template>
<script>
export default {
2017-08-08 11:23:50 -05:00
data () {
return {
2017-08-10 11:28:44 -05:00
current: 1,
2017-08-08 11:23:50 -05:00
total: 21
}
},
methods: {
subject() {
this.total -= 1;
2017-08-10 11:28:44 -05:00
},
change() {
this.current = 1;
2017-08-08 11:23:50 -05:00
}
}
2016-09-09 14:29:19 +08:00
}
2016-10-28 17:24:52 +08:00
</script>