fix: 尝试修复不识别$t的问题

This commit is contained in:
刘洪洪
2023-10-09 16:30:11 +08:00
parent 8cc6edbdd4
commit a47e04fae2
3 changed files with 37 additions and 19 deletions

View File

@@ -324,9 +324,15 @@ export default {
case 5:
return api.npm.location.packetsRetrains
}
},
initI18n () {
dataForNpmLine.chartOptionLineData.forEach(item => {
item.legend = this.$t(item.legend)
})
}
},
mounted () {
this.initI18n()
if (this.chart) {
this.chartData = _.cloneDeep(this.chart)
}