抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

1. install

npm 安装

1
npm i element-ui -S

2. 完整引入

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Vue from 'vue'
import App from './App.vue'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.use(ElementUI)

Vue.config.productionTip = false

new Vue({
render: h => h(App),
}).$mount('#app')

3. use

1
2
3
4
5
6
7
8
9
10
11
<template>
<div class="hello">
<h1>hello</h1>
<el-button>hello</el-button>
<el-button type="primary">primary</el-button>
<el-button type="info"> info </el-button>
<el-button type="danger">danger</el-button>
<el-button type="success">success</el-button>
</div>
</template>

4. vue3 用的是 element plus