feat(Tabbar): add placeholder prop (#5979)
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
|
||||
exports[`disable border 1`] = `<div class="van-tabbar van-tabbar--fixed"></div>`;
|
||||
|
||||
exports[`placeholder prop 1`] = `
|
||||
<div class="van-tabbar__placeholder" style="height: 50px;">
|
||||
<div class="van-hairline--top-bottom van-tabbar van-tabbar--fixed"></div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`route mode 1`] = `
|
||||
<div class="van-hairline--top-bottom van-tabbar van-tabbar--fixed">
|
||||
<div class="van-tabbar-item van-tabbar-item--active">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import VueRouter from 'vue-router';
|
||||
import { mount, later } from '../../../test';
|
||||
import { mount, later, mockGetBoundingClientRect } from '../../../test';
|
||||
import Vue from 'vue';
|
||||
import Tabbar from '..';
|
||||
|
||||
@@ -174,3 +174,18 @@ test('disable border', () => {
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('placeholder prop', () => {
|
||||
const restore = mockGetBoundingClientRect({ height: 50 });
|
||||
|
||||
const wrapper = mount(Tabbar, {
|
||||
propsData: {
|
||||
fixed: true,
|
||||
placeholder: true,
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
|
||||
restore();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user