File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ export default {
29
29
active: false ,
30
30
position: ' ' ,
31
31
width: undefined ,
32
- height: undefined
32
+ height: undefined ,
33
+ isSticky: false
33
34
}
34
35
},
35
36
mounted () {
@@ -52,6 +53,7 @@ export default {
52
53
this .position = ' fixed'
53
54
this .active = true
54
55
this .width = this .width + ' px'
56
+ this .isSticky = true
55
57
},
56
58
reset () {
57
59
if (! this .active ) {
@@ -60,6 +62,7 @@ export default {
60
62
this .position = ' '
61
63
this .width = ' auto'
62
64
this .active = false
65
+ this .isSticky = false
63
66
},
64
67
handleScroll () {
65
68
this .width = this .$el .getBoundingClientRect ().width
@@ -71,7 +74,9 @@ export default {
71
74
this .reset ()
72
75
},
73
76
handleReize () {
74
- this .width = this .$el .getBoundingClientRect ().width + ' px'
77
+ if (this .isSticky ) {
78
+ this .width = this .$el .getBoundingClientRect ().width + ' px'
79
+ }
75
80
}
76
81
}
77
82
}
You can’t perform that action at this time.
0 commit comments