From 45018ee7eb3b1bfca97e0ab9680a9661032422bc Mon Sep 17 00:00:00 2001 From: dongj0316 <475586651@qq.com> Date: Fri, 31 May 2019 10:17:42 +0800 Subject: [PATCH] [bugfix] IndexBar: Top value calculation error (#3414) --- packages/index-bar/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/index-bar/index.js b/packages/index-bar/index.js index 063b2c241..5346ff2b7 100644 --- a/packages/index-bar/index.js +++ b/packages/index-bar/index.js @@ -103,7 +103,7 @@ export default sfc({ } else if (index === active - 1) { const activeItemTop = rects[active].top - scrollTop; item.active = activeItemTop > 0; - item.top = activeItemTop - rects[active].height; + item.top = activeItemTop - item.height; } else { item.active = false; }