Global introduction of element − ui Global introduction of element-ui Full Authority introduced into E L E m E n- T−ui
Add in main.js
import ElementUI from 'element-ui'import'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)
Example
import Vue from 'vue'import App from './App.vue'import router from "./routes"import auth from "./utils/auth"import axios from 'axios'import ElementUI from 'element-ui'import'element-ui/lib/theme-chalk/index.css'
Vue.config.productionTip =false
// 使Mock生效
import'../mock/'
Vue.prototype.$auth= auth
Vue.prototype.$http= axios
Vue.use(ElementUI)
new Vue({
render: h => h(App),
router
}).$mount('#app')