Skip to content

Commit

Permalink
fix: always render tabs and printing.
Browse files Browse the repository at this point in the history
see: #49
  • Loading branch information
kwesterfeld2 committed Jan 29, 2025
1 parent ac04097 commit 7ca9d94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vitepress-plugin-tabs/src/client/PluginTabsTab.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useTabsSingleState } from './useTabsSingleState'
defineProps<{ label: string }>()
const { uid, selected } = useTabsSingleState()
const isPrint = computed<boolean>(() => typeof window !== 'undefined' && typeof window.matchMedia === 'function' && window.matchMedia('print')?.matches)
</script>

<template>
<div
v-if="selected === label"
v-if="selected === label || isPrint"
:id="`panel-${label}-${uid}`"
class="plugin-tabs--content"
role="tabpanel"
Expand Down

0 comments on commit 7ca9d94

Please # to comment.