Page support global setting

This commit is contained in:
梁灏 2018-06-28 15:09:02 +08:00
parent 262c8524ce
commit 81b641eed7
2 changed files with 10 additions and 8 deletions

View file

@ -1,28 +1,28 @@
<template>
<div>
<Page prev-text="上一页" next-text="下一页" :total="total" show-sizer show-elevator show-total transfer :current.sync="current"></Page>
<Page prev-text="上一页" next-text="下一页" :total="total" show-sizer show-elevator show-total :current.sync="current"></Page>
{{ current }}
<Button type="primary" @click="subject">- 1</Button>
<Button type="primary" @click="change">Change</Button>
<Page :current="2" :total="50" simple></Page>
<div style="margin:10px 0px">
<Page :total="1000" show-sizer show-elevator show-total transfer :current="12"></Page>
<Page :total="1000" show-sizer show-elevator show-total :current="12"></Page>
</div>
<div style="margin:10px 0px">
<Page :total="1000" show-sizer show-elevator show-total transfer :current="12"></Page>
<Page :total="1000" show-sizer show-elevator show-total :current="12"></Page>
</div>
<div style="margin:100px 0px">
<Page :total="500" show-sizer show-elevator show-total transfer ></Page>
<Page :total="500" show-sizer show-elevator show-total ></Page>
</div>
<div style="margin:100px 0px">
<Page :total="500" show-sizer show-elevator transfer ></Page>
<Page :total="500" show-sizer show-elevator ></Page>
</div>
<div style="margin:100px 0px">
<Page :total="500" show-sizer show-elevator transfer ></Page>
<Page :total="500" show-sizer show-elevator ></Page>
</div>
<div style="margin:10px 0px">
<Page :total="500" show-sizer transfer ></Page>
<Page :total="500" show-sizer ></Page>
</div>
<div style="margin: 10px 0px">
<Page :total="40" size="small"></Page>

View file

@ -104,7 +104,9 @@
},
transfer: {
type: Boolean,
default: false
default () {
return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
}
},
size: {
validator (value) {