如果想在vue中使用elementUI,只需要做以下三步就可以了:
1,在项目根目录执行命令:npm i element-ui -S进行安装
2,在main.js中引入element:
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN'
Vue.use(ElementUI,{size:'mdeium',locale})
3,在组件中直接使用