zhao_js
2024-01-04 6898a19dcf7f52a1f93f8775cdfafc1685b4ee97
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { mapState } from 'vuex'
 
const i18nMixin = {
  computed: {
    ...mapState({
      currentLang: state => state.app.lang
    })
  },
  methods: {
    setLang (lang) {
      this.$store.dispatch('setLang', lang)
    }
  }
}
 
export default i18nMixin