@@ -54,11 +54,14 @@ export const BTab = /*#__PURE__*/ Vue.extend({
54
54
props,
55
55
data ( ) {
56
56
return {
57
- localActive : this [ MODEL_PROP_NAME_ACTIVE ] && ! this . disabled ,
58
- show : false
57
+ localActive : this [ MODEL_PROP_NAME_ACTIVE ] && ! this . disabled
59
58
}
60
59
} ,
61
60
computed : {
61
+ // For parent sniffing of child
62
+ _isTab ( ) {
63
+ return true
64
+ } ,
62
65
tabClasses ( ) {
63
66
const { localActive : active , disabled } = this
64
67
@@ -80,17 +83,9 @@ export const BTab = /*#__PURE__*/ Vue.extend({
80
83
} ,
81
84
computedLazy ( ) {
82
85
return this . bvTabs . lazy || this . lazy
83
- } ,
84
- // For parent sniffing of child
85
- _isTab ( ) {
86
- return true
87
86
}
88
87
} ,
89
88
watch : {
90
- localActive ( newValue ) {
91
- // Make `active` prop work with `.sync` modifier
92
- this . $emit ( MODEL_EVENT_NAME_ACTIVE , newValue )
93
- } ,
94
89
[ MODEL_PROP_NAME_ACTIVE ] ( newValue , oldValue ) {
95
90
if ( newValue !== oldValue ) {
96
91
if ( newValue ) {
@@ -114,13 +109,15 @@ export const BTab = /*#__PURE__*/ Vue.extend({
114
109
firstTab ( )
115
110
}
116
111
}
112
+ } ,
113
+ localActive ( newValue ) {
114
+ // Make `active` prop work with `.sync` modifier
115
+ this . $emit ( MODEL_EVENT_NAME_ACTIVE , newValue )
117
116
}
118
117
} ,
119
118
mounted ( ) {
120
- // Inform b-tabs of our presence
119
+ // Inform `< b-tabs>` of our presence
121
120
this . registerTab ( )
122
- // Initially show on mount if active and not disabled
123
- this . show = this . localActive
124
121
} ,
125
122
updated ( ) {
126
123
// Force the tab button content to update (since slots are not reactive)
@@ -130,8 +127,8 @@ export const BTab = /*#__PURE__*/ Vue.extend({
130
127
updateButton ( this )
131
128
}
132
129
} ,
133
- destroyed ( ) {
134
- // inform b-tabs of our departure
130
+ beforeDestroy ( ) {
131
+ // Inform `< b-tabs>` of our departure
135
132
this . unregisterTab ( )
136
133
} ,
137
134
methods : {
0 commit comments