Vue如何使用element-UI

1、安装

npm install element-ui -S

2、在main.js文件引入

import ElementUI from 'element-ui';//引入ui框架
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

3、使用

根据官网 element-UI官网文档 就可以使用ui组件
如:

<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>

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/GongWei_/article/details/114301959