Commit a7a7901407cbe6fdb03acbd523685642d5981ae1
1 parent
47dc36c5
fixed #3112
Showing
3 changed files
with
9 additions
and
3 deletions
Show diff stats
examples/routers/page.vue
1 | 1 | <template> |
2 | 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 | 4 | {{ current }} |
5 | 5 | <Button type="primary" @click="subject">- 1</Button> |
6 | 6 | <Button type="primary" @click="change">Change</Button> | ... | ... |
src/components/page/options.vue
1 | 1 | <template> |
2 | 2 | <div v-if="showSizer || showElevator" :class="optsClasses"> |
3 | 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 | 5 | <i-option v-for="item in pageSizeOpts" :key="item" :value="item" style="text-align:center;">{{ item }} {{ t('i.page.page') }}</i-option> |
6 | 6 | </i-select> |
7 | 7 | </div> |
... | ... | @@ -42,7 +42,8 @@ |
42 | 42 | pageSize: Number, |
43 | 43 | allPages: Number, |
44 | 44 | isSmall: Boolean, |
45 | - placement: String | |
45 | + placement: String, | |
46 | + transfer: Boolean | |
46 | 47 | }, |
47 | 48 | data () { |
48 | 49 | return { | ... | ... |
src/components/page/page.vue
... | ... | @@ -55,6 +55,7 @@ |
55 | 55 | :page-size="currentPageSize" |
56 | 56 | :page-size-opts="pageSizeOpts" |
57 | 57 | :placement="placement" |
58 | + :transfer="transfer" | |
58 | 59 | :show-elevator="showElevator" |
59 | 60 | :_current.once="currentPage" |
60 | 61 | :current="currentPage" |
... | ... | @@ -101,6 +102,10 @@ |
101 | 102 | }, |
102 | 103 | default: 'bottom' |
103 | 104 | }, |
105 | + transfer: { | |
106 | + type: Boolean, | |
107 | + default: false | |
108 | + }, | |
104 | 109 | size: { |
105 | 110 | validator (value) { |
106 | 111 | return oneOf(value, ['small']); | ... | ... |