Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabs组件通过:default-active-key或:active-key设置选中的标签时,active-key指定的tab可以出现在tab栏可视范围内 #1867

Open
1 task
youhuan opened this issue Nov 16, 2022 · 2 comments · May be fixed by #1936 or #3105
Labels
type: 🐞 bug Something isn't working

Comments

@youhuan
Copy link

youhuan commented Nov 16, 2022

Basic Info

What are the similar cases of this feature

What problem does this feature solve?

https://stackblitz.com/edit/angular-zogjng?file=src%2FApp.vue
页面有12个tab,:active-key设置为第10个tab时,tab 10没出现到可视范围内,必须通过多次点击tab栏的右箭头才能将tab 10切换可视范围内

@Saber-Kurama
Copy link
Contributor

Saber-Kurama commented Dec 5, 2022

可以等tabs渲染完成后再设置 activeKey 的值
好像是activeKey此时还不知道是否要出现滚动,是按照没有出现滚动处理的

const activeKey = ref("0");
setTimeout(() => {
  activeKey.value = "11";
}, 0);

@youhuan
Copy link
Author

youhuan commented Dec 8, 2022

好的,我试试,多谢

@hehehai hehehai added the type: 🐞 bug Something isn't working label Dec 12, 2022
@hehehai hehehai linked a pull request Dec 12, 2022 that will close this issue
15 tasks
@oljc oljc linked a pull request Apr 28, 2024 that will close this issue
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: 🐞 bug Something isn't working
Projects
None yet
3 participants