[improvement] Slider: support number type of bar-height prop (#3794)

This commit is contained in:
neverland
2019-07-09 17:02:05 +08:00
committed by GitHub
parent 06cf48c4c5
commit 7caf664e48
5 changed files with 27 additions and 6 deletions
@@ -1,5 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`bar height 1`] = `
<div class="van-slider">
<div class="van-slider__bar" style="width: 50%; height: 10px;">
<div role="slider" tabindex="0" aria-valuemin="0" aria-valuenow="50" aria-valuemax="100" aria-orientation="horizontal" class="van-slider__button-wrapper">
<div class="van-slider__button"></div>
</div>
</div>
</div>
`;
exports[`click bar 1`] = `
<div class="van-slider van-slider--disabled">
<div class="van-slider__bar" style="width: 50%; height: 2px;">
+11
View File
@@ -105,3 +105,14 @@ it('click vertical', () => {
restoreMock();
});
it('bar height', () => {
const wrapper = mount(Slider, {
propsData: {
value: 50,
barHeight: 10
}
});
expect(wrapper).toMatchSnapshot();
});