多组件用来解决切换语言 css 的问题,具体请看代码
mounted() {if (uni.getStorageSync('locale')) {this.locale = uni.getStorageSync('locale');
this.$i18n.locale = uni.getStorageSync('locale')
} else {
this.locale = 'zh-cn';
this.$i18n.locale = 'zh-cn'
}
},