Commit a7a7901407cbe6fdb03acbd523685642d5981ae1

Authored by 梁灏
1 parent 47dc36c5

fixed #3112

examples/routers/page.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 - <Page :total="total" show-sizer show-elevator show-total :current.sync="current"></Page> 3 + <Page :total="total" show-sizer show-elevator show-total transfer :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>
src/components/page/options.vue
1 <template> 1 <template>
2 <div v-if="showSizer || showElevator" :class="optsClasses"> 2 <div v-if="showSizer || showElevator" :class="optsClasses">
3 <div v-if="showSizer" :class="sizerClasses"> 3 <div v-if="showSizer" :class="sizerClasses">
4 - <i-select v-model="currentPageSize" :size="size" :placement="placement" @on-change="changeSize"> 4 + <i-select v-model="currentPageSize" :size="size" :placement="placement" :transfer="transfer" @on-change="changeSize">
5 <i-option v-for="item in pageSizeOpts" :key="item" :value="item" style="text-align:center;">{{ item }} {{ t('i.page.page') }}</i-option> 5 <i-option v-for="item in pageSizeOpts" :key="item" :value="item" style="text-align:center;">{{ item }} {{ t('i.page.page') }}</i-option>
6 </i-select> 6 </i-select>
7 </div> 7 </div>
@@ -42,7 +42,8 @@ @@ -42,7 +42,8 @@
42 pageSize: Number, 42 pageSize: Number,
43 allPages: Number, 43 allPages: Number,
44 isSmall: Boolean, 44 isSmall: Boolean,
45 - placement: String 45 + placement: String,
  46 + transfer: Boolean
46 }, 47 },
47 data () { 48 data () {
48 return { 49 return {
src/components/page/page.vue
@@ -55,6 +55,7 @@ @@ -55,6 +55,7 @@
55 :page-size="currentPageSize" 55 :page-size="currentPageSize"
56 :page-size-opts="pageSizeOpts" 56 :page-size-opts="pageSizeOpts"
57 :placement="placement" 57 :placement="placement"
  58 + :transfer="transfer"
58 :show-elevator="showElevator" 59 :show-elevator="showElevator"
59 :_current.once="currentPage" 60 :_current.once="currentPage"
60 :current="currentPage" 61 :current="currentPage"
@@ -101,6 +102,10 @@ @@ -101,6 +102,10 @@
101 }, 102 },
102 default: 'bottom' 103 default: 'bottom'
103 }, 104 },
  105 + transfer: {
  106 + type: Boolean,
  107 + default: false
  108 + },
104 size: { 109 size: {
105 validator (value) { 110 validator (value) {
106 return oneOf(value, ['small']); 111 return oneOf(value, ['small']);