mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-05-05 22:14:44 +00:00
fix undefined object.values method and emit @change event (#167)
* [fix] Object.values() not supported in IE/Safari #165 * [fix] mdTabs emit change event #168 * change var to let
This commit is contained in:
parent
de4efeac7e
commit
e8c83d0491
1 changed files with 8 additions and 2 deletions
|
|
@ -152,10 +152,15 @@
|
|||
|
||||
this.contentWidth = width * this.activeTabNumber + 'px';
|
||||
|
||||
Object.values(this.tabList).forEach((tab, index) => {
|
||||
let index = 0;
|
||||
|
||||
for (const tabId in this.tabList) {
|
||||
let tab = this.tabList[tabId];
|
||||
|
||||
tab.ref.width = width + 'px';
|
||||
tab.ref.left = width * index + 'px';
|
||||
});
|
||||
index++;
|
||||
}
|
||||
},
|
||||
calculateContentHeight() {
|
||||
this.$nextTick(() => {
|
||||
|
|
@ -189,6 +194,7 @@
|
|||
this.activeTab = tabData.id;
|
||||
this.activeTabNumber = this.getTabIndex(this.activeTab);
|
||||
this.calculatePosition();
|
||||
this.$emit('change', this.activeTabNumber);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue