File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 7
7
:href =" tab.href"
8
8
@click.prevent.stop =" setTab(index)"
9
9
v-if =" !tab.headHtml"
10
- >{{ tab.title }}</a >
10
+ >{{ tab.title }}</a >
11
11
<div :class =" ['tab-head',{small: small, active: tab.localActive, disabled: tab.disabled}]"
12
12
v-else
13
13
v-html =" tab.headHtml" ></div >
28
28
export default {
29
29
data () {
30
30
return {
31
- currentTab: this .value || 0 ,
31
+ currentTab: this .value ,
32
32
tabs: []
33
33
};
34
34
},
160
160
// Set initial active tab
161
161
let tabIndex = this .currentTab ;
162
162
163
- this .tabs .forEach ((tab , index ) => {
164
- if (tab .active ) {
165
- tabIndex = index;
166
- }
167
- });
163
+ if (this .currentTab === null || this .currentTab === undefined ) {
164
+ this .tabs .forEach ((tab , index ) => {
165
+ if (tab .active ) {
166
+ tabIndex = index;
167
+ }
168
+ });
169
+ }
168
170
169
171
this .setTab (tabIndex, true );
170
172
},
182
184
this .updateTabs ();
183
185
184
186
// Observe Child changes so we can notify tabs change
185
- observeDom (this .$el , this .updateTabs .bind (this ));
187
+ observeDom (this .$el , this .updateTabs .bind (this ), {subtree : true } );
186
188
}
187
189
};
188
190
You can’t perform that action at this time.
0 commit comments