feat(Progress): add stroke-width prop (#4397)

This commit is contained in:
neverland
2019-09-08 16:49:17 +08:00
committed by GitHub
parent 88433a9c61
commit 7dbfbb9bcd
6 changed files with 45 additions and 20 deletions
@@ -5,6 +5,9 @@ exports[`renders demo correctly 1`] = `
<div>
<div class="van-progress"><span class="van-progress__portion" style="background: rgb(25, 137, 250); width: 0px;"><span class="van-progress__pivot" style="color: rgb(255, 255, 255); left: 0px; background: rgb(25, 137, 250);">50%</span></span></div>
</div>
<div>
<div class="van-progress" style="height: 8px;"><span class="van-progress__portion" style="background: rgb(25, 137, 250); width: 0px;"><span class="van-progress__pivot" style="color: rgb(255, 255, 255); left: 0px; background: rgb(25, 137, 250);">50%</span></span></div>
</div>
<div>
<div class="van-progress"><span class="van-progress__portion" style="background: rgb(202, 202, 202); width: 0px;"><span class="van-progress__pivot" style="color: rgb(255, 255, 255); left: 0px; background: rgb(202, 202, 202);">50%</span></span></div>
</div>
+4 -2
View File
@@ -1,16 +1,18 @@
import Progress from '..';
import { mount } from '../../../test/utils';
import { mount, later } from '../../../test/utils';
test('calc width', () => {
test('calc width', async () => {
const wrapper = mount(Progress, {
propsData: {
showPivot: false,
percentage: 100
}
});
await later();
expect(wrapper).toMatchSnapshot();
wrapper.vm.showPivot = true;
wrapper.vm.pivotText = 'test';
await later();
expect(wrapper).toMatchSnapshot();
});