perf[Sticky]: export reset method (#1550)

This commit is contained in:
花裤衩 2019-01-24 11:14:23 +08:00 committed by Pan
parent 78e8888389
commit 93c13d2cea
1 changed files with 5 additions and 2 deletions

View File

@ -56,10 +56,13 @@ export default {
this.width = this.width + 'px'
this.isSticky = true
},
reset() {
handleReset() {
if (!this.active) {
return
}
this.reset()
},
reset() {
this.position = ''
this.width = 'auto'
this.active = false
@ -72,7 +75,7 @@ export default {
this.sticky()
return
}
this.reset()
this.handleReset()
},
handleReize() {
if (this.isSticky) {