vite +elementPlus vue3 custom theme color

vite custom theme color

Install sass first, the elementPlus style is written by scss,

 The sass version used on elementPlus is

 Let's install sass first

npm i sass -D

If it cannot be installed,

 If you report this error, clear the npm cache

npm cache clear --force

elementPlus can load each component on demand

npm i unplugin-vue-components unplugin-element-plus -D

The theme also needs to install unplugin-element-plus

npm i unplugin-element-plus

in vite.config.ts

import AutoImport from 'unplugin-auto-import/vite'
import Components from 

Guess you like

Origin blog.csdn.net/qq_27449993/article/details/127277569