add talent life

This commit is contained in:
Vick Scarlet
2021-08-16 23:28:54 +08:00
parent dcc9cd2383
commit df85e62138
18 changed files with 5703 additions and 335 deletions

12
src/functions/util.js Normal file
View File

@@ -0,0 +1,12 @@
function clone(value) {
switch(typeof value) {
case 'object':
if(Array.isArray(value)) return value.map(v=>clone(v));
const newObj = {};
for(const key in value) newObj[key] = clone(value[key]);
return newObj;
default: return value;
}
}
export { clone };