[Vuejs]-How to Add a TAB in Vue/Quasar?

1πŸ‘

βœ…

You have this tab depending on the variable showTabDentistaHoras

<q-tab
    v-if="showTabDentistaHoras"
    slot="title"
    :disable="disableTab(tabs.dentistaHoras.index)"
    @select="changeSelectedTab(tabs.dentistaHoras.name)"
    :name="tabs.dentistaHoras.name"
    :label="$t('prestador.dentist')"
    class="text-white" />  

As far as I can see it’s not returned in the data properties. You want to add it like so (or to your computed properties, or get it from vuex.):

data () {
   return {
      //... your other data properties
      showTabDentistaHoras: true //or other value
   }
}
πŸ‘€Anton Toshik

2πŸ‘

in ./quasar.conf add this:

framework: {
    components: [
      ...
      'QTabs',
      'QTab',
      'QRouteTab'
    ]
  }

in .quasar/import-quasar.js

import {...,QTabs,QTab,QRouteTab,... }

Vue.use(Quasar, { ..., components: { QTabs,QTab,QRouteTab }, ... }

Docs : https://quasar.dev/vue-components/tabs#QTabs-API

πŸ‘€DrKush

Leave a comment