feat(Slider): add button-size prop
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`bar height 1`] = `
|
||||
exports[`bar-height prop 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">
|
||||
@@ -10,6 +10,16 @@ exports[`bar height 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`button-size prop 1`] = `
|
||||
<div class="van-slider">
|
||||
<div class="van-slider__bar" style="width: 50%; height: 2px;">
|
||||
<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" style="width: 10px; height: 10px;"></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;">
|
||||
|
||||
@@ -111,7 +111,7 @@ it('click vertical', () => {
|
||||
restoreMock();
|
||||
});
|
||||
|
||||
it('bar height', () => {
|
||||
it('bar-height prop', () => {
|
||||
const wrapper = mount(Slider, {
|
||||
propsData: {
|
||||
value: 50,
|
||||
@@ -122,6 +122,17 @@ it('bar height', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('button-size prop', () => {
|
||||
const wrapper = mount(Slider, {
|
||||
propsData: {
|
||||
value: 50,
|
||||
buttonSize: 10,
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should not emit change event when value not changed', () => {
|
||||
const wrapper = mount(Slider, {
|
||||
propsData: {
|
||||
|
||||
Reference in New Issue
Block a user