Skip to content

Commit

Permalink
fix(components): [tabs] fix change acitve cannot scroll in view (#8332)
Browse files Browse the repository at this point in the history
fix change active cannot scroll in view

closed #8114
  • Loading branch information
xiahouwei committed Jun 17, 2022
1 parent cf93395 commit 1299d4a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/components/tabs/src/tabs.tsx
@@ -1,4 +1,12 @@
import { defineComponent, provide, reactive, ref, renderSlot, watch } from 'vue'
import {
defineComponent,
nextTick,
provide,
reactive,
ref,
renderSlot,
watch,
} from 'vue'
import {
buildProps,
definePropType,
Expand Down Expand Up @@ -137,6 +145,7 @@ export default defineComponent({
)

watch(currentName, async () => {
await nextTick()
// call exposed function, Vue doesn't support expose in typescript yet.
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
Expand Down

0 comments on commit 1299d4a

Please sign in to comment.