[bugfix] Tab: should not have line animation when inited (#2459)

This commit is contained in:
neverland
2019-01-07 19:22:40 +08:00
committed by GitHub
parent 2c3458587e
commit dd20a170ab
3 changed files with 15 additions and 11 deletions

View File

@@ -28,20 +28,20 @@ exports[`change tabs data 2`] = `
<div class="van-tabs van-tabs--line">
<div class="van-tabs__wrap van-hairline--top-bottom">
<div class="van-tabs__nav van-tabs__nav--line" style="border-color: #f44;">
<div class="van-tabs__line" style="background-color: rgb(255, 68, 68);"></div>
<div class="van-tabs__line" style="background-color: rgb(255, 68, 68); width: 2px; transform: translateX(-1px);"></div>
<div class="van-tab van-tab--active"><span class="van-ellipsis">title1</span></div>
<div class="van-tab"><span class="van-ellipsis"></span></div>
<div class="van-tab">
<div><span>title2</span></div>
</div>
<div class="van-tab van-tab--disabled"><span class="van-ellipsis">title3</span></div>
</div>
</div>
<div class="van-tabs__content">
<div class="van-tab__pane" style="">
<!---->
<div class="van-tab__pane" style="">Text
<!---->
</div>
<div class="van-tab__pane" style="display: none;">
<!---->
<div><span>title2</span></div>
</div>
<div class="van-tab__pane" style="display: none;">
<!---->

View File

@@ -93,5 +93,7 @@ test('change tabs data', async () => {
color: 'blue',
title1: 'new title1'
});
await later();
expect(wrapper).toMatchSnapshot();
});