1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-04-06 03:57:53 +08:00

fix[ThemePicker]: fixed bug when oldVal is null (#1517)

This commit is contained in:
花裤衩 2019-01-14 14:07:56 +08:00 committed by Pan
parent 77113a0cb2
commit bae3601606

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('#', ''))