具体环境搭建步骤参考链接
注意该博客中初始化命令: vue init webpack MyPortalProject需改为小写:
vue init webpack myportalproject不然会报错
Warning: name can no longer contain capital letters 2.创建第一个vue+element ui项目创建项目过程参考链接
此博客中示例代码,运行后,按钮样式未生效,可在 main.js 中添加 Vue.use(ElementUI, {size:'mini', zIndex:1024})main.js全部代码如下:
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' import router from './router' import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; Vue.use(ElementUI); Vue.config.productionTip = false Vue.use(ElementUI, {size:'mini', zIndex:1024}) new Vue({ el: '#app', router, components: { App }, template: '