//import '@babel/polyfill';

import moohoBaseAdmin, { Vue, App, router, store, i18n, setting, basicLayout, lodop, request, mixinPage, created, routeChanged } from '/src/index.js';

// 自定义css
import './styles/css/wms.css';

// 页面
const files = require.context('./pages', true, /\.vue$/);
const pages = {};

files.keys().forEach(key => {
    pages['@/' + key.replace(/(\.\/)/g, '')] = files(key).default;
});

const install = function(Vue, opts = {}) {
    if (install.installed) return;

    Vue.use(moohoBaseAdmin);

    // eCharts图表
    Vue.prototype.$echarts = echarts;
};

const API = {
    version: process.env.VERSION,
    install
    //...components
};

export default API;

export { pages, Vue, App, router, store, i18n, setting, basicLayout, lodop, request, mixinPage, created, routeChanged };
