mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
test(Icon): add demo snapshot
This commit is contained in:
parent
28afc8a521
commit
3107c83c04
@ -29,7 +29,7 @@
|
||||
<demo-block :title="t('color')">
|
||||
<van-row>
|
||||
<van-col span="6" @click="copy(demoIcon, { color: '#1989fa' })">
|
||||
<van-icon name="cart-o" :color="BLUE" />
|
||||
<van-icon name="cart-o" color="#1989fa" />
|
||||
</van-col>
|
||||
<van-col span="6" @click="copy(demoIcon, { color: RED })">
|
||||
<van-icon name="fire-o" :color="RED" />
|
||||
|
147
src/icon/test/__snapshots__/demo.spec.js.snap
Normal file
147
src/icon/test/__snapshots__/demo.spec.js.snap
Normal file
@ -0,0 +1,147 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-tabs van-tabs--line"
|
||||
modelvalue="0"
|
||||
>
|
||||
<div>
|
||||
<div class="van-sticky">
|
||||
<div class="van-tabs__wrap">
|
||||
<div role="tablist"
|
||||
class="van-tabs__nav van-tabs__nav--line"
|
||||
>
|
||||
<div role="tab"
|
||||
class="van-tab van-tab--active"
|
||||
aria-selected="true"
|
||||
>
|
||||
<span class="van-tab__text van-tab__text--ellipsis">
|
||||
Demo
|
||||
</span>
|
||||
</div>
|
||||
<div role="tab"
|
||||
class="van-tab"
|
||||
aria-selected="false"
|
||||
>
|
||||
<span class="van-tab__text van-tab__text--ellipsis">
|
||||
Basic
|
||||
</span>
|
||||
</div>
|
||||
<div role="tab"
|
||||
class="van-tab"
|
||||
aria-selected="false"
|
||||
>
|
||||
<span class="van-tab__text van-tab__text--ellipsis">
|
||||
Outline
|
||||
</span>
|
||||
</div>
|
||||
<div role="tab"
|
||||
class="van-tab"
|
||||
aria-selected="false"
|
||||
>
|
||||
<span class="van-tab__text van-tab__text--ellipsis">
|
||||
Filled
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-tabs__line"
|
||||
style="transform: translateX(0px) translateX(-50%);"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="van-tabs__content">
|
||||
<div role="tabpanel"
|
||||
class="van-tab__pane"
|
||||
style
|
||||
>
|
||||
<div>
|
||||
<div class="van-row">
|
||||
<div class="van-col van-col--6">
|
||||
<i class="van-badge__wrapper van-icon van-icon-chat-o">
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-col van-col--6">
|
||||
<i class="van-badge__wrapper van-icon">
|
||||
<img class="van-icon__image"
|
||||
src="https://b.yzcdn.cn/vant/icon-demo-1126.png"
|
||||
>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-row">
|
||||
<div class="van-col van-col--6">
|
||||
<i class="van-badge__wrapper van-icon van-icon-chat-o">
|
||||
<div class="van-badge van-badge--dot van-badge--fixed">
|
||||
</div>
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-col van-col--6">
|
||||
<i class="van-badge__wrapper van-icon van-icon-chat-o">
|
||||
<div class="van-badge van-badge--fixed">
|
||||
9
|
||||
</div>
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-col van-col--6">
|
||||
<i class="van-badge__wrapper van-icon van-icon-chat-o">
|
||||
<div class="van-badge van-badge--fixed">
|
||||
99+
|
||||
</div>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-row">
|
||||
<div class="van-col van-col--6">
|
||||
<i class="van-badge__wrapper van-icon van-icon-cart-o"
|
||||
style="color: rgb(25, 137, 250);"
|
||||
>
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-col van-col--6">
|
||||
<i class="van-badge__wrapper van-icon van-icon-fire-o"
|
||||
style="color: rgb(238, 10, 36);"
|
||||
>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-row">
|
||||
<div class="van-col van-col--6">
|
||||
<i class="van-badge__wrapper van-icon van-icon-chat-o"
|
||||
style="font-size: 40px;"
|
||||
>
|
||||
</i>
|
||||
</div>
|
||||
<div class="van-col van-col--6">
|
||||
<i class="van-badge__wrapper van-icon van-icon-chat-o"
|
||||
style="font-size: 3rem;"
|
||||
>
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel"
|
||||
class="van-tab__pane"
|
||||
style="display: none;"
|
||||
>
|
||||
</div>
|
||||
<div role="tabpanel"
|
||||
class="van-tab__pane"
|
||||
style="display: none;"
|
||||
>
|
||||
</div>
|
||||
<div role="tabpanel"
|
||||
class="van-tab__pane"
|
||||
style="display: none;"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
4
src/icon/test/demo.spec.js
Normal file
4
src/icon/test/demo.spec.js
Normal file
@ -0,0 +1,4 @@
|
||||
import Demo from '../demo';
|
||||
import { snapshotDemo } from '../../../test/demo';
|
||||
|
||||
snapshotDemo(Demo);
|
Loading…
x
Reference in New Issue
Block a user