diff --git a/packages/theme-default/src/pagination.css b/packages/theme-default/src/pagination.css index 0638c2a9c..cfd1f5676 100644 --- a/packages/theme-default/src/pagination.css +++ b/packages/theme-default/src/pagination.css @@ -7,6 +7,7 @@ white-space: nowrap; padding: 2px 5px; color: var(--pagination-color); + @utils-clearfix; span, button { diff --git a/test/unit/specs/pagination.spec.js b/test/unit/specs/pagination.spec.js index 555d75e5e..f2a121f60 100644 --- a/test/unit/specs/pagination.spec.js +++ b/test/unit/specs/pagination.spec.js @@ -40,6 +40,18 @@ describe('Pagination', () => { expect(elm.querySelector('.el-pagination__total')).to.not.exist; }); + it('layout: all in right, need clear float', () => { + vm = createTest(Pagination, { + layout: '->, prev, pager, next', + total: 100 + }, true); + const elm = vm.$el; + let right_div = elm.querySelector('.el-pagination__rightwrapper'); + expect(elm.clientHeight > 0 && right_div.clientHeight > 0).to.equal(true); + // elm 将来 padding 可能会变化, 所以使用 >= 来判定 + expect(elm.clientHeight >= right_div.clientHeight).to.equal(true); + }); + it('custom slot', () => { vm = createVue({ template: `