docs(PullRefresh): add custom tip demo

This commit is contained in:
陈嘉涵
2020-01-10 11:18:00 +08:00
committed by neverland
parent 028747c354
commit 789112a350
7 changed files with 155 additions and 11 deletions
@@ -6,7 +6,8 @@ exports[`renders demo correctly 1`] = `
<div class="van-tabs__wrap van-hairline--top-bottom">
<div role="tablist" class="van-tabs__nav van-tabs__nav--line">
<div role="tab" aria-selected="true" class="van-tab van-tab--active van-ellipsis"><span class="van-tab__text">基础用法<!----></span></div>
<div role="tab" class="van-tab van-ellipsis"><span class="van-tab__text">刷新成功提示<!----></span></div>
<div role="tab" class="van-tab van-ellipsis"><span class="van-tab__text">成功提示<!----></span></div>
<div role="tab" class="van-tab van-ellipsis"><span class="van-tab__text">自定义提示<!----></span></div>
<div class="van-tabs__line" style="width: 0px; transform: translateX(0px) translateX(-50%);"></div>
</div>
</div>
@@ -22,6 +23,9 @@ exports[`renders demo correctly 1`] = `
<div role="tabpanel" class="van-tab__pane" style="display: none;">
<!---->
</div>
<div role="tabpanel" class="van-tab__pane" style="display: none;">
<!---->
</div>
</div>
</div>
</div>
@@ -105,3 +105,11 @@ exports[`render success text 2`] = `
</div>
</div>
`;
exports[`should set height when using head-height 1`] = `
<div class="van-pull-refresh">
<div class="van-pull-refresh__track" style="transition-duration: 0ms;">
<div class="van-pull-refresh__head" style="height: 100px;"></div>
</div>
</div>
`;
+10
View File
@@ -156,3 +156,13 @@ test('render success slot', async () => {
wrapper.setProps({ value: false });
expect(wrapper).toMatchSnapshot();
});
test('should set height when using head-height', async () => {
const wrapper = mount(PullRefresh, {
propsData: {
headHeight: 100
}
});
expect(wrapper).toMatchSnapshot();
});