Commit 81b641eed710b9f175d48b0a46b09a40f4cf82b7

Authored by 梁灏
1 parent 262c8524

Page support global setting

Showing 2 changed files with 10 additions and 8 deletions   Show diff stats
examples/routers/page.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 - <Page prev-text="上一页" next-text="下一页" :total="total" show-sizer show-elevator show-total transfer :current.sync="current"></Page> 3 + <Page prev-text="上一页" next-text="下一页" :total="total" show-sizer show-elevator show-total :current.sync="current"></Page>
4 {{ current }} 4 {{ current }}
5 <Button type="primary" @click="subject">- 1</Button> 5 <Button type="primary" @click="subject">- 1</Button>
6 <Button type="primary" @click="change">Change</Button> 6 <Button type="primary" @click="change">Change</Button>
7 <Page :current="2" :total="50" simple></Page> 7 <Page :current="2" :total="50" simple></Page>
8 8
9 <div style="margin:10px 0px"> 9 <div style="margin:10px 0px">
10 - <Page :total="1000" show-sizer show-elevator show-total transfer :current="12"></Page> 10 + <Page :total="1000" show-sizer show-elevator show-total :current="12"></Page>
11 </div> 11 </div>
12 <div style="margin:10px 0px"> 12 <div style="margin:10px 0px">
13 - <Page :total="1000" show-sizer show-elevator show-total transfer :current="12"></Page> 13 + <Page :total="1000" show-sizer show-elevator show-total :current="12"></Page>
14 </div> 14 </div>
15 <div style="margin:100px 0px"> 15 <div style="margin:100px 0px">
16 - <Page :total="500" show-sizer show-elevator show-total transfer ></Page> 16 + <Page :total="500" show-sizer show-elevator show-total ></Page>
17 </div> 17 </div>
18 <div style="margin:100px 0px"> 18 <div style="margin:100px 0px">
19 - <Page :total="500" show-sizer show-elevator transfer ></Page> 19 + <Page :total="500" show-sizer show-elevator ></Page>
20 </div> 20 </div>
21 <div style="margin:100px 0px"> 21 <div style="margin:100px 0px">
22 - <Page :total="500" show-sizer show-elevator transfer ></Page> 22 + <Page :total="500" show-sizer show-elevator ></Page>
23 </div> 23 </div>
24 <div style="margin:10px 0px"> 24 <div style="margin:10px 0px">
25 - <Page :total="500" show-sizer transfer ></Page> 25 + <Page :total="500" show-sizer ></Page>
26 </div> 26 </div>
27 <div style="margin: 10px 0px"> 27 <div style="margin: 10px 0px">
28 <Page :total="40" size="small"></Page> 28 <Page :total="40" size="small"></Page>
src/components/page/page.vue
@@ -104,7 +104,9 @@ @@ -104,7 +104,9 @@
104 }, 104 },
105 transfer: { 105 transfer: {
106 type: Boolean, 106 type: Boolean,
107 - default: false 107 + default () {
  108 + return this.$IVIEW.transfer === '' ? false : this.$IVIEW.transfer;
  109 + }
108 }, 110 },
109 size: { 111 size: {
110 validator (value) { 112 validator (value) {