使用vite搭建vue3.0项目
# yarn
yarn global add create-vite-app
# npm
npm global install create-vite-app
# 创建vite
create-vite-app vue-vite
# 进入vue-vite项目
cd vue-vite
# 安装依赖包
yarn install
# 安装element-plus
yarn add element-plus -D
# 运行项目
yarn run dev
引用element-plus
# main.js
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import './element-variables.scss'
import App from './App.vue';
const app = createApp(App)
app.use(ElementPlus)
app.mount('#app')
# element-variables.scss
/* 改变主题色变量 */
$--color-primary: teal;
/* 改变 icon 字体路径变量,必需 */
$--font-path: '~elemen