Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
532 views
in Technique[技术] by (71.8m points)

vue.js - how can I toggle to dark mode in metrinic using vue and vuex?

I'm using metronic theme and vue to develop a SPA website I need to have a button to toggle between dark mode and light mode in metronic. I need to use vuex and vue to solve this problem. Does anyone have any idea how can I do this? This is layaout.config.json file

{
  "demo": "demo3",
  "self": {
    "layout": "default",
    "body": {
    }
  },
  "colors": {
    "theme": {
      "base": {
        "white": "#ffffff",
        "primary": "#1BC5BD",
        "secondary": "#E5EAEE",
        "success": "#1BC5BD",
        "info": "#6993FF",
        "warning": "#FFA800",
        "danger": "#F64E60",
        "light": "#F3F6F9",
        "dark": "#212121"
      },
      "light": {
        "white": "#ffffff",
        "primary": "#1BC5BD",
        "secondary": "#ECF0F3",
        "success": "#C9F7F5",
        "info": "#E1E9FF",
        "warning": "#FFF4DE",
        "danger": "#FFE2E5",
        "light": "#F3F6F9",
        "dark": "#D6D6E0"
      },
    },
    "gray": {
      "gray-100": "#F3F6F9",
      "gray-200": "#ECF0F3",
      "gray-300": "#E5EAEE",
      "gray-400": "#D6D6E0",
      "gray-500": "#B5B5C3",
      "gray-600": "#80808F",
      "gray-700": "#464E5F",
      "gray-800": "#1B283F",
      "gray-900": "#212121"
    }
  },
  "font-family": "Poppins",
  }
}
question from:https://stackoverflow.com/questions/65641293/how-can-i-toggle-to-dark-mode-in-metrinic-using-vue-and-vuex

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...