Skip to content

Commit

Permalink
fix(ui/tabs): fix indicator size error on window resize
Browse files Browse the repository at this point in the history
affects: @varlet/ui
  • Loading branch information
haoziqaq committed May 8, 2021
1 parent 00cbf23 commit 576caf1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/varlet-ui/src/tabs/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,18 @@

<script lang="ts">
import Sticky from '../sticky'
import { defineComponent, watch, ref, Ref, computed, Transition, ComputedRef, nextTick } from 'vue'
import {
defineComponent,
watch,
ref,
Ref,
computed,
Transition,
ComputedRef,
nextTick,
onMounted,
onUnmounted,
} from 'vue'
import { props } from './props'
import { TabsProvider, useTabList } from './provide'
import { TabProvider } from '../tab/provide'
Expand Down Expand Up @@ -169,6 +180,9 @@ export default defineComponent({
watch(() => props.active, resize)
onMounted(() => window.addEventListener('resize', resize))
onUnmounted(() => window.removeEventListener('resize', resize))
return {
indicatorWidth,
indicatorHeight,
Expand Down

0 comments on commit 576caf1

Please sign in to comment.