forEach => for

This commit is contained in:
zhw2590582 committed 2022-01-07 22:11:48 +08:00
1 parent 99f5694100
commit 455e2189a7
18 files changed
+159 -103

No files matched your search

+4 -2
View File
@@ -7,13 +7,15 @@ export default function rectMix(art) {
},
});
['bottom', 'height', 'left', 'right', 'top', 'width'].forEach((key) => {
const keys = ['bottom', 'height', 'left', 'right', 'top', 'width'];
for (let index = 0; index < keys.length; index++) {
const key = keys[index];
def(art, key, {
get: () => {
return art.rect[key];
},
});
});
}
def(art, 'x', {
get: () => {