官方网址: 点击

1.创建项目

vue init webpack vue-ele

配置

2.安装依赖

 npm install 

3.安装loader模块(开发)

  • npm install style-loader -D
  • npm install css-loader -D
  • npm install file-loader -D

4.安装ElementUI模块

npm install element-ui --S

5.在main.js中配置

  • import ElementUI from ‘element-ui’
  • import ‘element-ui/lib/theme-chalk/index.css’
  • Vue.use(ElementUI)

 6.添加build/webpack.base.conf.js 文件内容

{
test: /\\\\\\\\.css$/,
loader:"style!css"
},
{
test: /\\\\\\\\.(eot|woff|woff2|ttf)([\\\\\\\\?]?.*)$/,
loader:"file"
}

7.使用App.vue

<template>
<div id="app">
<el-button type="primary">你好</el-button>
<el-button type="success">你好</el-button>
<el-button type="info">你好</el-button>
<el-button type="warning">你好</el-button>
<el-button type="danger">你好</el-button>
</div>
</template>



02-11 05:03