Handling of event addons
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { ref, shallowRef, onMounted } from "vue"
|
||||
import {onMounted, provide, ref, shallowRef} from "vue"
|
||||
|
||||
const props = defineProps({
|
||||
tabs: {
|
||||
@@ -55,6 +55,9 @@ async function selectTab(index) {
|
||||
}
|
||||
}
|
||||
|
||||
// Kind-Komponenten (z. B. Leer-Zustands-Hinweise) können damit gezielt zu einem anderen Tab springen.
|
||||
provide('selectTab', selectTab)
|
||||
|
||||
onMounted(() => {
|
||||
if (props.tabs.length > 0) {
|
||||
selectTab(props.subTabIndex)
|
||||
|
||||
Reference in New Issue
Block a user