Skip to content

Commit

Permalink
fix(ui/sticky): 修复number类型offsetTop失效的bug
Browse files Browse the repository at this point in the history
affects: @varlet/ui
  • Loading branch information
haoziqaq committed Jan 19, 2021
1 parent 19b1594 commit e7ac6bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/varlet-ui/src/sticky/Sticky.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ref="stickyEl"
:style="{
zIndex,
top: !isFixed ? offsetTop : null,
top: !isFixed ? `${offsetTop}px` : null,
width: isFixed ? fixedWidth : null,
height: isFixed ? fixedHeight : null,
}"
Expand Down Expand Up @@ -107,6 +107,7 @@ export default defineComponent({
stickyEl,
wrapperEl,
isFixed,
offsetTop,
fixedTop,
fixedLeft,
fixedWidth,
Expand Down

0 comments on commit e7ac6bd

Please sign in to comment.