首先進入vue專案所在的cmd目錄輸入:
npm i element-ui -S
在組態檔中加入這三句話,引入Element UI
import ElementUI from ‘element-ui’;
import ‘element-ui/lib/theme-chalk/index.css’;
Vue.use(ElementUI);
import Vue from 'vue'
import App from './App'
import VueRouter from './router'
import qs from 'querystring'
import axios from 'axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.prototype.qs=qs
Vue.prototype.$axios=axios
Vue.config.productionTip = false
const router=new VueRouter()
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})