2022-05-11 14:48:04 +02:00
|
|
|
<template lang="html">
|
2022-05-12 19:29:14 +02:00
|
|
|
<div
|
|
|
|
v-show="title === selectedTitle"
|
|
|
|
class="tab-content"
|
|
|
|
>
|
2022-05-11 14:48:04 +02:00
|
|
|
<slot/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { inject } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
setup() {
|
|
|
|
const selectedTitle = inject('selectedTitle')
|
|
|
|
return {
|
|
|
|
selectedTitle
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2022-05-12 19:29:14 +02:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.tab-content {
|
|
|
|
padding: 20px;
|
|
|
|
border-radius: 5px;
|
|
|
|
}
|
|
|
|
</style>
|