1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-09-08 20:27:19 +08:00

fix[ThemePicker]: fixed bug when oldVal is null

This commit is contained in:
Pan 2019-01-14 14:07:03 +08:00
parent c54e99d0a9
commit fec6e4f3c8

View File

@ -18,7 +18,8 @@ export default {
}
},
watch: {
theme(val, oldVal) {
theme(val) {
const oldVal = this.theme
if (typeof val !== 'string') return
const themeCluster = this.getThemeCluster(val.replace('#', ''))
const originalCluster = this.getThemeCluster(oldVal.replace('#', ''))