element-ui修改自定义主题
Whisper Lv4

official document:https://element.eleme.cn/#/zh-CN/component/custom-theme

change color

  1. open:theme editor online button,modify color ,click 【change theme color】button upper left corner,chose one color you favorite
  2. click【download theme 】button,the folder structure like this:

  1. in project root create a new folder,put the folder you just downloaded in it.

  1. open main.js

    1
    2
    3
    4
    5
    import 'element-ui/lib/theme-chalk/index.css'
    import ElementUI from 'element-ui'
    import Vue from 'vue'

    Vue.use(ElementUI)
  2. modify import part

    1
    2
    3
    4
    5
    import '../theme/index.css'  //theme path just downloaded
    import ElementUI from 'element-ui'
    import Vue from 'vue'

    Vue.use(ElementUI)