feat(Circle): add stroke-linecap prop (#5087)
* feat(Circle): add stroke-linecap prop * docs: butt
This commit is contained in:
@@ -13,3 +13,10 @@ exports[`speed is 0 1`] = `
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000" stroke="#1989fa" class="van-circle__layer" style="stroke: #1989fa; stroke-width: 41px; stroke-dasharray: 1570px 3140px;"></path>
|
||||
</svg></div>
|
||||
`;
|
||||
|
||||
exports[`stroke-linecap prop 1`] = `
|
||||
<div class="van-circle" style="width: 100px; height: 100px;"><svg viewBox="0 0 1040 1040">
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000" class="van-circle__hover" style="fill: none; stroke: #fff; stroke-width: 40px;"></path>
|
||||
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000" stroke="#1989fa" class="van-circle__layer" style="stroke: #1989fa; stroke-width: 41px; stroke-linecap: square; stroke-dasharray: 0px 3140px;"></path>
|
||||
</svg></div>
|
||||
`;
|
||||
|
||||
@@ -47,3 +47,13 @@ test('size prop', () => {
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('stroke-linecap prop', () => {
|
||||
const wrapper = mount(Circle, {
|
||||
propsData: {
|
||||
strokeLinecap: 'square'
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user