feat(Circle): add stroke-linecap prop (#5087)

* feat(Circle): add stroke-linecap prop

* docs: butt
This commit is contained in:
neverland
2019-11-25 08:27:00 +08:00
committed by GitHub
parent dfd45e9299
commit 4c1e77cc37
5 changed files with 29 additions and 4 deletions
@@ -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>
`;
+10
View File
@@ -47,3 +47,13 @@ test('size prop', () => {
expect(wrapper).toMatchSnapshot();
});
test('stroke-linecap prop', () => {
const wrapper = mount(Circle, {
propsData: {
strokeLinecap: 'square'
}
});
expect(wrapper).toMatchSnapshot();
});