feat(Progress): add stroke-width prop (#4397)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user