index.js

import { DaiVue, Vuex } from 'dai-vue';
import * as modules from './modules.js';
import config from './config/config.js';
import interceptor from './interceptor.js';
import store from './store.js';

import './style.less';

var vm = DaiVue(
    {
        store,
        data() {
            return {};
        },
        methods: {},
        created: function () {},
        watch: {},
        components: {},
        //计算属性
        computed: {
            ...Vuex.mapGetters(['vx_userInfo'])
        }
    },
    {
        //全局配置
        config,
        //引用的所有模块
        modules: modules,
        //主路由模块,可以是一个布局模块
        main: { template: '<keep-alive><router-view></router-view></keep-alive>' },
        use: {
            // Vant: { plugin: Vant }
        },
        //http 拦截器
        interceptor
    }
);

//挂载VUE
vm.$mount('#dai-app');
window.baseVue = vm;