123456789101112131415161718192021222324252627 |
- import { mapState } from 'vuex'
- import store from "@/store"
- let $uStoreKey = [];
- try{
- $uStoreKey = store.state ? Object.keys(store.state) : [];
- }catch(e){
-
- }
- module.exports = {
- beforeCreate() {
-
-
-
- this.$u.vuex = (name, value) => {
- this.$store.commit('$uStore', {
- name,value
- })
- }
- },
- computed: {
-
- ...mapState($uStoreKey)
- }
- }
|