From 08f032e431cbc00775da3a98e8d5869bc0680367 Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 5 Feb 2021 10:37:20 +0800 Subject: [PATCH] chore(Tab): remove unused logic (#8086) --- src/tabs/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tabs/index.js b/src/tabs/index.js index 5fc7a6b29..1b77ec258 100644 --- a/src/tabs/index.js +++ b/src/tabs/index.js @@ -372,7 +372,7 @@ export default createComponent({ () => children.length, () => { if (state.inited) { - setCurrentIndexByName((props.active || props.active === 0) ? props.active : currentName.value); + setCurrentIndexByName(props.active); setLine(); nextTick(() => { scrollIntoView(true); @@ -397,7 +397,7 @@ export default createComponent({ ); const init = () => { - setCurrentIndexByName((props.active || props.active === 0) ? props.active : currentName.value); + setCurrentIndexByName(props.active); nextTick(() => { state.inited = true; tabHeight = getVisibleHeight(wrapRef.value);