From eb1d3381f48ff81632b22f944e1f53563ef22a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Thu, 24 Jan 2019 11:14:23 +0800 Subject: [PATCH] perf[Sticky]: export reset method (#1550) --- src/components/Sticky/index.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/Sticky/index.vue b/src/components/Sticky/index.vue index e0fb7c57..a287216d 100644 --- a/src/components/Sticky/index.vue +++ b/src/components/Sticky/index.vue @@ -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) {