Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit abb1d91

Browse files
Mrli2016PanJiaChen
authored andcommitted
fix[Sticky]: fixed bug when set stickyTop
1 parent d1f32a0 commit abb1d91

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/Sticky/index.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<template>
22
<div :style="{height:height+'px',zIndex:zIndex}">
3-
<div :class="className" :style="{top:stickyTop+'px',zIndex:zIndex,position:position,width:width,height:height+'px'}">
3+
<div
4+
:class="className"
5+
:style="{top:(isSticky ? stickyTop +'px' : ''),zIndex:zIndex,position:position,width:width,height:height+'px'}"
6+
>
47
<slot>
58
<div>sticky</div>
69
</slot>

0 commit comments

Comments
 (0)