import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import "@/assets/styles/index.scss"; //全局样式
// import * as echarts from 'echarts'
import './icons'

import dict from '@/components/Dict'
import VueLazyComponent from '@xunlei/vue-lazy-component'
import animated from 'animate.css';

// import '@/rem'

// 全局混入
// import { common } from '@/mixins'
// import '@/permission' // permission control

Vue.config.productionTip = false
Vue.use(ElementUI);
// Vue.prototype.$echarts = echarts

// 全局注册字典组件
Vue.use(dict);

// 全局注册组件懒加载方案
Vue.use(VueLazyComponent)

// 全局注册动画效果
Vue.use(animated);
// // 全局混入浏览器缩放适配组件
// Vue.mixin(common)


// 滚动动画 wow.js
import {
  WOW
} from 'wowjs'
Vue.prototype.$wow = new WOW({
  boxClass: 'wow', // default
  animateClass: 'animated', // default
  offset: 150, // default
  mobile: true, // default
  live: false,

  // live为true时，控制台会提示：MutationObserver is not supported by your browser. & WOW.js cannot detect dom mutations, please call .sync() after loading new content.

  callback: function (box) {
    console.log("WOW: animating <" + box.tagName.toLowerCase() + ">")
  }
})


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
