0👍
Assuming you are using Buefy for the tab component, you could try this
:disabled="!tab.content"
In the example below, "Pictures" tab is enabled whereas "Music" tab is disabled because it has no content.
<template>
<b-tabs v-model="activeTab" :multiline="multiline">
<template v-for="tab in tabs">
<b-tab-item
:key="tab.id"
:value="tab.id"
:label="tab.label"
:disabled="!tab.content" >
{{ tab.content }}
</b-tab-item>
</template>
</b-tabs>
</template>
<script>
export default {
computed: {
tabs() {
const tabs = [
{
id: 'pictures',
label: 'Pictures',
content: 'Pictures: Lorem ipsum dolor sit amet.'
},
{
id: 'music',
label: 'Music',
content: '',
}
]
return tabs
}
}
}
</script>
- [Vuejs]-How to fire an event in mount in Vuejs
- [Vuejs]-How can i set type curve of edges in Sigma.js v2.1.3
Source:stackexchange.com