mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
add themeMix
This commit is contained in:
1 parent
59400eb3bf
commit
1438ce5e82
16 files changed
+428
-410
No files matched your search
@@ -1,5 +1,3 @@
|
||||
import { errorHandle } from './error';
|
||||
|
||||
export const def = Object.defineProperty;
|
||||
|
||||
const { hasOwnProperty } = Object.prototype;
|
||||
@@ -11,16 +9,6 @@ export function get(obj, name) {
|
||||
return Object.getOwnPropertyDescriptor(obj, name);
|
||||
}
|
||||
|
||||
export function proxyPropertys(target, ...sources) {
|
||||
return sources.reduce((result, source) => {
|
||||
Object.getOwnPropertyNames(source).forEach((key) => {
|
||||
errorHandle(!has(result, key), `Target attribute name is duplicated: ${key}`);
|
||||
def(result, key, get(source, key));
|
||||
});
|
||||
return result;
|
||||
}, target);
|
||||
}
|
||||
|
||||
export function mergeDeep(...objects) {
|
||||
const isObject = (item) => item && typeof item === 'object' && !Array.isArray(item);
|
||||
return objects.reduce((prev, obj) => {
|
||||
|
||||
Reference in new issue
Block a user