fix: the problem that changing the theme color does not work because of cache reasons 🌟

修复: 缓存原因导致主题色更换不生效的问题;
This commit is contained in:
iczer
2020-06-30 21:04:37 +08:00
parent ec771b15aa
commit 8034f474d6
2 changed files with 4 additions and 2 deletions

View File

@@ -18,7 +18,9 @@ module.exports = {
changeThemeColor (newColor) {
let lastColor = this.lastColor || this.primaryColor
let options = {
cssUrl: '/css/theme-colors.css',
changeUrl (cssUrl) {
return `/${cssUrl}` // while router is not `hash` mode, it needs absolute path
},
oldColors: this.getThemeColors(lastColor),
newColors: this.getThemeColors(newColor)
}