elementui
步骤:
一,安装
-
使用cli2创建项目
vue init webpack 项目名
-
在工程中安装elementUI的依赖
npm i element-ui -S
-
指定当前项目main.js中使用elementui:导入
import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css';
-
注册到vue当中:注册
Vue.use(ElementUI);
二,按钮(组件的icon和样式可以上官网查看相关代码)
<el-row>
<el-button>默认按钮</el-button>
<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>
</el-row>
<el-row>
<el-button plain>朴素按钮</el-button>
<el-button type="primary" plain>主要按钮</el-button>
<el-button type="success" plain>成功按钮</el-button>
<el-button type="info" plain>信息按钮</el-button>
<el-button type="warning" plain>警告按钮</el-button>
<el-button type="danger" plain>危险按钮</el-button>
</el-row>
<el-row>
<el-button round>