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.

46 lines
1.2 KiB

6 years ago
import Vue from 'vue'
import App from './App.vue'
5 years ago
import Element from 'element-ui'
5 years ago
import './theme/index.css'
5 years ago
import meta from 'vue-meta'
import dayjs from 'dayjs'
import Cookies from 'js-cookie'
6 years ago
import router from './router/index'
5 years ago
import api from './api'
6 years ago
import store from './store/index'
// 全局组件自动注册
import '@/components/autoRegister'
Vue.prototype.$api = api
Vue.prototype.$dayjs = dayjs
5 years ago
Vue.prototype.$cookies = Cookies
5 years ago
Vue.prototype.msgSuccess = function(msg) {
this.$message({ showClose: true, message: msg, type: 'success' })
}
Vue.prototype.msgError = function(msg) {
this.$message({ showClose: true, message: msg, type: 'error' })
}
Vue.prototype.msgWarning = function(msg) {
this.$message({ showClose: true, message: msg, type: 'warning' })
}
Vue.prototype.msgInfo = function(msg) {
this.$message.info(msg)
}
6 years ago
5 years ago
Vue.use(meta)
Vue.use(Element, {size: 'small', zIndex: 3000})
6 years ago
// 自动加载 svg 图标
const req = require.context('./assets/icons', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
5 years ago
Vue.config.productionTip = false
6 years ago
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')