mirror of
https://github.com/youzan/vant.git
synced 2025-10-25 04:05:41 +00:00
[bugfix] Tab: return default active when all tabs disabled (#1926)
This commit is contained in:
@@ -49,7 +49,7 @@ You can set `disabled` attribute on the corresponding `van-tab`.
|
||||
|
||||
```html
|
||||
<van-tabs @disabled="onClickDisabled">
|
||||
<van-tab v-for="index in 4" :title="'tab' + index" :disabled="index === 2">
|
||||
<van-tab v-for="index in 3" :title="'tab' + index" :disabled="index === 2">
|
||||
content of tab {{ index }}
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
@@ -71,7 +71,7 @@ Tabs styled as cards.
|
||||
|
||||
```html
|
||||
<van-tabs type="card">
|
||||
<van-tab v-for="index in 4" :title="'tab' + index">
|
||||
<van-tab v-for="index in 3" :title="'tab' + index">
|
||||
content of tab {{ index }}
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
@@ -81,7 +81,7 @@ Tabs styled as cards.
|
||||
|
||||
```html
|
||||
<van-tabs @click="onClick">
|
||||
<van-tab v-for="index in 4" :title="'tab' + index">
|
||||
<van-tab v-for="index in 2" :title="'tab' + index">
|
||||
content of tab {{ index }}
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
Reference in New Issue
Block a user