You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
reagent_manage/vue/src/main.js

39 lines
926 B

6 years ago
import Vue from 'vue'
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import Element from 'element-ui'
import '@/assets/styles/index.scss' // global css
import App from '@/App'
import store from '@/store'
import router from '@/router'
import '@/assets/icons'
import '@/utils/errorLog'
import '@/directive'
import * as filters from './filter'
import BottomTip from '@/components/BottomTip'
import Guide from '@/components/Guide'
import ImageViewer from '@/components/ImageViewer'
//注册过滤器
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
//刷新时socket重连
store.dispatch('socket/init', store.state.user).then()
//注册插件
Vue.prototype.$bottomTip = BottomTip
Vue.prototype.$guide = Guide
Vue.prototype.$image = ImageViewer
Vue.use(Element)
Vue.config.productionTip = false
new Vue({
el: '#app',
router,
store,
render: h => h(App)
})