Skip to content

Commit 93c13d2

Browse files
committed
perf[Sticky]: export reset method (#1550)
1 parent 78e8888 commit 93c13d2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/Sticky/index.vue

+5-2
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,13 @@ export default {
5656
this.width = this.width + 'px'
5757
this.isSticky = true
5858
},
59-
reset() {
59+
handleReset() {
6060
if (!this.active) {
6161
return
6262
}
63+
this.reset()
64+
},
65+
reset() {
6366
this.position = ''
6467
this.width = 'auto'
6568
this.active = false
@@ -72,7 +75,7 @@ export default {
7275
this.sticky()
7376
return
7477
}
75-
this.reset()
78+
this.handleReset()
7679
},
7780
handleReize() {
7881
if (this.isSticky) {

0 commit comments

Comments
 (0)