更简单的方式更新 ElementUi 主题色 Installtion npm i update-element-ui-theme Usage import updateElementUiTheme from "update-element-ui-theme"; updateElementUiTheme({ theme: "#222", // 要修改的主题色 themeName: "--my-theme", // 要同步更新的 css 变量名称 }); live demo