Progress: fix incorrect vertical align if percent is zero

pull/6567/head
kingwl 2017-08-17 16:09:52 +08:00 committed by 杨奕
parent 8e942878da
commit e647bc994f
2 changed files with 9 additions and 0 deletions

View File

@ -96,6 +96,7 @@
text-align: right; text-align: right;
border-radius: 100px; border-radius: 100px;
line-height: 1; line-height: 1;
white-space: nowrap;
@utils-vertical-center; @utils-vertical-center;
} }

View File

@ -87,4 +87,12 @@ describe('Progress', () => {
expect(vm.$el.querySelector('.el-progress-circle').style.height).to.be.equal('120px'); expect(vm.$el.querySelector('.el-progress-circle').style.height).to.be.equal('120px');
expect(vm.$el.querySelector('.el-progress-circle').style.width).to.be.equal('120px'); expect(vm.$el.querySelector('.el-progress-circle').style.width).to.be.equal('120px');
}); });
it('should work with stroke-width', () => {
vm = createVue({
template: `
<el-progress :text-inside="true" :stroke-width="36" :percentage="0"></el-progress>
`
}, true);
expect(vm.$el.querySelector('.el-progress-bar__innerText').offsetTop).to.be.equal(12);
});
}); });