// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/css/base.css'
import './assets/css/main.css'
import './assets/css/mobile.css'
import { store } from '@/store/index'
import md5 from 'js-md5';
Vue.prototype.$md5 = md5;
import 'default-passive-events'
import preventReClick from './utils/plugins.js'


// import '@babel/polyfill'
require('es6-promise').polyfill()

import './icons' // icon

const hls = require('videojs-contrib-hls')
require('video.js/dist/video-js.css')
require('vue-video-player/src/custom-theme.css')

Vue.use(hls)

import Print from '@/utils/print'
Vue.use(Print)


Vue.config.productionTip = false
Vue.use(ElementUI)

Vue.component(ElementUI.Message)

Vue.prototype.$message.successMsg = function (msg, duration=2) {
    return ElementUI.Message.success({
        message: msg,
        duration: duration*1000
    })
}

Vue.prototype.$message.errorMsg = function (msg, duration=2) {
    return ElementUI.Message.error({
        message: msg,
        duration:duration*1000
    })
}

/* eslint-disable no-new */
export default new Vue({
    render: h => h(App),
    router,
    store
}).$mount('#app')
