chore(Tab): remove unused logic (#8086)

This commit is contained in:
neverland 2021-02-05 10:37:20 +08:00 committed by GitHub
parent 7b94ac9199
commit 08f032e431
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -372,7 +372,7 @@ export default createComponent({
() => children.length, () => children.length,
() => { () => {
if (state.inited) { if (state.inited) {
setCurrentIndexByName((props.active || props.active === 0) ? props.active : currentName.value); setCurrentIndexByName(props.active);
setLine(); setLine();
nextTick(() => { nextTick(() => {
scrollIntoView(true); scrollIntoView(true);
@ -397,7 +397,7 @@ export default createComponent({
); );
const init = () => { const init = () => {
setCurrentIndexByName((props.active || props.active === 0) ? props.active : currentName.value); setCurrentIndexByName(props.active);
nextTick(() => { nextTick(() => {
state.inited = true; state.inited = true;
tabHeight = getVisibleHeight(wrapRef.value); tabHeight = getVisibleHeight(wrapRef.value);