import Vue from 'vue'
import axios from 'axios'

import App from './App'
import store from './store'
import router from './router'


import Cookies from 'js-cookie'
import 'font-awesome/css/font-awesome.min.css'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';
import './assets/styles/index.scss'

if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
Vue.http = Vue.prototype.$http = axios
Vue.config.productionTip = false

Vue.use(ElementUI, {
    size: Cookies.get('size') || 'medium' // set element-ui default size
})



Vue.prototype.msgSuccess = function (msg) {
    this.$message({ showClose: true, message: msg, type: "success", offset:100 });
}
Vue.prototype.msgError = function (msg) {
    this.$message({ showClose: true, message: msg, type: "error", offset:100 });
}
Vue.prototype.msgInfo = function (msg) {
    this.$message.info(msg);
}


/* eslint-disable no-new */
new Vue({
  components: { App },
  router,
  store,
  template: '<App/>'
}).$mount('#app')
