ElementUI 官網: http://element-cn.eleme.io/#/zh-CN/component/installationcss
1、經過npm安裝依賴包vue
1. 進入到項目目錄,執行指令 : npm i element-ui -Sgit
2. 安裝成功後 package.json 中能夠看到相關依賴,以下圖:github
2、在 main.js 文件中引入 elementuivue-cli
說明: 樣式文件得單獨引用進來, reset.css 是樣式重置文件,根據本身項目狀況引入npm
至此,一個基於 Vue 和 Element 的開發環境已經搭建完畢,如今就能夠編寫代碼了。各個組件的使用方法請參閱它們各自的文檔。element-ui
備註:還有一種引入方式就是經過 vue-cli-plugin-element 插件進行引入,插件地址:https://github.com/ElementUI/vue-cli-plugin-elementjson