import "iview/dist/styles/iview.css";
import "css/common.less";
import "css/layout.less";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Vue from "vue";
import iView from "iview";
import iviewArea from "iview-area";
import Cookies from "js-cookie";
import Treeselect from "@riophae/vue-treeselect";
import { service, serviceForm } from "service/service";
import App from "./App";
import router from "./router";
import store from "./store";
import mixins from "./mixins";
import complete from "./mixins/complete";
import md5 from "blueimp-md5";
import jquery from "jquery";

// 注册全局变量、全局函数
import base from "src/service/base";

// 注册基础组件
import "src/components/base/globals";

import moment from "moment";

Vue.prototype.moment = moment;

Vue.config.productionTip = false;

Vue.use(iView);
Vue.use(iviewArea);
Vue.mixin(mixins);
Vue.mixin(complete);
Vue.use(base);
Vue.component("Treeselect", Treeselect);
const vm = new Vue({
  el: "#app",
  router,
  store,
  render: h => h(App)
});

vm.$Message.config({
  top: 100,
  duration: 3
});

window.vm = vm;
window.Cookies = Cookies;
window.md5 = md5;
window.jquery = window.$ = jquery;
window.service = service;
window.serviceForm = serviceForm;
