Skip to content

Commit

Permalink
feat(Tabs): add unmount prop as false by default
Browse files Browse the repository at this point in the history
Resolves #663
  • Loading branch information
benjamincanac committed Feb 7, 2024
1 parent cbeede6 commit 843a978
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/runtime/components/navigation/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</HTabList>

<HTabPanels :class="ui.container">
<HTabPanel v-for="(item, index) of items" :key="index" v-slot="{ selected }" :class="ui.base">
<HTabPanel v-for="(item, index) of items" :key="index" v-slot="{ selected }" :class="ui.base" :unmount="unmount">
<slot :name="item.slot || 'item'" :item="item" :index="index" :selected="selected">
{{ item.content }}
</slot>
Expand Down Expand Up @@ -84,6 +84,10 @@ export default defineComponent({
type: Array as PropType<TabItem[]>,
default: () => []
},
unmount: {
type: Boolean,
default: false
},
class: {
type: [String, Object, Array] as PropType<any>,
default: () => ''
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/ui.config/navigation/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ export default {
shadow: ''
}
}
}
}

0 comments on commit 843a978

Please sign in to comment.