fix: 修正npm-dashboard的tab的活动条的偏差

This commit is contained in:
chenjinsong
2022-07-18 16:09:13 +08:00
parent 930647f416
commit d5b16afdf7
4 changed files with 35 additions and 7 deletions

View File

@@ -25,7 +25,7 @@
v-if="item.type === typeMapping.npm.npmTabs || item.params.tabIndex === npmTabIndex"
:id="item.id"
:chart="item"
@tabChange="index => { this.npmTabIndex = index }"
@npmTabChange="npmTabChange"
></chart>
</template>
<chart
@@ -72,6 +72,11 @@ export default {
this.layout = [...n]
}
}
},
methods: {
npmTabChange (index) {
this.npmTabIndex = parseInt(index)
}
}
}
</script>