Browse Source

Pagination: add popperClass

Leopoldthecoder 8 years ago
parent
commit
a5e5be3d7a

+ 1 - 0
examples/docs/en-US/pagination.md

@@ -205,6 +205,7 @@ Add more modules based on your scenario.
 | current-page | current page number, supports the .sync modifier | number | — | 1 |
 | layout | layout of Pagination, elements separated with a comma | string | `sizes`, `prev`, `pager`, `next`, `jumper`, `->`, `total`, `slot` | 'prev, pager, next, jumper, ->, total'  |
 | page-sizes | options of item count per page | number[] | — |  [10, 20, 30, 40, 50, 100] |
+| popper-class | custom class name for the page size Select's dropdown | string | — | — |
 
 ### Events
 | Event Name | Description | Parameters |

+ 1 - 0
examples/docs/zh-CN/pagination.md

@@ -205,6 +205,7 @@
 | current-page | 当前页数,支持 .sync 修饰符 | Number | — | 1 |
 | layout | 组件布局,子组件名用逗号分隔| String | `sizes`, `prev`, `pager`, `next`, `jumper`, `->`, `total`, `slot` | 'prev, pager, next, jumper, ->, total'  |
 | page-sizes | 每页显示个数选择器的选项设置 | Number[] | — |  [10, 20, 30, 40, 50, 100] |
+| popper-class | 每页显示个数选择器的下拉框类名 | string | — | — |
 
 ### Events
 | 事件名称 | 说明 | 回调参数 |

+ 4 - 1
packages/pagination/src/pagination.js

@@ -32,7 +32,9 @@ export default {
       default() {
         return [10, 20, 30, 40, 50, 100];
       }
-    }
+    },
+
+    popperClass: String
   },
 
   data() {
@@ -147,6 +149,7 @@ export default {
           <span class="el-pagination__sizes">
             <el-select
               value={ this.$parent.internalPageSize }
+              popperClass={ this.$parent.popperClass }
               on-input={ this.handleChange }>
               {
                 this.pageSizes.map(item =>