Skip to content
Snippets Groups Projects
Commit 8ef6c7ee authored by Pan's avatar Pan
Browse files

perf[Sticky]: refine width default value

parent eb1d3381
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,8 @@ export default {
this.isSticky = false
},
handleScroll() {
this.width = this.$el.getBoundingClientRect().width
const width = this.$el.getBoundingClientRect().width
this.width = width || 'auto'
const offsetTop = this.$el.getBoundingClientRect().top
if (offsetTop < this.stickyTop) {
this.sticky()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment