watch: {
'$i18n.locale'(newValue) {
console.log('zha')
if (this.$i18n.locale === 'zh-CN') {
console.log('zh')
} else if (this.$i18n.locale === 'en-US') {
console.log('eh')
}
}
},
【vue系列】i18n监听中英文变化
最新推荐文章于 2024-04-30 17:48:58 发布