add light theme

This commit is contained in:
Vick Scarlet
2021-11-28 11:40:21 +08:00
parent 4f55c00f86
commit e1e2ab4701
6 changed files with 418 additions and 50 deletions
+10 -4
View File
@@ -69,10 +69,16 @@ function mapSet(target, source) {
function deepMapSet(target, source) {
for(const key in source) {
if(typeof source[key] === 'object')
deepMapSet(target[key], source[key]);
else
target[key] = source[key];
let value = source[key];
switch(typeof value) {
case 'function': value = value();
case 'object':
if(!Array.isArray(value)) {
deepMapSet(target[key], value);
break;
}
default: target[key] = value;
}
}
return target;
}