feat(Tabs): add unmount prop as false by default

Resolves #663
This commit is contained in:
Benjamin Canac
2024-02-07 14:12:31 +01:00
parent cbeede66bb
commit 843a978644
2 changed files with 6 additions and 2 deletions

View File

@@ -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>
@@ -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: () => ''

View File

@@ -30,4 +30,4 @@ export default {
shadow: ''
}
}
}
}