fix[Sticky]: fixed bug when set stickyTop

This commit is contained in:
Mrli2016 2019-03-19 10:31:12 +08:00 committed by 花裤衩
parent d1f32a05a8
commit abb1d91a9e
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
<template> <template>
<div :style="{height:height+'px',zIndex:zIndex}"> <div :style="{height:height+'px',zIndex:zIndex}">
<div :class="className" :style="{top:stickyTop+'px',zIndex:zIndex,position:position,width:width,height:height+'px'}"> <div
:class="className"
:style="{top:(isSticky ? stickyTop +'px' : ''),zIndex:zIndex,position:position,width:width,height:height+'px'}"
>
<slot> <slot>
<div>sticky</div> <div>sticky</div>
</slot> </slot>