javascript - Enable v-tabs that were set disabled in Vue and Vuetify? - Stack Overflow

I have the following code for a v-tabs control:<v-tabs><v-tabdisabledv-for="tab of tabs

I have the following code for a v-tabs control:

</v-tabs>
  <v-tab
    disabled
    v-for="tab of tabs"
    :key="tab.index"
    v-on:change="tabSelected(tab.index)">
    {{tab.name}}
  </v-tab>
</v-tabs>

The tabs are disabled when the app starts. They are disabled until the user selects an item that will fill the tabs with data. Once the data is displayed the tabs need to bee active. I would like to add code to a button click that gets the data and will also allow the tab to bee active.

I have the following code for a v-tabs control:

</v-tabs>
  <v-tab
    disabled
    v-for="tab of tabs"
    :key="tab.index"
    v-on:change="tabSelected(tab.index)">
    {{tab.name}}
  </v-tab>
</v-tabs>

The tabs are disabled when the app starts. They are disabled until the user selects an item that will fill the tabs with data. Once the data is displayed the tabs need to bee active. I would like to add code to a button click that gets the data and will also allow the tab to bee active.

Share Improve this question edited Jan 4, 2023 at 23:26 Riza Khan 3,1705 gold badges28 silver badges63 bronze badges asked Nov 21, 2019 at 2:18 BillBill 1,4872 gold badges34 silver badges66 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

Got it- I added binding to disabled

           <v-tab
            :disabled="isDisabled"
            v-for="tab of tabs"
            :key="tab.index"
            v-on:change="tabSelected(tab.index)"
          >{{tab.name}}</v-tab>
        </v-tabs>

Then on the button click

       this.isDisabled = false;

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745527730a4631549.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信