mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
* fix(Swipe): props changed but component didn't * fix(Swipe): target watch windowWidth * Update packages/vant/src/swipe/Swipe.tsx * fix(Sticky): resize or orientationchange wrapper no reset width and height * fix(Sticky): resize or orientationchange wrapper no reset width and height * fix(Sticky): resize or orientationchange wrapper no reset width and height * fix(Sticky): resize or orientationchange wrapper no reset width and height --------- Co-authored-by: neverland <jait.chen@foxmail.com>
142 lines
3.2 KiB
Plaintext
142 lines
3.2 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`should add offset top when using offset-top prop 1`] = `
|
|
<div style="height: 10px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="top: 10px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should allow to using offset-top prop with rem unit 1`] = `
|
|
<div style="height: 10px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="top: 32px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should allow to using offset-top prop with vw unit 1`] = `
|
|
<div style="height: 10px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="top: 30px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should sticky inside container bottom when using container prop 1`] = `
|
|
<div style="margin-top: 640px;">
|
|
<div style="height: 150px;">
|
|
</div>
|
|
<div style="height: 44px; width: 88px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="width: 88px; height: 44px; bottom: 0px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should sticky inside container bottom when using container prop 2`] = `
|
|
<div style="margin-top: 640px;">
|
|
<div style="height: 150px;">
|
|
</div>
|
|
<div style="height: 44px; width: 88px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="width: 88px; height: 44px; bottom: 0px; transform: translate3d(0, 24px, 0);"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should sticky inside container when using container prop 1`] = `
|
|
<div style="height: 150px;">
|
|
<div style="height: 44px; width: 88px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="width: 88px; height: 44px; top: 0px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should sticky inside container when using container prop 2`] = `
|
|
<div style="height: 150px;">
|
|
<div style="height: 44px; width: 88px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="width: 88px; height: 44px; top: 0px; transform: translate3d(0, -14px, 0);"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should sticky resize or orientationchange reset root height and width 1`] = `
|
|
<div style="width: 375px; height: 20px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="width: 375px; height: 20px; top: 0px;"
|
|
>
|
|
<div class="content"
|
|
style="height: 20px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should sticky resize or orientationchange reset root height and width 2`] = `
|
|
<div style="width: 677px; height: 20px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="width: 677px; height: 20px; top: 0px;"
|
|
>
|
|
<div class="content"
|
|
style="height: 20px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should sticky to bottom after scrolling 1`] = `
|
|
<div style="height: 10px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="bottom: 10px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should sticky to top after scrolling 1`] = `
|
|
<div style="height: 10px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="top: 0px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`should update z-index when using z-index prop 1`] = `
|
|
<div style="height: 10px;">
|
|
<div class="van-sticky van-sticky--fixed"
|
|
style="z-index: 0; top: 0px;"
|
|
>
|
|
Content
|
|
</div>
|
|
</div>
|
|
`;
|