test: add SSR tests for all demo (#11805)

This commit is contained in:
neverland 2023-05-02 20:19:47 +08:00 committed by GitHub
parent f3fa7e7bd5
commit 8f54235eea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
144 changed files with 29396 additions and 12 deletions

View File

@ -1,3 +1,4 @@
import { inBrowser } from '@vant/use';
import Locale from '../../src/locale';
import enUS from '../../src/locale/lang/en-US';
import { camelize, createTranslate } from '../../src/utils';
@ -17,7 +18,7 @@ export function initDemoLocale() {
});
// switch lang after routing
if (window.vueRouter) {
if (inBrowser && window.vueRouter) {
window.vueRouter.afterEach((to) => {
const { lang } = to.meta || {};

View File

@ -0,0 +1,241 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-action-bar van-safe-area-bottom">
<!--[-->
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
style
>
<!--[-->
</div>
Icon1
</div>
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
style
>
<!--[-->
</div>
Icon2
</div>
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-shop-o van-action-bar-icon__icon"
style
>
<!--[-->
</div>
Icon3
</div>
<button type="button"
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last van-action-bar-button--first"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
</div>
</div>
<div>
<!--[-->
<div class="van-action-bar van-safe-area-bottom">
<!--[-->
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
style
>
<!--[-->
<div class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
style
>
</div>
</div>
Icon1
</div>
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
style
>
<!--[-->
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
5
</div>
</div>
Icon2
</div>
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-shop-o van-action-bar-icon__icon"
style
>
<!--[-->
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
12
</div>
</div>
Icon3
</div>
<button type="button"
class="van-button van-button--warning van-button--large van-action-bar-button van-action-bar-button--warning van-action-bar-button--last van-action-bar-button--first"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
<button type="button"
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
</div>
</div>
<div>
<!--[-->
<div class="van-action-bar van-safe-area-bottom">
<!--[-->
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
style="color:#ee0a24;"
>
<!--[-->
</div>
Icon1
</div>
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
style
>
<!--[-->
</div>
Icon2
</div>
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-star van-action-bar-icon__icon"
style="color:#ff5000;"
>
<!--[-->
</div>
Collected
</div>
<button type="button"
class="van-button van-button--warning van-button--large van-action-bar-button van-action-bar-button--warning van-action-bar-button--last van-action-bar-button--first"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
<button type="button"
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
</div>
</div>
<div>
<!--[-->
<div class="van-action-bar van-safe-area-bottom">
<!--[-->
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-chat-o van-action-bar-icon__icon"
style
>
<!--[-->
</div>
Icon1
</div>
<div role="button"
class="van-action-bar-icon"
tabindex="0"
>
<div class="van-badge__wrapper van-icon van-icon-cart-o van-action-bar-icon__icon"
style
>
<!--[-->
</div>
Icon2
</div>
<button type="button"
class="van-button van-button--warning van-button--large van-action-bar-button van-action-bar-button--warning van-action-bar-button--last van-action-bar-button--first"
style="color:white;background:#be99ff;border-color:#be99ff;"
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
<button type="button"
class="van-button van-button--danger van-button--large van-action-bar-button van-action-bar-button--danger van-action-bar-button--last"
style="color:white;background:#7232dd;border-color:#7232dd;"
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,104 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Basic Usage
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Show Cancel Button
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Show Description
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Option Status
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Panel
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<!--[-->
<!--[-->
<!--[-->
<!--[-->
<!--[-->
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,160 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div>
<!--[-->
<form class="van-form van-address-edit">
<!--[-->
<div class="van-address-edit__fields">
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Name
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Name"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Phone
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="tel"
id="van-field-input"
class="van-field__control"
placeholder="Phone"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Area
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
readonly
placeholder="Area"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
<div class="van-cell van-field van-address-edit-detail">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Address
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<textarea id="van-field-input"
rows="1"
class="van-field__control"
placeholder="Address"
aria-labelledby="van-field-label"
>
</textarea>
</div>
</div>
</div>
</div>
<div class="van-cell van-cell--center van-address-edit__default">
<div class="van-cell__title"
style
>
<span>
Set as the default address
</span>
</div>
<!--[-->
<div role="switch"
class="van-switch"
style
tabindex="0"
aria-checked="false"
>
<div class="van-switch__node">
</div>
</div>
</div>
<div class="van-address-edit__buttons">
<button type="submit"
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-address-edit__button"
style
>
<div class="van-button__content">
<span class="van-button__text">
Save
</span>
</div>
</button>
<button type="button"
class="van-button van-button--default van-button--normal van-button--block van-button--round van-address-edit__button"
style
>
<div class="van-button__content">
<span class="van-button__text">
Delete
</span>
</div>
</button>
</div>
</form>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,140 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div>
<!--[-->
<div class="van-address-list">
<div class="van-radio-group"
role="radiogroup"
>
<!--[-->
<!--[-->
<div class="van-address-item">
<div class="van-cell van-cell--borderless">
<div class="van-cell__title van-address-item__title"
style
>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style="font-size:18px;"
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
<!--[-->
<div class="van-address-item__name">
John Snow 13000000000
<span style
class="van-tag van-tag--round van-tag--primary van-address-item__tag"
>
<!--[-->
Default
</span>
</div>
<div class="van-address-item__address">
Somewhere
</div>
</span>
</div>
</div>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-edit van-address-item__edit"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-address-item">
<div class="van-cell van-cell--borderless">
<div class="van-cell__title van-address-item__title"
style
>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style="font-size:18px;"
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
<!--[-->
<div class="van-address-item__name">
Ned Stark 1310000000
</div>
<div class="van-address-item__address">
Somewhere
</div>
</span>
</div>
</div>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-edit van-address-item__edit"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div class="van-address-list__disabled-text">
The following address is out of range
</div>
<!--[-->
<div class="van-address-item van-address-item--disabled">
<div class="van-cell van-cell--borderless">
<div class="van-cell__title van-address-item__title"
style
>
<!--[-->
<div class="van-address-item__name">
Tywin 1320000000
</div>
<div class="van-address-item__address">
Somewhere
</div>
</div>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-edit van-address-item__edit"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-address-list__bottom van-safe-area-bottom">
<button type="button"
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-address-list__add"
style
>
<div class="van-button__content">
<span class="van-button__text">
Add new address
</span>
</div>
</button>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,555 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-picker van-area">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Beijing
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Zhejiang
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Hong Kong
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Beijing City
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Dongcheng
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Xicheng
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Chaoyang
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Fengtai
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Haidian
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Fangshan
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Tongzhou
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Shunyi
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Changping
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Daxing
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-picker van-area">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 66px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Beijing
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Zhejiang
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Hong Kong
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 22px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Hangzhou
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Ningbo
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Wenzhou
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Jiaxin
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Lishui
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Lucheng
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Wencheng
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Shuntai
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Ruian
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Yueqing
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-picker van-area">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Beijing
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Zhejiang
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Hong Kong
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Beijing City
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-picker van-area">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Choose
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Beijing
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Zhejiang
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Hong Kong
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Choose
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Choose
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,60 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div class="van-tabs van-tabs--line">
<!--[-->
<div class="van-tabs__wrap">
<div role="tablist"
class="van-tabs__nav van-tabs__nav--line van-tabs__nav--complete"
style
aria-orientation="horizontal"
>
<!--[-->
</div>
</div>
<div class="van-tabs__content">
<!--[-->
<!--[-->
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-0"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-1"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-2"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-3"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-4"
style="display:none;"
>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,206 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
5
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
10
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
Hot
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
style
>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
9+
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
20+
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
99+
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style="background:#1989fa;"
>
5
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style="background:#1989fa;"
>
10
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
style="background:#1989fa;"
>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-success badge-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-cross badge-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-down badge-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--top-left van-badge--fixed"
style
>
10
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--bottom-left van-badge--fixed"
style
>
10
</div>
</div>
<div class="van-badge__wrapper">
<!--[-->
<div class="child">
</div>
<div class="van-badge van-badge--bottom-right van-badge--fixed"
style
>
10
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-badge van-badge--top-right"
style="margin-left:16px;"
>
20
</div>
<div class="van-badge van-badge--top-right"
style="margin-left:16px;"
>
99+
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,423 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="demo-button-row">
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Primary
</span>
</div>
</button>
<button type="button"
class="van-button van-button--success van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Success
</span>
</div>
</button>
<button type="button"
class="van-button van-button--default van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Default
</span>
</div>
</button>
</div>
<button type="button"
class="van-button van-button--danger van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Danger
</span>
</div>
</button>
<button type="button"
class="van-button van-button--warning van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Warning
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal van-button--plain"
style
>
<div class="van-button__content">
<span class="van-button__text">
Plain
</span>
</div>
</button>
<button type="button"
class="van-button van-button--success van-button--normal van-button--plain"
style
>
<div class="van-button__content">
<span class="van-button__text">
Plain
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal van-button--plain van-button--hairline van-hairline--surround"
style
>
<div class="van-button__content">
<span class="van-button__text">
Hairline
</span>
</div>
</button>
<button type="button"
class="van-button van-button--success van-button--normal van-button--plain van-button--hairline van-hairline--surround"
style
>
<div class="van-button__content">
<span class="van-button__text">
Hairline
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal van-button--disabled"
style
disabled
>
<div class="van-button__content">
<span class="van-button__text">
Disabled
</span>
</div>
</button>
<button type="button"
class="van-button van-button--success van-button--normal van-button--disabled"
style
disabled
>
<div class="van-button__content">
<span class="van-button__text">
Disabled
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal van-button--loading"
style
>
<div class="van-button__content">
<div class="van-loading van-loading--circular van-button__loading"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
</div>
</div>
</button>
<button type="button"
class="van-button van-button--primary van-button--normal van-button--loading"
style
>
<div class="van-button__content">
<div class="van-loading van-loading--spinner van-button__loading"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--spinner"
style
>
<!--[-->
<i class="van-loading__line van-loading__line--1">
</i>
<i class="van-loading__line van-loading__line--2">
</i>
<i class="van-loading__line van-loading__line--3">
</i>
<i class="van-loading__line van-loading__line--4">
</i>
<i class="van-loading__line van-loading__line--5">
</i>
<i class="van-loading__line van-loading__line--6">
</i>
<i class="van-loading__line van-loading__line--7">
</i>
<i class="van-loading__line van-loading__line--8">
</i>
<i class="van-loading__line van-loading__line--9">
</i>
<i class="van-loading__line van-loading__line--10">
</i>
<i class="van-loading__line van-loading__line--11">
</i>
<i class="van-loading__line van-loading__line--12">
</i>
</span>
</div>
</div>
</button>
<button type="button"
class="van-button van-button--success van-button--normal van-button--loading"
style
>
<div class="van-button__content">
<div class="van-loading van-loading--circular van-button__loading"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
</div>
<span class="van-button__text">
Loading...
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal van-button--square"
style
>
<div class="van-button__content">
<span class="van-button__text">
Square
</span>
</div>
</button>
<button type="button"
class="van-button van-button--success van-button--normal van-button--round"
style
>
<div class="van-button__content">
<span class="van-button__text">
Round
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<i class="van-badge__wrapper van-icon van-icon-plus van-button__icon"
style
>
<!--[-->
</i>
</div>
</button>
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<i class="van-badge__wrapper van-icon van-icon-plus van-button__icon"
style
>
<!--[-->
</i>
<span class="van-button__text">
Button
</span>
</div>
</button>
<button type="button"
class="van-button van-button--primary van-button--normal van-button--plain"
style
>
<div class="van-button__content">
<i class="van-badge__wrapper van-icon van-button__icon"
style
>
<!--[-->
<img class="van-icon__image"
src="https://fastly.jsdelivr.net/npm/@vant/assets/user-active.png"
>
</i>
<span class="van-button__text">
Button
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--large"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Large
</span>
</div>
</button>
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Normal
</span>
</div>
</button>
<button type="button"
class="van-button van-button--primary van-button--small"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Small
</span>
</div>
</button>
<button type="button"
class="van-button van-button--primary van-button--mini"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Mini
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal van-button--block"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Block Element
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
URL
</span>
</div>
</button>
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
Vue Router
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--default van-button--normal"
style="color:white;background:#7232dd;border-color:#7232dd;"
>
<div class="van-button__content">
<span class="van-button__text">
Pure
</span>
</div>
</button>
<button type="button"
class="van-button van-button--default van-button--normal van-button--plain"
style="color:#7232dd;border-color:#7232dd;"
>
<div class="van-button__content">
<span class="van-button__text">
Pure
</span>
</div>
</button>
<button type="button"
class="van-button van-button--default van-button--normal"
style="color:white;background:linear-gradient(to right, #ff6034, #ee0a24);border:0;"
>
<div class="van-button__content">
<span class="van-button__text">
Gradient
</span>
</div>
</button>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,349 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Select Single Date
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Select Multiple Date
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Select Date Range
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Select Single Date
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Select Date Range
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Color
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Date Range
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Confirm Text
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Day Text
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Position
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Max Range
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom First Day Of Week
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-calendar"
style="height:500px;"
>
<div class="van-calendar__header">
<div class="van-calendar__header-title">
Calendar
</div>
<div class="van-calendar__header-subtitle">
</div>
<div class="van-calendar__weekdays">
<!--[-->
<span class="van-calendar__weekday">
Sun
</span>
<span class="van-calendar__weekday">
Mon
</span>
<span class="van-calendar__weekday">
Tue
</span>
<span class="van-calendar__weekday">
Wed
</span>
<span class="van-calendar__weekday">
Thu
</span>
<span class="van-calendar__weekday">
Fri
</span>
<span class="van-calendar__weekday">
Sat
</span>
</div>
</div>
<div class="van-calendar__body">
<!--[-->
<div class="van-calendar__month">
<div role="grid"
class="van-calendar__days"
>
<!--[-->
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
</div>
</div>
<div class="van-calendar__month">
<div class="van-calendar__month-title">
2012/2
</div>
<div role="grid"
class="van-calendar__days"
>
<!--[-->
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
</div>
</div>
<div class="van-calendar__month">
<div class="van-calendar__month-title">
2012/3
</div>
<div role="grid"
class="van-calendar__days"
>
<!--[-->
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
<div class="van-calendar__day"
style="width:100%;"
>
</div>
</div>
</div>
</div>
<div class="van-calendar__footer van-safe-area-bottom">
</div>
</div>
</div>
<!--[-->
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,213 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-card">
<div class="van-card__header">
<a class="van-card__thumb">
<div class="van-image"
style="width:100%;height:100%;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
class="van-image__img"
style="object-fit:cover;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
</a>
<div class="van-card__content">
<div>
<div class="van-card__title van-multi-ellipsis--l2">
Title
</div>
<div class="van-card__desc van-ellipsis">
Description
</div>
</div>
<div class="van-card__bottom">
<div class="van-card__price">
<div>
<span class="van-card__price-currency">
¥
</span>
<span class="van-card__price-integer">
2
</span>
.
<span class="van-card__price-decimal">
00
</span>
</div>
</div>
<div class="van-card__num">
x2
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-card">
<div class="van-card__header">
<a class="van-card__thumb">
<div class="van-image"
style="width:100%;height:100%;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
class="van-image__img"
style="object-fit:cover;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-card__tag">
<span style
class="van-tag van-tag--mark van-tag--primary"
>
<!--[-->
Tag
</span>
</div>
</a>
<div class="van-card__content">
<div>
<div class="van-card__title van-multi-ellipsis--l2">
Title
</div>
<div class="van-card__desc van-ellipsis">
Description
</div>
</div>
<div class="van-card__bottom">
<div class="van-card__price">
<div>
<span class="van-card__price-currency">
¥
</span>
<span class="van-card__price-integer">
2
</span>
.
<span class="van-card__price-decimal">
00
</span>
</div>
</div>
<div class="van-card__origin-price">
¥ 10.00
</div>
<div class="van-card__num">
x2
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-card">
<div class="van-card__header">
<a class="van-card__thumb">
<div class="van-image"
style="width:100%;height:100%;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
class="van-image__img"
style="object-fit:cover;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
</a>
<div class="van-card__content">
<div>
<div class="van-card__title van-multi-ellipsis--l2">
Title
</div>
<div class="van-card__desc van-ellipsis">
Description
</div>
<!--[-->
<span style="margin-right:5px;"
class="van-tag van-tag--plain van-tag--primary"
>
<!--[-->
Tag
</span>
<span style
class="van-tag van-tag--plain van-tag--primary"
>
<!--[-->
Tag
</span>
</div>
<div class="van-card__bottom">
<div class="van-card__price">
<div>
<span class="van-card__price-currency">
¥
</span>
<span class="van-card__price-integer">
2
</span>
.
<span class="van-card__price-decimal">
00
</span>
</div>
</div>
<div class="van-card__num">
x2
</div>
</div>
</div>
</div>
<div class="van-card__footer">
<!--[-->
<button type="button"
class="van-button van-button--default van-button--mini van-button--round"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
<button type="button"
class="van-button van-button--default van-button--mini van-button--round"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,185 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Area
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
readonly
placeholder="Select Area"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Area
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
readonly
placeholder="Select Area"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Area
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
readonly
placeholder="Select Area"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Area
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
readonly
placeholder="Select Area"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Area
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
readonly
placeholder="Select Area"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,353 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell-group van-hairline--top-bottom">
<!--[-->
<div class="van-cell">
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
<div class="van-cell">
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
<div class="van-cell__label">
Description
</div>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell">
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
<div class="van-cell">
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
<div class="van-cell__label">
Description
</div>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--large">
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
<div class="van-cell van-cell--large">
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
<div class="van-cell__label">
Description
</div>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell">
<i class="van-badge__wrapper van-icon van-icon-location-o van-cell__left-icon"
style
>
<!--[-->
</i>
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow-down van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
URL
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Vue Router
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<!--[-->
<div class="van-cell-group__title">
Group 1
</div>
<div class="van-cell-group van-hairline--top-bottom">
<!--[-->
<div class="van-cell">
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
</div>
<!--[-->
<div class="van-cell-group__title">
Group 2
</div>
<div class="van-cell-group van-hairline--top-bottom">
<!--[-->
<div class="van-cell">
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<!--[-->
<span class="custom-title">
Cell title
</span>
<span style
class="van-tag van-tag--primary"
>
<!--[-->
Tag
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell">
<i class="van-badge__wrapper van-icon van-icon-shop-o van-cell__left-icon"
style
>
<!--[-->
</i>
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
</div>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-search search-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--center">
<div class="van-cell__title"
style
>
<span>
Cell title
</span>
<div class="van-cell__label">
Description
</div>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,520 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox
</span>
</div>
</div>
<div>
<!--[-->
<div role="checkbox"
class="van-checkbox van-checkbox--disabled"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--disabled"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label van-checkbox__label--disabled">
<!--[-->
Checkbox
</span>
</div>
<div role="checkbox"
class="van-checkbox van-checkbox--disabled"
aria-checked="true"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--disabled van-checkbox__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label van-checkbox__label--disabled">
<!--[-->
Checkbox
</span>
</div>
</div>
<div>
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--square van-checkbox__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Custom Shape
</span>
</div>
</div>
<div>
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style="border-color:#ee0a24;background-color:#ee0a24;"
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Custom Color
</span>
</div>
</div>
<div>
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
style="font-size:24px;"
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Custom Icon Size
</span>
</div>
</div>
<div>
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
style
>
<!--[-->
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/user-active.png">
</div>
<span class="van-checkbox__label">
<!--[-->
Custom Icon
</span>
</div>
</div>
<div>
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<span class="van-checkbox__label van-checkbox__label--left">
<!--[-->
Left Label
</span>
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div role="checkbox"
class="van-checkbox van-checkbox--label-disabled"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-checkbox-group">
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox a
</span>
</div>
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox b
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-checkbox-group van-checkbox-group--horizontal">
<!--[-->
<div role="checkbox"
class="van-checkbox van-checkbox--horizontal"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox a
</span>
</div>
<div role="checkbox"
class="van-checkbox van-checkbox--horizontal"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox b
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-checkbox-group">
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox a
</span>
</div>
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox b
</span>
</div>
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox c
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-checkbox-group">
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox a
</span>
</div>
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox b
</span>
</div>
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox c
</span>
</div>
</div>
<div class="demo-checkbox-buttons">
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Check All
</span>
</div>
</button>
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Inverse
</span>
</div>
</button>
</div>
</div>
<div>
<!--[-->
<div class="van-checkbox-group">
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Checkbox a
</span>
</div>
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Checkbox b
</span>
</div>
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,247 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-circle"
style
>
<svg viewbox="0 0 1040 1040"
style
>
<path class="van-circle__layer"
style="fill:none;stroke-width:40px;"
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
>
</path>
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
style="stroke-width:41px;stroke-dasharray:2198px 3140px;"
class="van-circle__hover"
>
</path>
</svg>
<div class="van-circle__text">
70%
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-circle"
style
>
<svg viewbox="0 0 1060 1060"
style
>
<path class="van-circle__layer"
style="fill:none;stroke-width:60px;"
d="M 530 530 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
>
</path>
<path d="M 530 530 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
style="stroke-width:61px;stroke-dasharray:2198px 3140px;"
class="van-circle__hover"
>
</path>
</svg>
<div class="van-circle__text">
Custom Width
</div>
</div>
<div class="van-circle"
style
>
<svg viewbox="0 0 1040 1040"
style
>
<path class="van-circle__layer"
style="fill:none;stroke:#ebedf0;stroke-width:40px;"
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
>
</path>
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
style="stroke:#ee0a24;stroke-width:41px;stroke-dasharray:2198px 3140px;"
class="van-circle__hover"
stroke="#ee0a24"
>
</path>
</svg>
<div class="van-circle__text">
Custom Color
</div>
</div>
<div class="van-circle"
style
>
<svg viewbox="0 0 1040 1040"
style
>
<defs>
<linearGradient id="van-circle-3"
x1="100%"
y1="0%"
x2="0%"
y2="0%"
>
<!--[-->
<stop offset="0%"
stop-color="#3fecff"
>
</stop>
<stop offset="100%"
stop-color="#6149f6"
>
</stop>
</linearGradient>
</defs>
<path class="van-circle__layer"
style="fill:none;stroke-width:40px;"
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
>
</path>
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
style="stroke:url(#van-circle-3);stroke-width:41px;stroke-dasharray:2198px 3140px;"
class="van-circle__hover"
stroke="url(#van-circle-3)"
>
</path>
</svg>
<div class="van-circle__text">
Gradient
</div>
</div>
<div class="van-circle"
style="margin-top:15px;"
>
<svg viewbox="0 0 1040 1040"
style
>
<path class="van-circle__layer"
style="fill:none;stroke-width:40px;"
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
>
</path>
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
style="stroke:#07c160;stroke-width:41px;stroke-dasharray:2198px 3140px;"
class="van-circle__hover"
stroke="#07c160"
>
</path>
</svg>
<div class="van-circle__text">
Counter Clockwise
</div>
</div>
<div class="van-circle"
style="width:120px;height:120px;margin-top:15px;"
>
<svg viewbox="0 0 1040 1040"
style
>
<path class="van-circle__layer"
style="fill:none;stroke-width:40px;"
d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
>
</path>
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 0 0, 1000 a 500, 500 0 1, 0 0, -1000"
style="stroke:#7232dd;stroke-width:41px;stroke-dasharray:2198px 3140px;"
class="van-circle__hover"
stroke="#7232dd"
>
</path>
</svg>
<div class="van-circle__text">
Custom Size
</div>
</div>
</div>
<div style="margin-top:15px;">
<button type="button"
class="van-button van-button--primary van-button--small"
style
>
<div class="van-button__content">
<span class="van-button__text">
Add
</span>
</div>
</button>
<button type="button"
class="van-button van-button--danger van-button--small"
style
>
<div class="van-button__content">
<span class="van-button__text">
Decrease
</span>
</div>
</button>
</div>
<div>
<!--[-->
<div class="van-circle"
style
>
<svg viewbox="0 0 1040 1040"
style="transform:rotate(270deg);"
>
<path class="van-circle__layer"
style="fill:none;stroke-width:40px;"
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
>
</path>
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
style="stroke-width:41px;stroke-dasharray:2355px 3140px;"
class="van-circle__hover"
>
</path>
</svg>
<div class="van-circle__text">
Left
</div>
</div>
<div class="van-circle"
style
>
<svg viewbox="0 0 1040 1040"
style="transform:rotate(90deg);"
>
<path class="van-circle__layer"
style="fill:none;stroke-width:40px;"
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
>
</path>
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
style="stroke-width:41px;stroke-dasharray:2355px 3140px;"
class="van-circle__hover"
>
</path>
</svg>
<div class="van-circle__text">
Right
</div>
</div>
<div class="van-circle"
style
>
<svg viewbox="0 0 1040 1040"
style="transform:rotate(180deg);"
>
<path class="van-circle__layer"
style="fill:none;stroke-width:40px;"
d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
>
</path>
<path d="M 520 520 m 0, -500 a 500, 500 0 1, 1 0, 1000 a 500, 500 0 1, 1 0, -1000"
style="stroke-width:41px;stroke-dasharray:2355px 3140px;"
class="van-circle__hover"
>
</path>
</svg>
<div class="van-circle__text">
Bottom
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,164 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-row">
<!--[-->
<div style
class="van-col van-col--8"
>
<!--[-->
span: 8
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
span: 8
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
span: 8
</div>
</div>
<div class="van-row">
<!--[-->
<div style
class="van-col van-col--4"
>
<!--[-->
span: 4
</div>
<div style
class="van-col van-col--10 van-col--offset-4"
>
<!--[-->
offset: 4, span: 10
</div>
</div>
<div class="van-row">
<!--[-->
<div style
class="van-col van-col--12 van-col--offset-12"
>
<!--[-->
offset: 12, span: 12
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-row">
<!--[-->
<div style
class="van-col van-col--8"
>
<!--[-->
span: 8
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
span: 8
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
span: 8
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-row van-row--justify-center">
<!--[-->
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
</div>
<div class="van-row van-row--justify-end">
<!--[-->
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
</div>
<div class="van-row van-row--justify-space-between">
<!--[-->
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
</div>
<div class="van-row van-row--justify-space-around">
<!--[-->
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
<div style
class="van-col van-col--6"
>
<!--[-->
span: 6
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,369 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-collapse van-hairline--top-bottom">
<!--[-->
<div class="van-collapse-item">
<div class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
role="button"
tabindex="0"
aria-expanded="true"
>
<div class="van-cell__title"
style
>
<span>
Title1
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-collapse-item__wrapper">
<div class="van-collapse-item__content">
<!--[-->
Content 1
</div>
</div>
</div>
<div class="van-collapse-item van-collapse-item--border">
<div class="van-cell van-cell--clickable van-collapse-item__title"
role="button"
tabindex="0"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<span>
Title2
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-collapse-item van-collapse-item--border">
<div class="van-cell van-cell--clickable van-collapse-item__title"
role="button"
tabindex="0"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<span>
Title3
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-collapse van-hairline--top-bottom">
<!--[-->
<div class="van-collapse-item">
<div class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
role="button"
tabindex="0"
aria-expanded="true"
>
<div class="van-cell__title"
style
>
<span>
Title1
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-collapse-item__wrapper">
<div class="van-collapse-item__content">
<!--[-->
Content 1
</div>
</div>
</div>
<div class="van-collapse-item van-collapse-item--border">
<div class="van-cell van-cell--clickable van-collapse-item__title"
role="button"
tabindex="0"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<span>
Title2
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-collapse-item van-collapse-item--border">
<div class="van-cell van-cell--clickable van-collapse-item__title"
role="button"
tabindex="0"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<span>
Title3
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-collapse van-hairline--top-bottom">
<!--[-->
<div class="van-collapse-item">
<div class="van-cell van-cell--clickable van-collapse-item__title"
role="button"
tabindex="0"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<span>
Title1
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-collapse-item van-collapse-item--border">
<div class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
role="button"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<span>
Title2
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-collapse-item van-collapse-item--border">
<div class="van-cell van-collapse-item__title van-collapse-item__title--disabled"
role="button"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<span>
Title3
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-collapse van-hairline--top-bottom">
<!--[-->
<div class="van-collapse-item">
<div class="van-cell van-cell--clickable van-collapse-item__title"
role="button"
tabindex="0"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<!--[-->
Title1
<i class="van-badge__wrapper van-icon van-icon-question-o"
style
>
<!--[-->
</i>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-collapse-item van-collapse-item--border">
<div class="van-cell van-cell--clickable van-collapse-item__title"
role="button"
tabindex="0"
aria-expanded="false"
>
<i class="van-badge__wrapper van-icon van-icon-shop-o van-cell__left-icon"
style
>
<!--[-->
</i>
<div class="van-cell__title"
style
>
<span>
Title2
</span>
</div>
<div class="van-cell__value">
<span>
Content
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-collapse van-hairline--top-bottom">
<!--[-->
<div class="van-collapse-item">
<div class="van-cell van-cell--clickable van-collapse-item__title van-collapse-item__title--expanded"
role="button"
tabindex="0"
aria-expanded="true"
>
<div class="van-cell__title"
style
>
<span>
Title1
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-collapse-item__wrapper">
<div class="van-collapse-item__content">
<!--[-->
Content 1
</div>
</div>
</div>
<div class="van-collapse-item van-collapse-item--border">
<div class="van-cell van-cell--clickable van-collapse-item__title"
role="button"
tabindex="0"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<span>
Title2
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-collapse-item van-collapse-item--border">
<div class="van-cell van-cell--clickable van-collapse-item__title"
role="button"
tabindex="0"
aria-expanded="false"
>
<div class="van-cell__title"
style
>
<span>
Title3
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div class="demo-collapse-buttons">
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Open All
</span>
</div>
</button>
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Toggle All
</span>
</div>
</button>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,343 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div style="min-height:100vh;">
<div>
<!--[-->
<div class="van-cell">
<div class="van-cell__title"
style
>
<span>
Please click the button in the upper right corner to switch between dark and light modes.
</span>
</div>
</div>
</div>
<div>
<!--[-->
<form class="van-form">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Rate
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div role="radiogroup"
class="van-rate"
tabindex="0"
aria-disabled="false"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Slider
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div style
class="van-slider"
>
<div class="van-slider__bar"
style="width:50%;left:0%;"
>
<div role="slider"
class="van-slider__button-wrapper van-slider__button-wrapper--right"
tabindex="0"
aria-valuemin="0"
aria-valuenow="50"
aria-valuemax="100"
aria-orientation="horizontal"
>
<div class="van-slider__button"
style
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="margin:16px;">
<button type="submit"
class="van-button van-button--primary van-button--normal van-button--block van-button--round"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Submit
</span>
</div>
</button>
</div>
</form>
</div>
<div>
<!--[-->
<div class="van-config-provider"
style="--van-rate-icon-full-color:#07c160;--van-slider-bar-height:4px;--van-slider-button-width:20px;--van-slider-button-height:20px;--van-slider-active-background:#07c160;--van-button-primary-background:#07c160;--van-button-primary-border-color:#07c160;"
>
<!--[-->
<form class="van-form">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Rate
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div role="radiogroup"
class="van-rate"
tabindex="0"
aria-disabled="false"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Slider
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div style
class="van-slider"
>
<div class="van-slider__bar"
style="width:50%;left:0%;"
>
<div role="slider"
class="van-slider__button-wrapper van-slider__button-wrapper--right"
tabindex="0"
aria-valuemin="0"
aria-valuenow="50"
aria-valuemax="100"
aria-orientation="horizontal"
>
<div class="van-slider__button"
style
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="margin:16px;">
<button type="submit"
class="van-button van-button--primary van-button--normal van-button--block van-button--round"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Submit
</span>
</div>
</button>
</div>
</form>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,79 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--add"
role="button"
tabindex="0"
>
<i class="van-badge__wrapper van-icon van-icon-add-square van-cell__left-icon"
style
>
<!--[-->
</i>
<div class="van-cell__title van-contact-card__title"
style
>
<!--[-->
Add contact
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--center van-cell--clickable van-cell--borderless van-contact-card van-contact-card--edit"
role="button"
tabindex="0"
>
<i class="van-badge__wrapper van-icon van-icon-contact van-cell__left-icon"
style
>
<!--[-->
</i>
<div class="van-cell__title van-contact-card__title"
style
>
<!--[-->
<div>
NameJohn Snow
</div>
<div>
Phone13000000000
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--center van-cell--borderless van-contact-card van-contact-card--edit">
<i class="van-badge__wrapper van-icon van-icon-contact van-cell__left-icon"
style
>
<!--[-->
</i>
<div class="van-cell__title van-contact-card__title"
style
>
<!--[-->
<div>
NameJohn Snow
</div>
<div>
Phone13000000000
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,101 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div>
<!--[-->
<form class="van-form van-contact-edit">
<!--[-->
<div class="van-contact-edit__fields">
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Name
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Name"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Phone
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="tel"
id="van-field-input"
class="van-field__control"
placeholder="Phone"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
<div class="van-cell van-cell--borderless van-contact-edit__switch-cell">
<div class="van-cell__title"
style
>
<span>
Set as the default contact
</span>
</div>
<!--[-->
<div role="switch"
class="van-switch"
style
tabindex="0"
aria-checked="false"
>
<div class="van-switch__node">
</div>
</div>
</div>
<div class="van-contact-edit__buttons">
<button type="submit"
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-contact-edit__button"
style
>
<div class="van-button__content">
<span class="van-button__text">
Save
</span>
</div>
</button>
<button type="button"
class="van-button van-button--default van-button--normal van-button--block van-button--round van-contact-edit__button"
style
>
<div class="van-button__content">
<span class="van-button__text">
Delete
</span>
</div>
</button>
</div>
</form>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,101 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div>
<!--[-->
<div class="van-contact-list">
<div class="van-radio-group van-contact-list__group"
role="radiogroup"
>
<!--[-->
<!--[-->
<div class="van-cell van-cell--center van-cell--clickable van-contact-list__item"
role="button"
tabindex="0"
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-edit van-contact-list__edit"
style
>
<!--[-->
</i>
<div class="van-cell__title van-contact-list__item-title"
style
>
<!--[-->
John Snow13000000000
<span style
class="van-tag van-tag--round van-tag--primary van-contact-list__item-tag"
>
<!--[-->
default
</span>
</div>
<!--[-->
<div role="radio"
class="van-radio van-contact-list__radio"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style="font-size:16px;"
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div class="van-cell van-cell--center van-cell--clickable van-contact-list__item"
role="button"
tabindex="0"
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-edit van-contact-list__edit"
style
>
<!--[-->
</i>
<div class="van-cell__title van-contact-list__item-title"
style
>
<!--[-->
Ned Stark1310000000
</div>
<!--[-->
<div role="radio"
class="van-radio van-contact-list__radio"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style="font-size:16px;"
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div class="van-contact-list__bottom van-safe-area-bottom">
<button type="button"
class="van-button van-button--primary van-button--normal van-button--block van-button--round van-contact-list__add"
style
>
<div class="van-button__content">
<span class="van-button__text">
Add contact
</span>
</div>
</button>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,30 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div>
<!--[-->
<div class="van-cell van-cell--clickable van-coupon-cell"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Coupon
</span>
</div>
<div class="van-cell__value van-coupon-cell__value">
<span>
You have 2 coupons
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,174 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Alert
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Alert without title
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Confirm dialog
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Alert
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Alert without title
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Before Close
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Use Dialog Component
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
<div style="display:none;"
role="dialog"
tabindex="0"
class="van-popup van-popup--center van-dialog"
aria-labelledby="Title"
>
<!--[-->
<div class="van-dialog__header">
Title
</div>
<div class="van-dialog__content">
<!--[-->
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg">
</div>
<div class="van-hairline--top van-dialog__footer">
<button type="button"
class="van-button van-button--default van-button--large van-dialog__cancel"
style
>
<div class="van-button__content">
<span class="van-button__text">
Cancel
</span>
</div>
</button>
<button type="button"
class="van-button van-button--default van-button--large van-dialog__confirm van-hairline--left"
style
>
<div class="van-button__content">
<span class="van-button__text">
Confirm
</span>
</div>
</button>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,55 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div role="separator"
class="van-divider van-divider--hairline"
>
</div>
</div>
<div>
<!--[-->
<div role="separator"
class="van-divider van-divider--hairline van-divider--content-center"
>
<!--[-->
Text
</div>
</div>
<div>
<!--[-->
<div role="separator"
class="van-divider van-divider--hairline van-divider--content-left"
>
<!--[-->
Text
</div>
<div role="separator"
class="van-divider van-divider--hairline van-divider--content-right"
>
<!--[-->
Text
</div>
</div>
<div>
<!--[-->
<div role="separator"
class="van-divider van-divider--dashed van-divider--content-center"
>
<!--[-->
Text
</div>
</div>
<div>
<!--[-->
<div role="separator"
class="van-divider van-divider--hairline van-divider--content-center"
style="border-color:#1989fa;color:#1989fa;padding:0 16px;"
>
<!--[-->
Text
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,110 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-dropdown-menu">
<div style
class="van-dropdown-menu__bar"
>
<!--[-->
</div>
<!--[-->
<div style="top:0px;display:none;"
class="van-dropdown-item van-dropdown-item--down"
>
<!--[-->
</div>
<div style="top:0px;display:none;"
class="van-dropdown-item van-dropdown-item--down"
>
<!--[-->
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-dropdown-menu">
<div style
class="van-dropdown-menu__bar"
>
<!--[-->
</div>
<!--[-->
<div style="top:0px;display:none;"
class="van-dropdown-item van-dropdown-item--down"
>
<!--[-->
</div>
<div style="top:0px;display:none;"
class="van-dropdown-item van-dropdown-item--down"
>
<!--[-->
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-dropdown-menu">
<div style
class="van-dropdown-menu__bar"
>
<!--[-->
</div>
<!--[-->
<div style="top:0px;display:none;"
class="van-dropdown-item van-dropdown-item--down"
>
<!--[-->
</div>
<div style="top:0px;display:none;"
class="van-dropdown-item van-dropdown-item--down"
>
<!--[-->
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-dropdown-menu">
<div style
class="van-dropdown-menu__bar"
>
<!--[-->
</div>
<!--[-->
<div style="bottom:0px;display:none;"
class="van-dropdown-item van-dropdown-item--up"
>
<!--[-->
</div>
<div style="bottom:0px;display:none;"
class="van-dropdown-item van-dropdown-item--up"
>
<!--[-->
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-dropdown-menu">
<div style
class="van-dropdown-menu__bar"
>
<!--[-->
</div>
<!--[-->
<div style="top:0px;display:none;"
class="van-dropdown-item van-dropdown-item--down"
>
<!--[-->
</div>
<div style="top:0px;display:none;"
class="van-dropdown-item van-dropdown-item--down"
>
<!--[-->
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,615 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-empty">
<div class="van-empty__image"
style
>
<svg viewbox="0 0 160 160">
<defs>
<linearGradient x1="50%"
x2="50%"
y2="100%"
id="van-empty-5"
>
<!--[-->
<stop stop-color="#F2F3F5"
offset="0%"
>
</stop>
<stop stop-color="#DCDEE0"
offset="100%"
>
</stop>
</linearGradient>
<linearGradient x1="95%"
y1="48%"
x2="5.5%"
y2="51%"
id="van-empty-6"
>
<!--[-->
<stop stop-color="#EAEDF1"
offset="0%"
>
</stop>
<stop stop-color="#DCDEE0"
offset="100%"
>
</stop>
</linearGradient>
<linearGradient y1="45%"
x2="100%"
y2="54%"
id="van-empty-7"
>
<!--[-->
<stop stop-color="#EAEDF1"
offset="0%"
>
</stop>
<stop stop-color="#DCDEE0"
offset="100%"
>
</stop>
</linearGradient>
</defs>
<!--[-->
<defs>
<linearGradient id="van-empty-a"
x1="64%"
y1="100%"
x2="64%"
>
<stop stop-color="#FFF"
offset="0%"
stop-opacity="0.5"
>
</stop>
<stop stop-color="#F2F3F5"
offset="100%"
>
</stop>
</linearGradient>
</defs>
<g opacity=".8">
<path d="M36 131V53H16v20H2v58h34z"
fill="url(#van-empty-a)"
>
</path>
<path d="M123 15h22v14h9v77h-31V15z"
fill="url(#van-empty-a)"
>
</path>
</g>
<!--[-->
<defs>
<linearGradient id="van-empty-b"
x1="64%"
y1="97%"
x2="64%"
y2="0%"
>
<stop stop-color="#F2F3F5"
offset="0%"
stop-opacity="0.3"
>
</stop>
<stop stop-color="#F2F3F5"
offset="100%"
>
</stop>
</linearGradient>
</defs>
<g opacity=".8">
<path d="M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z"
fill="url(#van-empty-b)"
>
</path>
<path d="M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z"
fill="url(#van-empty-b)"
>
</path>
</g>
<g transform="translate(36 50)"
fill="none"
>
<g transform="translate(8)">
<rect fill="#EBEDF0"
opacity=".6"
x="38"
y="13"
width="36"
height="53"
rx="2"
>
</rect>
<rect fill="url(#van-empty-5)"
width="64"
height="66"
rx="2"
>
</rect>
<rect fill="#FFF"
x="6"
y="6"
width="52"
height="55"
rx="1"
>
</rect>
<g transform="translate(15 17)"
fill="url(#van-empty-6)"
>
<rect width="34"
height="6"
rx="1"
>
</rect>
<path d="M0 14h34v6H0z">
</path>
<rect y="28"
width="34"
height="6"
rx="1"
>
</rect>
</g>
</g>
<rect fill="url(#van-empty-7)"
y="61"
width="88"
height="28"
rx="1"
>
</rect>
<rect fill="#F7F8FA"
x="29"
y="72"
width="30"
height="6"
rx="1"
>
</rect>
</g>
</svg>
</div>
<p class="van-empty__description">
Description
</p>
</div>
</div>
<div>
<!--[-->
<div class="van-tabs van-tabs--line">
<!--[-->
<div class="van-tabs__wrap">
<div role="tablist"
class="van-tabs__nav van-tabs__nav--line"
style
aria-orientation="horizontal"
>
<!--[-->
</div>
</div>
<div class="van-tabs__content">
<!--[-->
<!--[-->
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-0"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-1"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-2"
style="display:none;"
>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-empty">
<div class="van-empty__image"
style="width:100px;height:100px;"
>
<svg viewbox="0 0 160 160">
<defs>
<linearGradient x1="50%"
x2="50%"
y2="100%"
id="van-empty-5"
>
<!--[-->
<stop stop-color="#F2F3F5"
offset="0%"
>
</stop>
<stop stop-color="#DCDEE0"
offset="100%"
>
</stop>
</linearGradient>
<linearGradient x1="95%"
y1="48%"
x2="5.5%"
y2="51%"
id="van-empty-6"
>
<!--[-->
<stop stop-color="#EAEDF1"
offset="0%"
>
</stop>
<stop stop-color="#DCDEE0"
offset="100%"
>
</stop>
</linearGradient>
<linearGradient y1="45%"
x2="100%"
y2="54%"
id="van-empty-7"
>
<!--[-->
<stop stop-color="#EAEDF1"
offset="0%"
>
</stop>
<stop stop-color="#DCDEE0"
offset="100%"
>
</stop>
</linearGradient>
</defs>
<!--[-->
<defs>
<linearGradient id="van-empty-a"
x1="64%"
y1="100%"
x2="64%"
>
<stop stop-color="#FFF"
offset="0%"
stop-opacity="0.5"
>
</stop>
<stop stop-color="#F2F3F5"
offset="100%"
>
</stop>
</linearGradient>
</defs>
<g opacity=".8">
<path d="M36 131V53H16v20H2v58h34z"
fill="url(#van-empty-a)"
>
</path>
<path d="M123 15h22v14h9v77h-31V15z"
fill="url(#van-empty-a)"
>
</path>
</g>
<!--[-->
<defs>
<linearGradient id="van-empty-b"
x1="64%"
y1="97%"
x2="64%"
y2="0%"
>
<stop stop-color="#F2F3F5"
offset="0%"
stop-opacity="0.3"
>
</stop>
<stop stop-color="#F2F3F5"
offset="100%"
>
</stop>
</linearGradient>
</defs>
<g opacity=".8">
<path d="M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z"
fill="url(#van-empty-b)"
>
</path>
<path d="M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z"
fill="url(#van-empty-b)"
>
</path>
</g>
<g transform="translate(36 50)"
fill="none"
>
<g transform="translate(8)">
<rect fill="#EBEDF0"
opacity=".6"
x="38"
y="13"
width="36"
height="53"
rx="2"
>
</rect>
<rect fill="url(#van-empty-5)"
width="64"
height="66"
rx="2"
>
</rect>
<rect fill="#FFF"
x="6"
y="6"
width="52"
height="55"
rx="1"
>
</rect>
<g transform="translate(15 17)"
fill="url(#van-empty-6)"
>
<rect width="34"
height="6"
rx="1"
>
</rect>
<path d="M0 14h34v6H0z">
</path>
<rect y="28"
width="34"
height="6"
rx="1"
>
</rect>
</g>
</g>
<rect fill="url(#van-empty-7)"
y="61"
width="88"
height="28"
rx="1"
>
</rect>
<rect fill="#F7F8FA"
x="29"
y="72"
width="30"
height="6"
rx="1"
>
</rect>
</g>
</svg>
</div>
<p class="van-empty__description">
Description
</p>
</div>
</div>
<div>
<!--[-->
<div class="van-empty">
<div class="van-empty__image"
style="width:80px;height:80px;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/custom-empty-image.png">
</div>
<p class="van-empty__description">
Description
</p>
</div>
</div>
<div>
<!--[-->
<div class="van-empty">
<div class="van-empty__image"
style
>
<svg viewbox="0 0 160 160">
<defs>
<linearGradient x1="50%"
x2="50%"
y2="100%"
id="van-empty-5"
>
<!--[-->
<stop stop-color="#F2F3F5"
offset="0%"
>
</stop>
<stop stop-color="#DCDEE0"
offset="100%"
>
</stop>
</linearGradient>
<linearGradient x1="95%"
y1="48%"
x2="5.5%"
y2="51%"
id="van-empty-6"
>
<!--[-->
<stop stop-color="#EAEDF1"
offset="0%"
>
</stop>
<stop stop-color="#DCDEE0"
offset="100%"
>
</stop>
</linearGradient>
<linearGradient y1="45%"
x2="100%"
y2="54%"
id="van-empty-7"
>
<!--[-->
<stop stop-color="#EAEDF1"
offset="0%"
>
</stop>
<stop stop-color="#DCDEE0"
offset="100%"
>
</stop>
</linearGradient>
</defs>
<!--[-->
<defs>
<linearGradient id="van-empty-a"
x1="64%"
y1="100%"
x2="64%"
>
<stop stop-color="#FFF"
offset="0%"
stop-opacity="0.5"
>
</stop>
<stop stop-color="#F2F3F5"
offset="100%"
>
</stop>
</linearGradient>
</defs>
<g opacity=".8">
<path d="M36 131V53H16v20H2v58h34z"
fill="url(#van-empty-a)"
>
</path>
<path d="M123 15h22v14h9v77h-31V15z"
fill="url(#van-empty-a)"
>
</path>
</g>
<!--[-->
<defs>
<linearGradient id="van-empty-b"
x1="64%"
y1="97%"
x2="64%"
y2="0%"
>
<stop stop-color="#F2F3F5"
offset="0%"
stop-opacity="0.3"
>
</stop>
<stop stop-color="#F2F3F5"
offset="100%"
>
</stop>
</linearGradient>
</defs>
<g opacity=".8">
<path d="M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z"
fill="url(#van-empty-b)"
>
</path>
<path d="M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z"
fill="url(#van-empty-b)"
>
</path>
</g>
<g transform="translate(36 50)"
fill="none"
>
<g transform="translate(8)">
<rect fill="#EBEDF0"
opacity=".6"
x="38"
y="13"
width="36"
height="53"
rx="2"
>
</rect>
<rect fill="url(#van-empty-5)"
width="64"
height="66"
rx="2"
>
</rect>
<rect fill="#FFF"
x="6"
y="6"
width="52"
height="55"
rx="1"
>
</rect>
<g transform="translate(15 17)"
fill="url(#van-empty-6)"
>
<rect width="34"
height="6"
rx="1"
>
</rect>
<path d="M0 14h34v6H0z">
</path>
<rect y="28"
width="34"
height="6"
rx="1"
>
</rect>
</g>
</g>
<rect fill="url(#van-empty-7)"
y="61"
width="88"
height="28"
rx="1"
>
</rect>
<rect fill="#F7F8FA"
x="29"
y="72"
width="30"
height="6"
rx="1"
>
</rect>
</g>
</svg>
</div>
<p class="van-empty__description">
Description
</p>
<div class="van-empty__bottom">
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal van-button--round bottom-button"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Button
</span>
</div>
</button>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,642 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Label
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Text"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<form class="van-form">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Text
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Text"
autocomplete="off"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Phone
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="tel"
id="van-field-input"
class="van-field__control"
placeholder="Phone"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Digit
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="tel"
inputmode="numeric"
id="van-field-input"
class="van-field__control"
placeholder="Digit"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Number
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
inputmode="decimal"
id="van-field-input"
class="van-field__control"
placeholder="Number"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Password
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="password"
id="van-field-input"
class="van-field__control"
placeholder="Password"
autocomplete="off"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</form>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Text
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
readonly
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field van-field--disabled">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Text
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
disabled
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<!--[-->
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-smile-o"
style
>
<!--[-->
</i>
</div>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Text
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Show Icon"
aria-labelledby="van-field-label"
>
<div class="van-field__right-icon">
<i class="van-badge__wrapper van-icon van-icon-warning-o"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<!--[-->
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-music-o"
style
>
<!--[-->
</i>
</div>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Text
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Show Clear Icon"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field van-field--error">
<div class="van-cell__title van-field__label van-field__label--required"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Username
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control van-field__control--error"
placeholder="Username"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label van-field__label--required"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Phone
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Phone"
aria-labelledby="van-field-label"
>
</div>
<div class="van-field__error-message">
Invalid phone
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-cell--center van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
SMS
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="SMS"
aria-labelledby="van-field-label"
>
<div class="van-field__button">
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--small"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Send SMS
</span>
</div>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Text
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Format On Change"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Text
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Format On Blur"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<textarea id="van-field-input"
rows="1"
class="van-field__control"
placeholder="Message"
>
</textarea>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Message
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<textarea id="van-field-input"
rows="2"
class="van-field__control"
placeholder="Message"
aria-labelledby="van-field-label"
>
</textarea>
</div>
<div class="van-field__word-limit">
<span class="van-field__word-num">
0
</span>
/50
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Text
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control van-field__control--right"
placeholder="Input Align Right"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field van-field--label-top">
<div class="van-cell__title van-field__label van-field__label--top"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Label
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Align Top"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field van-field--label-left">
<div class="van-cell__title van-field__label van-field__label--left"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Label
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Align Left"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field van-field--label-center">
<div class="van-cell__title van-field__label van-field__label--center"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Label
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Align Center"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field van-field--label-right">
<div class="van-cell__title van-field__label van-field__label--right"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Label
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
placeholder="Align Right"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,813 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<form class="van-form">
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Username
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="username"
class="van-field__control"
placeholder="Username"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Password
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="password"
id="van-field-input"
name="password"
class="van-field__control"
placeholder="Password"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
<div style="margin:16px 16px 0;">
<button type="submit"
class="van-button van-button--primary van-button--normal van-button--block van-button--round"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Submit
</span>
</div>
</button>
</div>
</form>
</div>
<div>
<!--[-->
<form class="van-form">
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Label
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="pattern"
class="van-field__control"
placeholder="Use pattern"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Label
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="validator"
class="van-field__control"
placeholder="Use validator"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Label
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="validatorMessage"
class="van-field__control"
placeholder="Use validator to return message"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Label
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="asyncValidator"
class="van-field__control"
placeholder="Use async validator"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
<div style="margin:16px 16px 0;">
<button type="submit"
class="van-button van-button--primary van-button--normal van-button--block van-button--round"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Submit
</span>
</div>
</button>
</div>
</form>
</div>
<div>
<!--[-->
<form class="van-form">
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Switch
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div role="switch"
class="van-switch"
style
tabindex="0"
aria-checked="false"
>
<div class="van-switch__node">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Checkbox
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div role="checkbox"
class="van-checkbox"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--square"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Checkbox Group
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div class="van-checkbox-group van-checkbox-group--horizontal">
<!--[-->
<div role="checkbox"
class="van-checkbox van-checkbox--horizontal"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--square"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox 1
</span>
</div>
<div role="checkbox"
class="van-checkbox van-checkbox--horizontal"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-checkbox__icon van-checkbox__icon--square"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-checkbox__label">
<!--[-->
Checkbox 2
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Radio
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div class="van-radio-group van-radio-group--horizontal"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio van-radio--horizontal"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 1
</span>
</div>
<div role="radio"
class="van-radio van-radio--horizontal"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 2
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Stepper
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div role="group"
class="van-stepper"
>
<button type="button"
style
class="van-stepper__minus van-stepper__minus--disabled"
aria-disabled="true"
>
</button>
<input type="text"
role="spinbutton"
class="van-stepper__input"
value="1"
style
inputmode="decimal"
aria-valuemax="Infinity"
aria-valuemin="1"
aria-valuenow="1"
>
<button type="button"
style
class="van-stepper__plus van-haptics-feedback"
>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Rate
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div role="radiogroup"
class="van-rate"
tabindex="0"
aria-disabled="false"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Slider
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div style
class="van-slider"
>
<div class="van-slider__bar"
style="width:50%;left:0%;"
>
<div role="slider"
class="van-slider__button-wrapper van-slider__button-wrapper--right"
tabindex="0"
aria-valuemin="0"
aria-valuenow="50"
aria-valuemax="100"
aria-orientation="horizontal"
>
<div class="van-slider__button"
style
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="van-cell van-field">
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Uploader
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<div class="van-field__control van-field__control--custom">
<!--[-->
<div class="van-uploader">
<div class="van-uploader__wrapper">
<!--[-->
<div class="van-uploader__preview">
<div class="van-image van-uploader__preview-image"
style
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/leaf.jpeg"
class="van-image__img"
style="object-fit:cover;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
</div>
<div role="button"
class="van-uploader__preview-delete van-uploader__preview-delete--shadow"
tabindex="0"
aria-label="Delete"
>
<i class="van-badge__wrapper van-icon van-icon-cross van-uploader__preview-delete-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="van-uploader__upload"
style
>
<i class="van-badge__wrapper van-icon van-icon-photograph van-uploader__upload-icon"
style
>
<!--[-->
</i>
<input type="file"
class="van-uploader__input"
accept="image/*"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Picker
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="picker"
class="van-field__control"
readonly
placeholder="Select city"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Datetime Picker
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="datePicker"
class="van-field__control"
readonly
placeholder="Select time"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Area Picker
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="area"
class="van-field__control"
readonly
placeholder="Select area"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Calendar
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="calendar"
class="van-field__control"
readonly
placeholder="Select date"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div style="margin:16px 16px 0;">
<button type="submit"
class="van-button van-button--primary van-button--normal van-button--block van-button--round"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Submit
</span>
</div>
</button>
</div>
</form>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,719 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div style
class="van-grid van-hairline--top"
>
<!--[-->
<!--[-->
<div class="van-grid-item"
style="flex-basis:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style
class="van-grid van-hairline--top"
>
<!--[-->
<!--[-->
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style
class="van-grid"
>
<!--[-->
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--center"
style
>
<!--[-->
<div class="van-image"
style
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg"
class="van-image__img"
style="object-fit:contain;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--center"
style
>
<!--[-->
<div class="van-image"
style
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg"
class="van-image__img"
style="object-fit:contain;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--center"
style
>
<!--[-->
<div class="van-image"
style
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg"
class="van-image__img"
style="object-fit:contain;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style
class="van-grid van-hairline--top"
>
<!--[-->
<!--[-->
<div class="van-grid-item van-grid-item--square"
style="flex-basis:25%;padding-top:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item van-grid-item--square"
style="flex-basis:25%;padding-top:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item van-grid-item--square"
style="flex-basis:25%;padding-top:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item van-grid-item--square"
style="flex-basis:25%;padding-top:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item van-grid-item--square"
style="flex-basis:25%;padding-top:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item van-grid-item--square"
style="flex-basis:25%;padding-top:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item van-grid-item--square"
style="flex-basis:25%;padding-top:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item van-grid-item--square"
style="flex-basis:25%;padding-top:25%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--square van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style="padding-left:10px;"
class="van-grid"
>
<!--[-->
<!--[-->
<div class="van-grid-item"
style="flex-basis:25%;padding-right:10px;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;padding-right:10px;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;padding-right:10px;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;padding-right:10px;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;padding-right:10px;margin-top:10px;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;padding-right:10px;margin-top:10px;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;padding-right:10px;margin-top:10px;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;padding-right:10px;margin-top:10px;"
>
<div class="van-grid-item__content van-grid-item__content--center van-grid-item__content--surround van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style
class="van-grid van-hairline--top"
>
<!--[-->
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--horizontal van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--horizontal van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:33.333333333333336%;"
>
<div class="van-grid-item__content van-grid-item__content--horizontal van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-photo-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style
class="van-grid van-hairline--top"
>
<!--[-->
<div class="van-grid-item"
style="flex-basis:50%;"
>
<div role="button"
class="van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline"
style
tabindex="0"
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-home-o van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
Vue Router
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:50%;"
>
<div role="button"
class="van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline"
style
tabindex="0"
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-search van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
URL
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style
class="van-grid van-hairline--top"
>
<!--[-->
<div class="van-grid-item"
style="flex-basis:50%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-home-o van-grid-item__icon"
style
>
<!--[-->
<div class="van-badge van-badge--top-right van-badge--dot van-badge--fixed"
style
>
</div>
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:50%;"
>
<div class="van-grid-item__content van-grid-item__content--center van-hairline"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-search van-grid-item__icon"
style
>
<!--[-->
<div class="van-badge van-badge--top-right van-badge--fixed"
style
>
99+
</div>
</i>
<span class="van-grid-item__text">
Text
</span>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,61 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div class="van-tabs van-tabs--line">
<div style>
<div class="van-sticky"
style
>
<!--[-->
<div>
<!--[-->
<div class="van-tabs__wrap">
<div role="tablist"
class="van-tabs__nav van-tabs__nav--line"
style
aria-orientation="horizontal"
>
<!--[-->
</div>
</div>
</div>
</div>
</div>
<div class="van-tabs__content">
<!--[-->
<!--[-->
<div id="van-tab"
role="tabpanel"
class="van-tab__panel demo-icon-tab-panel"
tabindex="-1"
aria-labelledby="van-tabs-0"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel demo-icon-tab-panel"
tabindex="-1"
aria-labelledby="van-tabs-1"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel demo-icon-tab-panel"
tabindex="-1"
aria-labelledby="van-tabs-2"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel demo-icon-tab-panel"
tabindex="-1"
aria-labelledby="van-tabs-3"
style="display:none;"
>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,560 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-row">
<!--[-->
<div class="van-image"
style="width:100px;height:100px;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-row">
<!--[-->
<!--[-->
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:contain;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
contain
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:cover;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
cover
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:fill;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
fill
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:none;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
none
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:scale-down;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
scale-down
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-row">
<!--[-->
<!--[-->
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:cover;object-position:left;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
cover
</div>
<div class="text">
left
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:cover;object-position:center;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
cover
</div>
<div class="text">
center
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:cover;object-position:right;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
cover
</div>
<div class="text">
right
</div>
</div>
<!--[-->
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:contain;object-position:top;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
contain
</div>
<div class="text">
top
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:contain;object-position:center;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
contain
</div>
<div class="text">
center
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:contain;object-position:bottom;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
contain
</div>
<div class="text">
bottom
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-row">
<!--[-->
<!--[-->
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image van-image--round"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:contain;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
contain
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image van-image--round"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:cover;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
cover
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image van-image--round"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:fill;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
fill
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image van-image--round"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:none;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
none
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image van-image--round"
style="width:100%;height:27vw;"
>
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg"
class="van-image__img"
style="object-fit:scale-down;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
scale-down
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-row">
<!--[-->
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
Default Tip
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<div class="van-image__loading">
<!--[-->
<div class="van-loading van-loading--spinner"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--spinner"
style="width:20px;height:20px;"
>
<!--[-->
<i class="van-loading__line van-loading__line--1">
</i>
<i class="van-loading__line van-loading__line--2">
</i>
<i class="van-loading__line van-loading__line--3">
</i>
<i class="van-loading__line van-loading__line--4">
</i>
<i class="van-loading__line van-loading__line--5">
</i>
<i class="van-loading__line van-loading__line--6">
</i>
<i class="van-loading__line van-loading__line--7">
</i>
<i class="van-loading__line van-loading__line--8">
</i>
<i class="van-loading__line van-loading__line--9">
</i>
<i class="van-loading__line van-loading__line--10">
</i>
<i class="van-loading__line van-loading__line--11">
</i>
<i class="van-loading__line van-loading__line--12">
</i>
</span>
</div>
</div>
</div>
<div class="text">
Custom Tip
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-row">
<!--[-->
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="http://x"
class="van-image__img"
style
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
Default Tip
</div>
</div>
<div style
class="van-col van-col--8"
>
<!--[-->
<div class="van-image"
style="width:100%;height:27vw;"
>
<img src="http://x"
class="van-image__img"
style
>
<div class="van-image__loading">
<i class="van-badge__wrapper van-icon van-icon-photo van-image__loading-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div class="text">
Custom Tip
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,36 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div class="van-tabs van-tabs--line">
<!--[-->
<div class="van-tabs__wrap">
<div role="tablist"
class="van-tabs__nav van-tabs__nav--line"
style
aria-orientation="horizontal"
>
<!--[-->
</div>
</div>
<div class="van-tabs__content">
<!--[-->
<!--[-->
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-0"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-1"
style="display:none;"
>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,44 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div class="van-tabs van-tabs--line">
<!--[-->
<div class="van-tabs__wrap">
<div role="tablist"
class="van-tabs__nav van-tabs__nav--line"
style
aria-orientation="horizontal"
>
<!--[-->
</div>
</div>
<div class="van-tabs__content">
<!--[-->
<!--[-->
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-0"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-1"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-2"
style="display:none;"
>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,306 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-loading van-loading--circular"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
</div>
<div class="van-loading van-loading--spinner"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--spinner"
style
>
<!--[-->
<i class="van-loading__line van-loading__line--1">
</i>
<i class="van-loading__line van-loading__line--2">
</i>
<i class="van-loading__line van-loading__line--3">
</i>
<i class="van-loading__line van-loading__line--4">
</i>
<i class="van-loading__line van-loading__line--5">
</i>
<i class="van-loading__line van-loading__line--6">
</i>
<i class="van-loading__line van-loading__line--7">
</i>
<i class="van-loading__line van-loading__line--8">
</i>
<i class="van-loading__line van-loading__line--9">
</i>
<i class="van-loading__line van-loading__line--10">
</i>
<i class="van-loading__line van-loading__line--11">
</i>
<i class="van-loading__line van-loading__line--12">
</i>
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-loading van-loading--circular"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style="color:#1989fa;"
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
</div>
<div class="van-loading van-loading--spinner"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--spinner"
style="color:#1989fa;"
>
<!--[-->
<i class="van-loading__line van-loading__line--1">
</i>
<i class="van-loading__line van-loading__line--2">
</i>
<i class="van-loading__line van-loading__line--3">
</i>
<i class="van-loading__line van-loading__line--4">
</i>
<i class="van-loading__line van-loading__line--5">
</i>
<i class="van-loading__line van-loading__line--6">
</i>
<i class="van-loading__line van-loading__line--7">
</i>
<i class="van-loading__line van-loading__line--8">
</i>
<i class="van-loading__line van-loading__line--9">
</i>
<i class="van-loading__line van-loading__line--10">
</i>
<i class="van-loading__line van-loading__line--11">
</i>
<i class="van-loading__line van-loading__line--12">
</i>
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-loading van-loading--circular"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style="width:24px;height:24px;"
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
</div>
<div class="van-loading van-loading--spinner"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--spinner"
style="width:24px;height:24px;"
>
<!--[-->
<i class="van-loading__line van-loading__line--1">
</i>
<i class="van-loading__line van-loading__line--2">
</i>
<i class="van-loading__line van-loading__line--3">
</i>
<i class="van-loading__line van-loading__line--4">
</i>
<i class="van-loading__line van-loading__line--5">
</i>
<i class="van-loading__line van-loading__line--6">
</i>
<i class="van-loading__line van-loading__line--7">
</i>
<i class="van-loading__line van-loading__line--8">
</i>
<i class="van-loading__line van-loading__line--9">
</i>
<i class="van-loading__line van-loading__line--10">
</i>
<i class="van-loading__line van-loading__line--11">
</i>
<i class="van-loading__line van-loading__line--12">
</i>
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-loading van-loading--circular"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style="width:24px;height:24px;"
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
<span class="van-loading__text"
style
>
<!--[-->
Loading...
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-loading van-loading--circular van-loading--vertical"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style="width:24px;height:24px;"
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
<span class="van-loading__text"
style
>
<!--[-->
Loading...
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-loading van-loading--circular van-loading--vertical"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style="color:#0094ff;width:24px;height:24px;"
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
<span class="van-loading__text"
style="color:#0094ff;"
>
<!--[-->
Loading...
</span>
</div>
<div class="van-loading van-loading--circular van-loading--vertical"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style="width:24px;height:24px;"
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
<span class="van-loading__text"
style="color:#0094ff;"
>
<!--[-->
Loading...
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-loading van-loading--circular van-loading--vertical"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-star-o"
style="font-size:30px;"
>
<!--[-->
</i>
</span>
<span class="van-loading__text"
style
>
<!--[-->
Loading...
</span>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,99 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div style
class="van-nav-bar van-hairline--bottom"
>
<div class="van-nav-bar__content">
<div class="van-nav-bar__title van-ellipsis">
Title
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style
class="van-nav-bar van-hairline--bottom"
>
<div class="van-nav-bar__content">
<div class="van-nav-bar__left van-haptics-feedback">
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-arrow-left van-nav-bar__arrow"
style
>
<!--[-->
</i>
<span class="van-nav-bar__text">
Back
</span>
</div>
<div class="van-nav-bar__title van-ellipsis">
Title
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style
class="van-nav-bar van-hairline--bottom"
>
<div class="van-nav-bar__content">
<div class="van-nav-bar__left van-haptics-feedback">
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-arrow-left van-nav-bar__arrow"
style
>
<!--[-->
</i>
<span class="van-nav-bar__text">
Back
</span>
</div>
<div class="van-nav-bar__title van-ellipsis">
Title
</div>
<div class="van-nav-bar__right van-haptics-feedback">
<span class="van-nav-bar__text">
Button
</span>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div style
class="van-nav-bar van-hairline--bottom"
>
<div class="van-nav-bar__content">
<div class="van-nav-bar__left van-haptics-feedback">
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-arrow-left van-nav-bar__arrow"
style
>
<!--[-->
</i>
<span class="van-nav-bar__text">
Back
</span>
</div>
<div class="van-nav-bar__title van-ellipsis">
Title
</div>
<div class="van-nav-bar__right van-haptics-feedback">
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-search"
style="font-size:18px;"
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,185 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div role="alert"
class="van-notice-bar"
style
>
<i class="van-badge__wrapper van-icon van-icon-volume-o van-notice-bar__left-icon"
style
>
<!--[-->
</i>
<div role="marquee"
class="van-notice-bar__wrap"
>
<div style="transform:;transition-duration:0s;"
class="van-notice-bar__content"
>
Technology is the common soul of the people who developed it.
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div role="alert"
class="van-notice-bar"
style
>
<div role="marquee"
class="van-notice-bar__wrap"
>
<div style="transform:;transition-duration:0s;"
class="van-notice-bar__content"
>
Short Content
</div>
</div>
</div>
<div role="alert"
class="van-notice-bar"
style
>
<div role="marquee"
class="van-notice-bar__wrap"
>
<div style="transform:;transition-duration:0s;"
class="van-notice-bar__content van-ellipsis"
>
Technology is the common soul of the people who developed it.
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div role="alert"
class="van-notice-bar van-notice-bar--wrapable"
style
>
<div role="marquee"
class="van-notice-bar__wrap"
>
<div style="transform:;transition-duration:0s;"
class="van-notice-bar__content"
>
Technology is the common soul of the people who developed it.
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div role="alert"
class="van-notice-bar"
style
>
<div role="marquee"
class="van-notice-bar__wrap"
>
<div style="transform:;transition-duration:0s;"
class="van-notice-bar__content"
>
Short Content
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-cross van-notice-bar__right-icon"
style
>
<!--[-->
</i>
</div>
<div role="alert"
class="van-notice-bar"
style
>
<div role="marquee"
class="van-notice-bar__wrap"
>
<div style="transform:;transition-duration:0s;"
class="van-notice-bar__content"
>
Short Content
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-notice-bar__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div role="alert"
class="van-notice-bar"
style="color:#1989fa;background:#ecf9ff;"
>
<i class="van-badge__wrapper van-icon van-icon-info-o van-notice-bar__left-icon"
style
>
<!--[-->
</i>
<div role="marquee"
class="van-notice-bar__wrap"
>
<div style="transform:;transition-duration:0s;"
class="van-notice-bar__content"
>
Short Content
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div role="alert"
class="van-notice-bar"
style
>
<i class="van-badge__wrapper van-icon van-icon-volume-o van-notice-bar__left-icon"
style
>
<!--[-->
</i>
<div role="marquee"
class="van-notice-bar__wrap"
>
<div style="transform:;transition-duration:0s;"
class="van-notice-bar__content van-ellipsis"
>
<!--[-->
<div class="van-swipe notice-swipe">
<div style="transition-duration:500ms;transform:translateY(0px);"
class="van-swipe__track van-swipe__track--vertical"
>
<!--[-->
<div class="van-swipe-item"
style
>
<!--[-->
Content 1
</div>
<div class="van-swipe-item"
style
>
<!--[-->
Content 2
</div>
<div class="van-swipe-item"
style
>
<!--[-->
Content 3
</div>
</div>
</div>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,171 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Basic Usage
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Primary
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Success
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Danger
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Warning
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Color
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Position
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Duration
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Use Notify Component
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,869 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Show Default Keyboard
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Show Keyboard With Sidebar
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Show IdNumber Keyboard
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Show Keyboard With Title
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Show Keyboard With Multiple ExtraKey
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Show Keyboard With Random Key Order
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Bind Value
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
readonly
placeholder="Click To Input"
aria-labelledby="van-field-label"
>
</div>
</div>
</div>
</div>
<div style
class="van-number-keyboard"
>
<div class="van-number-keyboard__body">
<div class="van-number-keyboard__keys">
<!--[-->
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
1
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
2
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
3
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
4
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
5
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
6
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
7
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
8
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
9
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
<svg class="van-key__collapse-icon"
viewbox="0 0 30 24"
>
<path d="M26 13h-2v2h2v-2zm-8-3h2V8h-2v2zm2-4h2V4h-2v2zm2 4h4V4h-2v4h-2v2zm-7 14 3-3h-6l3 3zM6 13H4v2h2v-2zm16 0H8v2h14v-2zm-12-3h2V8h-2v2zM28 0l1 1 1 1v15l-1 2H1l-1-2V2l1-1 1-1zm0 2H2v15h26V2zM6 4v2H4V4zm10 2h2V4h-2v2zM8 9v1H4V8zm8 0v1h-2V8zm-6-5v2H8V4zm4 0v2h-2V4z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
0
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key van-key--delete"
>
<svg class="van-key__delete-icon"
viewbox="0 0 32 22"
>
<path d="M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
</div>
</div>
</div>
<div style="display:none;"
class="van-number-keyboard"
>
<div class="van-number-keyboard__body">
<div class="van-number-keyboard__keys">
<!--[-->
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
1
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
2
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
3
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
4
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
5
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
6
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
7
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
8
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
9
</div>
</div>
<div class="van-key__wrapper van-key__wrapper--wider">
<div role="button"
tabindex="0"
class="van-key"
>
0
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
.
</div>
</div>
</div>
<div class="van-number-keyboard__sidebar">
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key van-key--large van-key--delete"
>
<svg class="van-key__delete-icon"
viewbox="0 0 32 22"
>
<path d="M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key van-key--blue van-key--large"
>
Close
</div>
</div>
</div>
</div>
</div>
<div style="display:none;"
class="van-number-keyboard van-number-keyboard--with-title"
>
<div class="van-number-keyboard__header">
<button type="button"
class="van-number-keyboard__close van-haptics-feedback"
>
Close
</button>
</div>
<div class="van-number-keyboard__body">
<div class="van-number-keyboard__keys">
<!--[-->
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
1
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
2
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
3
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
4
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
5
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
6
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
7
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
8
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
9
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
X
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
0
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key van-key--delete"
>
<svg class="van-key__delete-icon"
viewbox="0 0 32 22"
>
<path d="M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
</div>
</div>
</div>
<div style="display:none;"
class="van-number-keyboard van-number-keyboard--with-title"
>
<div class="van-number-keyboard__header">
<h2 class="van-number-keyboard__title">
Keyboard Title
</h2>
<button type="button"
class="van-number-keyboard__close van-haptics-feedback"
>
Close
</button>
</div>
<div class="van-number-keyboard__body">
<div class="van-number-keyboard__keys">
<!--[-->
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
1
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
2
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
3
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
4
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
5
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
6
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
7
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
8
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
9
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
.
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
0
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key van-key--delete"
>
<svg class="van-key__delete-icon"
viewbox="0 0 32 22"
>
<path d="M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
</div>
</div>
</div>
<div style="display:none;"
class="van-number-keyboard"
>
<div class="van-number-keyboard__body">
<div class="van-number-keyboard__keys">
<!--[-->
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
1
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
2
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
3
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
4
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
5
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
6
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
7
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
8
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
9
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
00
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
0
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
.
</div>
</div>
</div>
<div class="van-number-keyboard__sidebar">
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key van-key--large van-key--delete"
>
<svg class="van-key__delete-icon"
viewbox="0 0 32 22"
>
<path d="M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key van-key--blue van-key--large"
>
Close
</div>
</div>
</div>
</div>
</div>
<div style="display:none;"
class="van-number-keyboard"
>
<div class="van-number-keyboard__body">
<div class="van-number-keyboard__keys">
<!--[-->
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
1
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
2
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
3
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
4
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
5
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
6
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
7
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
8
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
9
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
<svg class="van-key__collapse-icon"
viewbox="0 0 30 24"
>
<path d="M26 13h-2v2h2v-2zm-8-3h2V8h-2v2zm2-4h2V4h-2v2zm2 4h4V4h-2v4h-2v2zm-7 14 3-3h-6l3 3zM6 13H4v2h2v-2zm16 0H8v2h14v-2zm-12-3h2V8h-2v2zM28 0l1 1 1 1v15l-1 2H1l-1-2V2l1-1 1-1zm0 2H2v15h26V2zM6 4v2H4V4zm10 2h2V4h-2v2zM8 9v1H4V8zm8 0v1h-2V8zm-6-5v2H8V4zm4 0v2h-2V4z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
0
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key van-key--delete"
>
<svg class="van-key__delete-icon"
viewbox="0 0 32 22"
>
<path d="M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,31 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style="margin-left:16px;"
>
<div class="van-button__content">
<span class="van-button__text">
Show Overlay
</span>
</div>
</button>
</div>
<div>
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style="margin-left:16px;"
>
<div class="van-button__content">
<span class="van-button__text">
Embedded Content
</span>
</div>
</button>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,187 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<nav role="navigation"
class="van-pagination"
>
<ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--disabled van-pagination__item--prev van-hairline--surround">
<button type="button"
disabled
>
Prev
</button>
</li>
<!--[-->
<li class="van-pagination__item van-pagination__item--active van-pagination__item--page van-hairline--surround">
<button type="button"
aria-current="true"
>
1
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
2
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
3
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
4
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
5
</button>
</li>
<li class="van-pagination__item van-pagination__item--next van-hairline--surround">
<button type="button">
Next
</button>
</li>
</ul>
</nav>
</div>
<div>
<!--[-->
<nav role="navigation"
class="van-pagination"
size="small"
>
<ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--disabled van-pagination__item--border van-pagination__item--prev van-hairline--surround">
<button type="button"
disabled
>
Prev
</button>
</li>
<li class="van-pagination__page-desc">
1/12
</li>
<li class="van-pagination__item van-pagination__item--border van-pagination__item--next van-hairline--surround">
<button type="button">
Next
</button>
</li>
</ul>
</nav>
</div>
<div>
<!--[-->
<nav role="navigation"
class="van-pagination"
>
<ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--disabled van-pagination__item--prev van-hairline--surround">
<button type="button"
disabled
>
Prev
</button>
</li>
<!--[-->
<li class="van-pagination__item van-pagination__item--active van-pagination__item--page van-hairline--surround">
<button type="button"
aria-current="true"
>
1
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
2
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
3
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
...
</button>
</li>
<li class="van-pagination__item van-pagination__item--next van-hairline--surround">
<button type="button">
Next
</button>
</li>
</ul>
</nav>
</div>
<div>
<!--[-->
<nav role="navigation"
class="van-pagination"
>
<ul class="van-pagination__items">
<li class="van-pagination__item van-pagination__item--disabled van-pagination__item--prev van-hairline--surround">
<button type="button"
disabled
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-arrow-left"
style
>
<!--[-->
</i>
</button>
</li>
<!--[-->
<li class="van-pagination__item van-pagination__item--active van-pagination__item--page van-hairline--surround">
<button type="button"
aria-current="true"
>
<!--[-->
1
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
<!--[-->
2
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
<!--[-->
3
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
<!--[-->
4
</button>
</li>
<li class="van-pagination__item van-pagination__item--page van-hairline--surround">
<button type="button">
<!--[-->
5
</button>
</li>
<li class="van-pagination__item van-pagination__item--next van-hairline--surround">
<button type="button">
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-arrow"
style
>
<!--[-->
</i>
</button>
</li>
</ul>
</nav>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,328 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-password-input">
<ul class="van-password-input__security van-hairline--surround">
<!--[-->
<li class="van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-hairline--left van-password-input__item van-password-input__item--focus"
style
>
<i style="visibility:hidden;">
</i>
<div class="van-password-input__cursor">
</div>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:hidden;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:hidden;">
</i>
</li>
</ul>
</div>
</div>
<div>
<!--[-->
<div class="van-password-input">
<ul class="van-password-input__security van-hairline--surround">
<!--[-->
<li class="van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:hidden;">
</i>
</li>
</ul>
</div>
</div>
<div>
<!--[-->
<div class="van-password-input">
<ul class="van-password-input__security">
<!--[-->
<li class="van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-password-input__item"
style="margin-left:10px;"
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-password-input__item"
style="margin-left:10px;"
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-password-input__item"
style="margin-left:10px;"
>
<i style="visibility:hidden;">
</i>
</li>
<li class="van-password-input__item"
style="margin-left:10px;"
>
<i style="visibility:hidden;">
</i>
</li>
<li class="van-password-input__item"
style="margin-left:10px;"
>
<i style="visibility:hidden;">
</i>
</li>
</ul>
</div>
</div>
<div>
<!--[-->
<div class="van-password-input">
<ul class="van-password-input__security van-hairline--surround">
<!--[-->
<li class="van-password-input__item"
style
>
1
</li>
<li class="van-hairline--left van-password-input__item"
style
>
2
</li>
<li class="van-hairline--left van-password-input__item"
style
>
3
</li>
<li class="van-hairline--left van-password-input__item"
style
>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
</li>
</ul>
</div>
</div>
<div>
<!--[-->
<div class="van-password-input">
<ul class="van-password-input__security van-hairline--surround">
<!--[-->
<li class="van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:visible;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:hidden;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:hidden;">
</i>
</li>
<li class="van-hairline--left van-password-input__item"
style
>
<i style="visibility:hidden;">
</i>
</li>
</ul>
<div class="van-password-input__info">
Some tips
</div>
</div>
</div>
<div style
class="van-number-keyboard"
>
<div class="van-number-keyboard__body">
<div class="van-number-keyboard__keys">
<!--[-->
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
1
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
2
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
3
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
4
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
5
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
6
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
7
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
8
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
9
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
<svg class="van-key__collapse-icon"
viewbox="0 0 30 24"
>
<path d="M26 13h-2v2h2v-2zm-8-3h2V8h-2v2zm2-4h2V4h-2v2zm2 4h4V4h-2v4h-2v2zm-7 14 3-3h-6l3 3zM6 13H4v2h2v-2zm16 0H8v2h14v-2zm-12-3h2V8h-2v2zM28 0l1 1 1 1v15l-1 2H1l-1-2V2l1-1 1-1zm0 2H2v15h26V2zM6 4v2H4V4zm10 2h2V4h-2v2zM8 9v1H4V8zm8 0v1h-2V8zm-6-5v2H8V4zm4 0v2h-2V4z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key"
>
0
</div>
</div>
<div class="van-key__wrapper">
<div role="button"
tabindex="0"
class="van-key van-key--delete"
>
<svg class="van-key__delete-icon"
viewbox="0 0 32 22"
>
<path d="M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z"
fill="currentColor"
>
</path>
</svg>
</div>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,678 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-picker">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Delaware
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Florida
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Wenzhou
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Indiana
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Maine
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
City
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
class="van-field__control"
readonly
placeholder="Choose City"
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
</div>
<div>
<!--[-->
<div class="van-picker">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 22px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Delaware
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Florida
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Wenzhou
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Indiana
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Maine
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-picker">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Monday
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Tuesday
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Wednesday
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Thursday
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Friday
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Morning
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Afternoon
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Evening
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-picker">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Zhejiang
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Fujian
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Hangzhou
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Wenzhou
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Xihu
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Yuhang
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-picker">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 66px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="-1"
class="van-picker-column__item van-picker-column__item--disabled"
>
<div class="van-ellipsis">
Delaware
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Florida
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Wenzhou
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-picker">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-loading van-loading--circular van-picker__loading"
aria-live="polite"
aria-busy="true"
>
<span class="van-loading__spinner van-loading__spinner--circular"
style
>
<svg class="van-loading__circular"
viewbox="25 25 50 50"
>
<circle cx="50"
cy="50"
r="20"
fill="none"
>
</circle>
</svg>
</span>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
</ul>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-picker">
<div class="van-picker__toolbar">
<!--[-->
<button type="button"
class="van-picker__cancel van-haptics-feedback"
>
Cancel
</button>
<div class="van-picker__title van-ellipsis">
Title
</div>
<button type="button"
class="van-picker__confirm van-haptics-feedback"
>
Confirm
</button>
</div>
<div class="van-picker__columns"
style="height:264px;"
>
<!--[-->
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Zhejiang
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Fujian
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Hangzhou
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Wenzhou
</div>
</li>
</ul>
</div>
<div class="van-picker-column">
<ul style="transform:translate3d(0, 110px, 0);transition-duration:0ms;transition-property:none;"
class="van-picker-column__wrapper"
>
<!--[-->
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item van-picker-column__item--selected"
>
<div class="van-ellipsis">
Xihu
</div>
</li>
<li role="button"
style="height:44px;"
tabindex="0"
class="van-picker-column__item"
>
<div class="van-ellipsis">
Yuhang
</div>
</li>
</ul>
</div>
<!--[-->
<div class="van-picker__mask"
style="background-size:100% 110px;"
>
</div>
<div class="van-hairline-unset--top-bottom van-picker__frame"
style="height:44px;"
>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,143 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<!--[-->
<span class="van-popover__wrapper">
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Light Theme
</span>
</div>
</button>
</span>
<!--[-->
<span class="van-popover__wrapper">
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Dark Theme
</span>
</div>
</button>
</span>
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable van-field"
role="button"
tabindex="0"
>
<div class="van-cell__title van-field__label"
style
>
<!--[-->
<label id="van-field-label"
for="van-field-input"
style
>
Placement
</label>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="text"
id="van-field-input"
name="picker"
class="van-field__control"
readonly
aria-labelledby="van-field-label"
>
</div>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
<div>
<!--[-->
<!--[-->
<span class="van-popover__wrapper">
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Show Icon
</span>
</div>
</button>
</span>
<!--[-->
<span class="van-popover__wrapper">
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Disable Action
</span>
</div>
</button>
</span>
</div>
<div>
<!--[-->
<!--[-->
<span class="van-popover__wrapper">
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Custom Content
</span>
</div>
</button>
</span>
</div>
<div>
<!--[-->
<!--[-->
<span class="van-popover__wrapper">
<!--[-->
<button type="button"
class="van-button van-button--primary van-button--normal"
style
>
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Uncontrolled
</span>
</div>
</button>
</span>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,269 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Show Popup
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
</div>
<div>
<!--[-->
<div style
class="van-grid van-hairline--top"
>
<!--[-->
<div class="van-grid-item"
style="flex-basis:25%;"
>
<div role="button"
class="van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline"
style
tabindex="0"
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-arrow-up van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
From Top
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;"
>
<div role="button"
class="van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline"
style
tabindex="0"
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-arrow-down van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
From Bottom
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;"
>
<div role="button"
class="van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline"
style
tabindex="0"
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-arrow-left van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
From Left
</span>
</div>
</div>
<div class="van-grid-item"
style="flex-basis:25%;"
>
<div role="button"
class="van-grid-item__content van-grid-item__content--center van-grid-item__content--clickable van-hairline"
style
tabindex="0"
>
<!--[-->
<i class="van-badge__wrapper van-icon van-icon-arrow van-grid-item__icon"
style
>
<!--[-->
</i>
<span class="van-grid-item__text">
From Right
</span>
</div>
</div>
</div>
<!--[-->
<!--[-->
<!--[-->
<!--[-->
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Close Icon
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Custom Icon
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Icon Position
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
<!--[-->
<!--[-->
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Round Corner (center)
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Round Corner (bottom)
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Listen To Click Events
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Listen To Display Events
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
<!--[-->
</div>
<div>
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Get Container
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon"
style
>
<!--[-->
</i>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,133 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-progress"
style
>
<span class="van-progress__portion"
style="width:50%;"
>
</span>
<span style="left:50%;transform:translate(-50%,-50%);"
class="van-progress__pivot"
>
50%
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-progress"
style="height:8px;"
>
<span class="van-progress__portion"
style="width:50%;"
>
</span>
<span style="left:50%;transform:translate(-50%,-50%);"
class="van-progress__pivot"
>
50%
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-progress"
style
>
<span class="van-progress__portion van-progress__portion--inactive"
style="width:50%;"
>
</span>
<span style="left:50%;transform:translate(-50%,-50%);"
class="van-progress__pivot van-progress__pivot--inactive"
>
50%
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-progress"
style
>
<span class="van-progress__portion"
style="width:25%;background:#f2826a;"
>
</span>
<span style="left:25%;transform:translate(-25%,-50%);background:#f2826a;"
class="van-progress__pivot"
>
Orange
</span>
</div>
<div class="van-progress"
style
>
<span class="van-progress__portion"
style="width:50%;background:#ee0a24;"
>
</span>
<span style="left:50%;transform:translate(-50%,-50%);background:#ee0a24;"
class="van-progress__pivot"
>
Red
</span>
</div>
<div class="van-progress"
style
>
<span class="van-progress__portion"
style="width:75%;background:linear-gradient(to right, #be99ff, #7232dd);"
>
</span>
<span style="left:75%;transform:translate(-75%,-50%);background:#7232dd;"
class="van-progress__pivot"
>
Purple
</span>
</div>
</div>
<div>
<!--[-->
<div class="van-progress"
style
>
<span class="van-progress__portion"
style="width:50%;"
>
</span>
<span style="left:50%;transform:translate(-50%,-50%);"
class="van-progress__pivot"
>
50%
</span>
</div>
<div style="margin-top:15px;">
<button type="button"
class="van-button van-button--primary van-button--small"
style
>
<div class="van-button__content">
<span class="van-button__text">
Add
</span>
</div>
</button>
<button type="button"
class="van-button van-button--danger van-button--small"
style
>
<div class="van-button__content">
<span class="van-button__text">
Decrease
</span>
</div>
</button>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,44 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<div class="van-tabs van-tabs--line">
<!--[-->
<div class="van-tabs__wrap">
<div role="tablist"
class="van-tabs__nav van-tabs__nav--line"
style
aria-orientation="horizontal"
>
<!--[-->
</div>
</div>
<div class="van-tabs__content">
<!--[-->
<!--[-->
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-0"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-1"
style="display:none;"
>
</div>
<div id="van-tab"
role="tabpanel"
class="van-tab__panel"
tabindex="-1"
aria-labelledby="van-tabs-2"
style="display:none;"
>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,498 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-radio-group demo-radio-group"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 1
</span>
</div>
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 2
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-radio-group van-radio-group--horizontal demo-radio-group"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio van-radio--horizontal"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 1
</span>
</div>
<div role="radio"
class="van-radio van-radio--horizontal"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 2
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-radio-group demo-radio-group"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio van-radio--disabled"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--disabled"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label van-radio__label--disabled">
<!--[-->
Radio 1
</span>
</div>
<div role="radio"
class="van-radio van-radio--disabled"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--disabled van-radio__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label van-radio__label--disabled">
<!--[-->
Radio 2
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-radio-group demo-radio-group"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--square van-radio__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 1
</span>
</div>
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--square"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 2
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-radio-group demo-radio-group"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style="border-color:#ee0a24;background-color:#ee0a24;"
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 1
</span>
</div>
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 2
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-radio-group demo-radio-group"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style="font-size:24px;"
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 1
</span>
</div>
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style="font-size:24px;"
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 2
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-radio-group demo-radio-group"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style
>
<!--[-->
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/user-active.png">
</div>
<span class="van-radio__label">
<!--[-->
Radio 1
</span>
</div>
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style
>
<!--[-->
<img src="https://fastly.jsdelivr.net/npm/@vant/assets/user-inactive.png">
</div>
<span class="van-radio__label">
<!--[-->
Radio 2
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-radio-group demo-radio-group"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="true"
>
<!--[-->
<span class="van-radio__label van-radio__label--left">
<!--[-->
Radio 1
</span>
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="false"
>
<!--[-->
<span class="van-radio__label van-radio__label--left">
<!--[-->
Radio 2
</span>
<div class="van-radio__icon van-radio__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-radio-group demo-radio-group"
role="radiogroup"
>
<!--[-->
<div role="radio"
class="van-radio van-radio--label-disabled"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 1
</span>
</div>
<div role="radio"
class="van-radio van-radio--label-disabled"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
<span class="van-radio__label">
<!--[-->
Radio 2
</span>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-radio-group"
role="radiogroup"
>
<!--[-->
<div class="van-cell-group van-cell-group--inset">
<!--[-->
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Radio1
</span>
</div>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="true"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round van-radio__icon--checked"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div class="van-cell van-cell--clickable"
role="button"
tabindex="0"
>
<div class="van-cell__title"
style
>
<span>
Radio2
</span>
</div>
<!--[-->
<div role="radio"
class="van-radio"
tabindex="0"
aria-checked="false"
>
<!--[-->
<div class="van-radio__icon van-radio__icon--round"
style
>
<i class="van-badge__wrapper van-icon van-icon-success"
style
>
<!--[-->
</i>
</div>
</div>
</div>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,752 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div role="radiogroup"
class="van-rate"
tabindex="0"
aria-disabled="false"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div role="radiogroup"
class="van-rate"
tabindex="0"
aria-disabled="false"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-like van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-like van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-like van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-like-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-like-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div role="radiogroup"
class="van-rate"
tabindex="0"
aria-disabled="false"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style="color:#ffd21e;font-size:25px;"
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style="color:#ffd21e;font-size:25px;"
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style="color:#ffd21e;font-size:25px;"
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon"
style="color:#eee;font-size:25px;"
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon"
style="color:#eee;font-size:25px;"
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div role="radiogroup"
class="van-rate"
tabindex="0"
aria-disabled="false"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--half van-rate__icon--full"
style="width:0.5em;"
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div role="radiogroup"
class="van-rate"
tabindex="0"
aria-disabled="false"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="6"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="6"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="6"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="6"
aria-posinset="4"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="6"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="6"
aria-posinset="6"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div role="radiogroup"
class="van-rate van-rate--disabled"
aria-disabled="true"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--disabled van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--disabled van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--disabled van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
aria-setsize="5"
aria-posinset="4"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon van-rate__icon--disabled"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon van-rate__icon--disabled"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div role="radiogroup"
class="van-rate van-rate--readonly"
tabindex="0"
aria-disabled="false"
aria-readonly="true"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div role="radiogroup"
class="van-rate van-rate--readonly"
tabindex="0"
aria-disabled="false"
aria-readonly="true"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--half van-rate__icon--full"
style="width:0.3em;"
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
<div>
<!--[-->
<div role="radiogroup"
class="van-rate"
tabindex="0"
aria-disabled="false"
aria-readonly="false"
>
<!--[-->
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="1"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="2"
aria-checked="true"
>
<i class="van-badge__wrapper van-icon van-icon-star van-rate__icon van-rate__icon--full"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="3"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="4"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
<div role="radio"
style
class="van-rate__item"
tabindex="0"
aria-setsize="5"
aria-posinset="5"
aria-checked="false"
>
<i class="van-badge__wrapper van-icon van-icon-star-o van-rate__icon"
style
>
<!--[-->
</i>
</div>
</div>
</div>
`;

View File

@ -0,0 +1,7 @@
/**
* @jest-environment node
*/
import Demo from '../demo/index.vue';
import { snapshotDemo } from '../../../test/demo';
snapshotDemo(Demo, { ssr: true });

View File

@ -0,0 +1,202 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render demo and match snapshot 1`] = `
<!--[-->
<div>
<!--[-->
<div class="van-search"
style
>
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field van-search__field">
<!--[-->
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search"
style
>
<!--[-->
</i>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="search"
id="van-search-input"
class="van-field__control"
placeholder="Placeholder"
>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<form action="/">
<div class="van-search van-search--show-action"
style
>
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field van-search__field">
<!--[-->
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search"
style
>
<!--[-->
</i>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="search"
id="van-search-input"
class="van-field__control"
placeholder="Placeholder"
>
</div>
</div>
</div>
</div>
<div class="van-search__action"
role="button"
tabindex="0"
>
Cancel
</div>
</div>
</form>
</div>
<div>
<!--[-->
<div class="van-search"
style
>
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field van-search__field">
<!--[-->
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search"
style
>
<!--[-->
</i>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="search"
id="van-search-input"
class="van-field__control van-field__control--center"
placeholder="Placeholder"
>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-search"
style
>
<div class="van-search__content van-search__content--square">
<div class="van-cell van-cell--borderless van-field van-field--disabled van-search__field">
<!--[-->
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search"
style
>
<!--[-->
</i>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="search"
id="van-search-input"
class="van-field__control"
disabled
placeholder="Placeholder"
>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-search"
style="background:#4fc08d;"
>
<div class="van-search__content van-search__content--round">
<div class="van-cell van-cell--borderless van-field van-search__field">
<!--[-->
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search"
style
>
<!--[-->
</i>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="search"
id="van-search-input"
class="van-field__control"
placeholder="Placeholder"
>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<!--[-->
<div class="van-search van-search--show-action"
style
>
<div class="van-search__content van-search__content--square">
<label class="van-search__label"
for="van-search-input"
>
Address
</label>
<div class="van-cell van-cell--borderless van-field van-search__field">
<!--[-->
<div class="van-field__left-icon">
<i class="van-badge__wrapper van-icon van-icon-search"
style
>
<!--[-->
</i>
</div>
<div class="van-cell__value van-field__value">
<!--[-->
<div class="van-field__body">
<input type="search"
id="van-search-input"
class="van-field__control"
placeholder="Placeholder"
>
</div>
</div>
</div>
</div>
<div class="van-search__action"
role="button"
tabindex="0"
>
<!--[-->
<div>
Search
</div>
</div>
</div>
</div>
`;

Some files were not shown because too many files have changed in this diff Show More