安装element
element 官网:
https://element.eleme.cn/#/zh-CN/component/installation
npm i element-ui -S
修改main.js
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import App from './App.vue'
import router from './router'
Vue.config.productionTip = false
Vue.use(ElementUI)
new Vue({
router,
render: h => h(App)
}).$mount('#app')
home.vue
<template>
<div class="home">
<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>
</div>
</template>
<script>
// @ is an alias to /src
export default {
name: 'home'
}
</script>
运行一下
完全没有问题,很简单,部分安装看官网
echarts安装
https://echarts.apache.org/zh/tutorial.html#5%20%E5%88%86%E9%92%9F%E4%B8%8A%E6%89%8B%20ECharts
解决方法:
npm config rm proxy
npm config rm https-proxy
ok
转载:https://blog.csdn.net/qq_26728817/article/details/116789370
查看评论