12345678910111213141516171819202122232425262728 |
- import { mapState } from 'vuex'
- import store from '@/store'
- let $tStoreKey = []
- try {
- $tStoreKey = store.state ? Object.keys(store.state) : []
- } catch(e) {
-
- }
- module.exports = {
- beforeCreate() {
-
-
-
-
- this.$t.vuex = (name, value) => {
- this.$store.commit('$tStore', {
- name, value
- })
- }
- },
- computed: {
-
- ...mapState($tStoreKey)
- }
- }
|