|
@@ -6,10 +6,10 @@
|
|
|
<div>
|
|
|
<slot name="header"/>
|
|
|
</div>
|
|
|
- <div style="flex: 1; height: 0 ;overflow: auto" ref="contentRef" v-if="slots.content">
|
|
|
+ <div :style="style" ref="contentRef" v-if="slots.content">
|
|
|
<slot name="content" :height="height" :width="width"/>
|
|
|
</div>
|
|
|
- <div style="flex: 1; height: 0 ;overflow: auto" ref="contentRef" v-if="slots.default">
|
|
|
+ <div :style="style" ref="contentRef" v-if="slots.default">
|
|
|
<slot name="default" :height="height" :width="width"/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -36,4 +36,13 @@ const slots = useSlots()
|
|
|
const contentRef = ref()
|
|
|
const {height, width} = useElementSize(props.contentSize ? contentRef : null)
|
|
|
|
|
|
+const style = computed(() => {
|
|
|
+ return {
|
|
|
+ flex: 1,
|
|
|
+ height: props.tabPosition === 'transverse' ? 0 : '100%',
|
|
|
+ width: props.tabPosition === 'transverse' ? '100%' : 0,
|
|
|
+ overflow: 'auto'
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
</script>
|