player属性代理到art属性

This commit is contained in:
Harvey Zack committed 2019-08-01 15:53:01 +08:00
1 parent 95d5f64057
commit 5e03c9b191
4 files changed
+32 -6

No files matched your search

+10
View File
@@ -177,3 +177,13 @@ export function downloadFile(url, name) {
elink.click();
document.body.removeChild(elink);
}
export function proxyPropertys(target, ...sources) {
sources.forEach(source => {
Object.getOwnPropertyNames(source).forEach(key => {
if (!hasOwnProperty(target, key)) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}
});
});
}