main.js 1.02 KB
import Vue from 'vue'
import App from './App.vue'
import router from '@router'
import store from '@store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '../mock/index.js'
//引入富文本编辑器
import  VueQuillEditor from 'vue-quill-editor'  
// 导入富文本编辑器的样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
// 将富文本编译器 注册为全局组件
Vue.use(VueQuillEditor)
import "./libs/fliter"; //引入全局过滤器
// 让IE11支持Vue-router跳转功能
if (
  '-ms-scroll-limit' in document.documentElement.style && 
  '-ms-ime-align' in document.documentElement.style
) {
  window.addEventListener("hashchange", function(event) {
    var currentPath = window.location.hash.slice(1);
    if (store.state.route.path !== currentPath) {
      router.push(currentPath)
    }
  }, false)
}
Vue.config.productionTip = false
Vue.use(ElementUI)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')